/**
 * Стили блока FAQ Accordion.
 *
 * Временно перенесены 1:1 из Gatsby-проекта (headless-фронт), пока он не
 * опубликован и разметку из render.php больше некому стилизовать:
 * ~/Документы/WORK/Node.js/Mediacube/src/styles/blocks/faq-accordion.scss
 * Когда Gatsby выйдет в прод — проверить, не дублируются ли стили, и решить,
 * нужен ли этот файл дальше.
 */

.mc-faq {
	margin: 40px 0;
}

.mc-faq__heading {
	font-size: 24px;
	font-weight: 700;
	line-height: 28px;
	margin-bottom: 8px;
}

.mc-faq__description {
	color: var(--gray-color-text, #505050);
	margin-bottom: 24px;
}

.mc-faq__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mc-faq__item {
	background: #fff;
	border-radius: 12px;
	padding: 0 20px;
}

.mc-faq__question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	color: var(--main-black-color, #191c1f);
}

.mc-faq__arrow {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: rgba(64, 57, 255, 0.08);
}

.mc-faq__arrow svg {
	transition: transform 0.2s ease;
}

/* одна и та же иконка, просто поворачивается на 90° в открытом состоянии */
.mc-faq__item.active .mc-faq__arrow svg {
	transform: rotate(-90deg);
}

.mc-faq__answer-wrap {
	display: grid;
	grid-template-rows: 0fr;
	overflow: hidden;
	visibility: hidden;
	transition: grid-template-rows 0.3s ease, visibility 0.3s ease;
}

.mc-faq__item.active .mc-faq__answer-wrap {
	grid-template-rows: 1fr;
	visibility: visible;
}

.mc-faq__answer {
	overflow: hidden;
	min-height: 0;
	padding-bottom: 0;
	color: var(--gray-color-text, #505050);
	font-size: 15px;
	line-height: 22px;
}

.mc-faq__answer p:first-child {
	margin-top: 0;
}

.mc-faq__item.active .mc-faq__answer {
	padding-bottom: 12px;
}
