// =============================================================================
// :: Settings
// =============================================================================
$borderWidth: 0.7rem;

// =============================================================================
// :: Faq
// =============================================================================
// .c-faq {}

// =============================================================================
// :: Elements
// =============================================================================
.c-faq__container {
	overflow: hidden;
}

.c-faq__title {
	@include extend-heading-decorator();

	margin-bottom: 5rem;
}

.c-faq__grid {
	@include respond-to(get-breakpoint("tablet")) {
		width: 200%;
		margin: 4.2rem 0 0;

		transform: translateX((0));

		transition: transform 0.3s ease-in-out;
	}

	@include respond-at(get-breakpoint("tablet")) {
		margin: 0 auto;
	}
}

.c-faq__list,
.c-faq__content {
	@include respond-to(get-breakpoint("tablet")) {
		width: 50%;
		margin: 0 !important; /* stylelint-disable-line */
	}
}

.c-faq__list,
.c-faq__content-list {
	padding: 0;

	list-style: none;
}

.c-faq__list {
	@include respond-at(get-breakpoint("tablet")) {
		border-left: $border-width-1x-small solid $border-color-grey;
	}
}

.c-faq__item {
	position: relative;

	margin-bottom: 4.8rem;

	&:last-child {
		margin-bottom: 0;
	}

	&:hover {

		&::before {
			opacity: 1;
		}
	}

	@include respond-at(get-breakpoint("tablet")) {

		&::before {
			content: "";

			position: absolute;
			top: 0;
			left: calc(#{$borderWidth} * -0.5);

			width: $borderWidth;
			height: 100%;

			opacity: 0;

			background-color: $background-color-purple;
			border: none;
			border-radius: $border-radius-base;

			transition: opacity 0.3s ease-in-out;
		}
	}
}

.c-faq__button {
	width: 100%;
	height: 100%;

	text-align: left;

	border: none;
	background-color: transparent;

	cursor: pointer;

	@include respond-to(get-breakpoint("tablet")) {
		padding-right: 2rem;
	}

	@include respond-at(get-breakpoint("tablet")) {
		padding-left: 3rem;
	}
}

.c-faq__item-title {
	margin-bottom: 1rem;
}

.c-faq__item-text {

	@include respond-to(get-breakpoint("tablet")) {
		margin-right: 10rem;
	}
}

.c-faq__content {
	position: relative;
}

.c-faq__content-list {
	position: absolute;
	top: 6.5rem;
	left: 0;

	opacity: 0;

	transition: opacity 0.3s ease-in-out;

	pointer-events: none;

	@include respond-at(get-breakpoint("tablet")) {
		position: static;

		top: 0;

		display: none;

		transition-delay: 0.2s;
		transition-property: display;
	}
}

.c-faq__icon-wrapper {
	display: flex;
	justify-content: center;
	align-content: center;
	width: 2.5rem;
	height: 2.5rem;

	background-color: $background-color-pink;
	border: none;
	border-radius: $border-radius-base;
}

.c-faq__icon {
	align-self: center;

	font-size: $font-size-2x-small;

	color: $text-color-light;
}

.c-faq__item-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.c-faq__content-button {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 2rem 1.5rem;

	background-color: $background-color-base;
	border: none;
	border-radius: $border-radius-2x-small;

	box-shadow: 0 1.3rem 4rem -1rem $box-shadow-color-light;
}

.c-faq__content-button-text {
	margin-left: 1.2rem;

	font-family: $font-family-primary;
	font-size: $font-size-2x-small;
	font-weight: $font-weight-medium;

	color: $text-color-base;
}

// =============================================================================
// :: States
// =============================================================================
.c-faq__content-list {

	&.is-active {
		display: block;

		opacity: 1;

		pointer-events: auto;

		@include respond-at(get-breakpoint("tablet")) {
			position: relative;
		}
	}
}

.c-faq__item {

	&.is-active {

		&::before {
			opacity: 1;
		}
	}
}

.c-faq__grid {
	overflow: hidden;

	&.is-open {

		@include respond-to(get-breakpoint("tablet")) {
			transform: translateX((-50%));
		}

		.c-faq__content-list.is-active {

			@include respond-to(get-breakpoint("tablet")) {
				position: relative;
				top: 0;
			}
		}
	}
}
