/**
 * Экспертная заявка: только секции, чипы и колонки квалификации.
 * Базовая типографика, поля, кнопки, чекбоксы — из add_new_book/style.css
 */

/* Шире формы «новая книга» (720px): макет эксперта 926px */
body.expert_application .add_new_book_page .add_new_book_card_wrap {
	max-width: 926px;
}

/* Видимые лейблы над полями (макет), переопределяем скрытие из add_new_book */
.add_new_book_form.expert_application_form .add_new_book_field > label:not(.add_new_book_upload_label) {
	position: static;
	width: auto;
	height: auto;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
	border: 0;
	display: block;
	font-size: 16px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.95);
	margin-bottom: 8px;
	line-height: 1.3;
}

/* Строка: дата ~1/3, email ~2/3; телефон — ~1/3 ширины */
.add_new_book_form.expert_application_form .expert_row_date_email {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 12px;
	margin-bottom: 14px;
	align-items: start;
}

.add_new_book_form.expert_application_form .expert_row_phone {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 12px;
	margin-bottom: 14px;
	align-items: start;
}

.add_new_book_form.expert_application_form .expert_row_phone .add_new_book_field {
	max-width: 100%;
}

/* Вводы, которых нет в базовой форме «новая книга» */
.add_new_book_page .expert_application_form input[type="number"],
.add_new_book_page .expert_application_form textarea {
	width: 100%;
	padding: 16px 24px;
	margin-bottom: 0;
	background: #0e0e0e !important;
	border: none !important;
	border-radius: 16px;
	color: #fff !important;
	font-family: 'Rubik', sans-serif;
	font-size: 14px;
	font-weight: 500;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.add_new_book_page .expert_application_form input[type="number"] {
	height: 48px;
}

.add_new_book_page .expert_application_form textarea {
	min-height: 120px;
	resize: vertical;
	line-height: 1.45;
	font-weight: 400;
}

.add_new_book_page .expert_application_form textarea::placeholder {
	color: rgba(255, 255, 255, 0.55) !important;
	opacity: 1;
}

.add_new_book_page .expert_application_form input[type="number"]:focus,
.add_new_book_page .expert_application_form textarea:focus {
	outline: none;
	box-shadow: 0 0 0 2px #a4dad5d4;
}

/* Две строки под H1: один шрифт (Rubik), в одной полосе с заголовком #111 */
body.expert_application .expert_page_title_block {
	background: #111111;
	border-radius: 32px 32px 0 0;
	position: relative;
	top: 30px;
}

body.expert_application .expert_page_title_block .add_new_book_title {
	background: transparent;
	border-radius: 0;
	padding: 24px 32px 44px;
	top: 0;
}

/* Вводный текст — внутри .add_new_book_card (отступы по горизонтали даёт padding карточки) */
body.expert_application .add_new_book_card .expert_page_lead {
	padding: 28px 0 28px;
	margin: 0;
}

body.expert_application .expert_page_lead_line {
	margin: 0 0 10px;
	font-family: 'Rubik', sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.75);
}

body.expert_application .expert_page_lead_line:last-child {
	margin-bottom: 0;
}

/* Форма сразу под вводным текстом — вертикальный зазор даёт .expert_page_lead */
body.expert_application .add_new_book_card > .expert_application_form {
	padding-top: 0;
}

@media (max-width: 768px) {
	body.expert_application .expert_page_title_block .add_new_book_title {
		padding: 20px 24px 36px;
	}

	body.expert_application .add_new_book_card .expert_page_lead {
		padding: 24px 0 24px;
	}
}

@media (max-width: 480px) {
	body.expert_application .expert_page_title_block .add_new_book_title {
		padding: 18px 20px 32px;
	}

	body.expert_application .add_new_book_card .expert_page_lead {
		padding: 20px 0 20px;
	}

	body.expert_application .expert_page_lead_line {
		font-size: 14px;
	}
}

/* Все блоки формы — панели (как фон карточки add_new_book) */
.expert_application_form .expert_section {
	margin: 0 0 24px;
	padding: 20px;
	background: #252525;
	border-radius: 16px;
	border-bottom: none;
}

/* Последняя панель — чуть больший отступ перед чекбоксами */
.expert_application_form .expert_section:last-of-type {
	margin-bottom: 28px;
}

.expert_section_head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.expert_section_icon {
	color: #a4dad5;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.expert_section_icon svg {
	width: 34px;
	height: 34px;
}

.expert_section_title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	color: #fff;
	line-height: 1.3;
}

.expert_section_title_note {
	font-weight: 400;
	font-size: 0.88em;
	color: rgba(255, 255, 255, 0.55);
}

.expert_section_note {
	margin-top: -8px;
	margin-bottom: 16px;
}

/* Подтверждение личности: подписи, подсказки под загрузкой, дисклеймер */
/* Верхняя строка под заголовком и подсказки под кнопками — одна типографика (как на макете) */
.expert_identity_note_top,
.expert_passport_hint {
	margin: 0;
	font-family: 'Rubik', sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.5);
}

.expert_identity_note_top {
	margin: 0 0 16px;
}

.expert_passport_row {
	align-items: start;
}

.expert_passport_caption {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 10px;
	line-height: 1.3;
}

.expert_passport_hint {
	margin: 10px 0 0;
}

.expert_identity_disclaimer {
	padding: 0;
	font-size: 14px;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.92);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Чипы уровня / активности — в стиле фокуса полей add_new_book */
.expert_chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 14px;
}

.expert_chip {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	margin: 0;
}

.expert_chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

.expert_chip span {
	display: inline-block;
	padding: 12px 16px;
	border-radius: 16px;
	background: #0e0e0e;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	font-weight: 500;
	border: none;
	transition: box-shadow 0.15s, color 0.15s;
}

.expert_chips_radio .expert_chip input:checked + span,
.expert_chips_check .expert_chip input:checked + span {
	box-shadow: 0 0 0 2px #a4dad5d4;
	color: #a4dad5;
}

/* Подпись над чипами */
.expert_chips_label {
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.75);
	margin: 8px 0 12px;
}

/* --- Профессиональный профиль: отступы и сетка как в макете --- */
.expert_section_professional .expert_section_head {
	margin-bottom: 24px;
}

/* Два поля в ряд: равная ширина, зазор 16px, между рядами 24px */
.expert_section_professional .expert_professional_row_2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 24px;
	align-items: start;
}

.expert_section_professional .expert_professional_row_2 .add_new_book_field {
	margin-bottom: 0;
}

/* Полная ширина: «Области экспертизы» */
.expert_section_professional .add_new_book_field.expert_professional_field_expertise {
	margin-bottom: 24px;
}

/* Подпись «Уровень квалификации» — 12px до сетки чипов */
.expert_section_professional .expert_professional_chips_heading {
	margin: 0 0 12px;
}

/* Сетка 4×2, высота чипа 56px (макет) */
.expert_section_professional .expert_chips.expert_professional_qual_grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px 12px;
	margin: 0 0 24px;
	align-items: stretch;
	justify-items: stretch;
}

/* label — перебиваем inline-flex у .expert_chip */
.expert_section_professional .expert_professional_qual_grid .expert_chip {
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	width: 100%;
	min-width: 0;
	margin: 0;
	box-sizing: border-box;
}

.expert_section_professional .expert_professional_qual_grid .expert_chip span {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	text-align: left;
	width: 100%;
	height: 56px;
	min-height: 56px;
	max-height: 56px;
	box-sizing: border-box;
	padding: 0 12px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	/* как у .add_new_book_form input::placeholder */
	color: rgba(255, 255, 255, 0.55);
	overflow-wrap: anywhere;
	word-wrap: break-word;
	overflow: hidden;
}

/* Нижний ряд: ~35% / 35% / 30%, зазор 16px */
.expert_section_professional .expert_professional_row_3 {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 7fr) minmax(0, 6fr);
	gap: 16px;
	margin-bottom: 0;
	align-items: start;
}

.expert_section_professional .expert_professional_row_3 .add_new_book_field {
	margin-bottom: 0;
}

@media (max-width: 768px) {
	.expert_section_professional .expert_professional_row_2,
	.expert_section_professional .expert_professional_row_3 {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.expert_section_professional .expert_chips.expert_professional_qual_grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.expert_section_professional .expert_chips.expert_professional_qual_grid {
		grid-template-columns: 1fr;
	}
}

/* Квалификация: три колонки */
.expert_qual_columns {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	align-items: stretch;
	gap: 12px;
}

/* Колонка — колонка flex: нижние подписи можно прижать при необходимости */
.expert_qual_col {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-width: 0;
	height: 100%;
}

/*
 * Заголовки разной длины (2 строки в средней колонке) сдвигали кнопки.
 * Резервируем высоту под 2 строки — «Загрузить» выравнивается по горизонтали.
 */
.expert_qual_col_title {
	margin: 0 0 12px;
	min-height: calc(1.35em * 2);
	display: flex;
	align-items: flex-start;
	font-size: 14px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.95);
	text-align: left;
	line-height: 1.35;
}

.expert_qual_upload_field {
	margin-bottom: 0 !important;
}

.expert_qual_upload_field .add_new_book_upload_label {
	padding: 12px 16px;
	font-size: 13px;
}

/* Вторичная кнопка: тёмный фон, мятный текст и иконка справа (макет) */
.expert_add_file_btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin-top: 10px;
	padding: 12px 16px;
	border-radius: 16px;
	border: 1px solid rgba(164, 218, 213, 0.22);
	background: #2a2a2a;
	color: #a4dad5;
	font-family: 'Rubik', sans-serif;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.expert_add_file_btn:hover {
	background: #333333;
	border-color: rgba(164, 218, 213, 0.35);
}

.expert_add_file_btn_label {
	flex: 1;
	text-align: left;
}

.expert_add_file_btn_icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	background: url('/components/pages/add_new_book/icons/load.svg') center / contain no-repeat;
	opacity: 0.95;
	/* тонировка под мятный акцент */
	filter: invert(84%) sepia(12%) saturate(380%) hue-rotate(122deg) brightness(95%);
}

.expert_file_hint {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
	margin: 8px 0 0;
	min-height: 0;
	line-height: 1.35;
}

.expert_qual_footnote {
	margin-top: auto;
	padding-top: 8px;
	font-family: 'Rubik', sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.5);
	text-align: left;
}

@media (max-width: 768px) {
	.expert_qual_columns {
		grid-template-columns: 1fr;
	}

	.expert_qual_col {
		height: auto;
	}

	.expert_qual_footnote {
		margin-top: 8px;
		padding-top: 0;
	}
}

@media (max-width: 480px) {
	.add_new_book_form.expert_application_form .expert_row_date_email,
	.add_new_book_form.expert_application_form .expert_row_phone {
		grid-template-columns: 1fr;
	}

	.add_new_book_page .expert_application_form input[type="number"] {
		height: 44px;
		padding: 12px 16px;
	}

	.add_new_book_page .expert_application_form textarea {
		padding: 12px 16px;
		font-size: 14px;
	}
}
