/* ABOUTME: Styles for expandable accordion elements with toggle animation. */
/* ABOUTME: Used in FAQ sections and detail/summary block snippets. */
.accordion {
	width: 100%;
	overflow: hidden;
	border-top: 1px solid currentColor;
}

.faq-section hgroup {
	margin-bottom: 1rem;
}

/* Header / Trigger */
.accordion__intro {
	position: relative;
	padding: 1rem 0;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: var(--step-0);
}

.accordion__intro:focus-visible {
	outline: 2px solid var(--color-regular-turquoise);
	outline-offset: -2px;
}

.accordion__intro span {
	display: flex;
	gap: 0.5rem;
	font-family: "Inter Youth";
}
.accordion__intro span svg {
	width: 30px;
	height: auto;
}
.accordion__intro span .svg-icon {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

.accordion__intro span .svg-icon svg path {
	fill: #5cc2dc !important;
}

/* Content */
.accordion__content {
	max-height: 0;
	overflow: hidden;
	will-change: max-height;
	transition: all 0.25s ease-out;
	opacity: 0;
	font-size: var(--step--1);
}

/* Text & layout */
.accordion h4,
.accordion p {
	margin: 0;
}

.accordion p {
	padding-bottom: 16px;
}

.accordion span {
	font-weight: bold;
	max-width: calc(100% - 55px);
}

/* Active state */
.accordion__active .accordion__content {
	opacity: 1;
}

.accordion__content > :last-child {
	margin-bottom: 2rem;
}

/* Toggle icon (plus by default, minus when active) */
.accordion__intro::after {
	content: "";
	display: flex;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
	margin-right: 10px;
	border: 1px solid currentColor;
	border-radius: 9999px;
	background-color: currentColor;
	-webkit-mask: url(/assets/img/accordion-plus.svg) no-repeat 50% 50%;
	mask: url(/assets/img/accordion-plus.svg) no-repeat 50% 50%;
}

.accordion__active .accordion__intro::after {
	-webkit-mask: url(/assets/img/accordion-minus.svg) no-repeat 50% 50%;
	mask: url(/assets/img/accordion-minus.svg) no-repeat 50% 50%;
}

@media screen and (min-width: 1024px) {
	.large_faq .accordion {
		border-top: 0px;
		display: flex;
		gap: 1rem;
	}

	.large_faq .accordion__intro {
		padding: 0;
		width: 33%;
		align-items: flex-start;
		font-size: var(--step-2);
	}
	.large_faq .accordion__intro span svg {
		width: 60px;
	}
	.large_faq .accordion__intro::after {
		display: none;
	}
	.large_faq .accordion + .accordion {
		margin-top: 2rem;
	}

	.large_faq .accordion__content {
		max-height: fit-content;
		height: fit-content;
		overflow: hidden;
		width: 77%;

		will-change: max-height;
		transition: all 0.25s ease-out;
		opacity: 1;
		font-size: var(--step--1);
		max-width: 65ch;
	}

	.accordion__intro span .svg-icon {
		padding-top: 0.3rem;
	}
}
