/*
SOLEI custom.css v2.0
Панели и меню (мобильные/планшет) + попап ответов CF7 + унификация форм + скин fancybox + sticky-меню
*/

/* ---------- Затемняющий оверлей панелей ---------- */
#solei-overlay {
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	background: rgba( 0, 0, 0, .45 );
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
	z-index: 9990;
}
#solei-overlay.is-visible { opacity: 1; visibility: visible; }

/* ---------- Крестик закрытия панелей ---------- */
.solei-close {
	position: absolute;
	top: 4px; right: 6px;
	width: 34px; height: 34px;
	padding: 0; border: 0; background: transparent;
	color: #4d427c; font-size: 28px; line-height: 1;
	cursor: pointer; z-index: 3;
}

/* ---------- CF7: скрываем стандартную плашку ответа ---------- */
.wpcf7-response-output { display: none !important; }

/* ---------- CF7: одинаковая ширина полей ---------- */
.wpcf7 input[type=text],
.wpcf7 input[type=email],
.wpcf7 input[type=tel],
.wpcf7 input[type=search],
.wpcf7 textarea {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

/* ---------- Попап ответов CF7 ---------- */
#solei-cf7-popup { display: none; }
#solei-cf7-popup.is-open { display: block; }
#solei-cf7-popup .solei-cf7-overlay {
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	background: rgba( 0, 0, 0, .55 );
	z-index: 99998;
}
#solei-cf7-popup .solei-cf7-dialog {
	position: fixed;
	top: 50%; left: 50%;
	transform: translate( -50%, -50% );
	background: #eeeef6;
	border-radius: 6px;
	padding: 30px 40px;
	max-width: 480px;
	width: calc( 100% - 40px );
	z-index: 99999;
	box-shadow: 0 10px 25px rgba( 0, 0, 0, .5 );
	text-align: center;
}
#solei-cf7-popup .solei-cf7-close {
	position: absolute;
	top: 6px; right: 10px;
	border: 0; background: none;
	font-size: 26px; line-height: 1;
	cursor: pointer; color: #4d427c;
}
#solei-cf7-popup .solei-cf7-message { font-size: 16px; line-height: 1.5; color: #333; }
#solei-cf7-popup.is-success .solei-cf7-dialog { border-top: 4px solid #665d96; }
#solei-cf7-popup.is-error   .solei-cf7-dialog { border-top: 4px solid #c05f5f; }

/* ---------- Скин Firelight Lightbox (fancybox) ---------- */
#fancybox-wrap { box-sizing: initial; }
#fancybox-outer { background: none !important; box-shadow: none; }
.fancybox-bg { display: none !important; }
#fancybox-content {
	background: #eeeef6 !important;
	border-radius: 4px;
	box-shadow: 0 10px 25px rgba( 0, 0, 0, .5 );
}
#fancybox-content > div {
	width: 100% !important;
	box-sizing: border-box;
	padding: 10px 16px;
}
#fancybox-content > div::-webkit-scrollbar { width: 10px; }
#fancybox-content > div::-webkit-scrollbar-track { background: #eeeef6; }
#fancybox-content > div::-webkit-scrollbar-thumb { background: #b9b9cc; border-radius: 5px; }
#fancybox-content > div { scrollbar-color: #b9b9cc #eeeef6; scrollbar-width: thin; }
@media screen and ( max-width: 782px ) {
	html, body { overflow-x: hidden; }
	#fancybox-content > div { padding: 8px 12px; }
}

/* ---------- Мобильные/планшетные панели ---------- */
@media screen and ( max-width: 1100px ) {

	#hide_main_menu { position: relative; z-index: 9992; }

	/* ВСЕ панели закрыты: полностью убраны из потока — без разрывов */
	#menu_for_mobile,
	#zapis_on_2,
	#hide_search_form .search_form_2,
	#menu_for_mobile #zapis_on,
	#menu_for_mobile .search_form {
		display: none !important;
	}

	/* Открытое состояние */
	#menu_for_mobile.solei-panel-open,
	#zapis_on_2.solei-panel-open,
	#hide_search_form .search_form_2.solei-panel-open,
	#menu_for_mobile #zapis_on.solei-panel-open,
	#menu_for_mobile .search_form.solei-panel-open {
		display: block !important;
		max-height: 85vh;
		overflow-y: auto;
		position: relative;
		z-index: 9991;
		animation: solei-panel-in .25s ease;
	}

	/* Возвращаем кнопки «Записаться онлайн» и «поиск» внутрь меню */
	#menu_for_mobile .callb_mob,
	#menu_for_mobile .show_search { display: block !important; }

	/* Sticky-меню стили */
	#hide_main_menu.to_top_menu {
		position: fixed;
		top: 0;
		right: 0;
		left: 0;
		width: 100%;
		box-shadow: 0 4px 13px -7px #000;
		background: #fff;
		z-index: 9999;
	}

	#menu_for_mobile.gl_menu {
		position: fixed;
		top: 41px;
		z-index: 9998;
		right: 5px;
		left: 5px;
		max-height: calc(100vh - 50px);
		overflow-y: auto;
	}

	.search_form_2.gl_frm,
	#zapis_on_2.gl_frm {
		position: fixed;
		top: 41px;
		z-index: 9998;
		right: 5px;
		left: 5px;
	}
}

/* Плавное появление панелей */
@keyframes solei-panel-in {
	from { opacity: 0; transform: translateY( -8px ); }
	to   { opacity: 1; transform: none; }
}

/* Крестики закрытия: гарантированно кликабельны */
.closeform,
.close_search,
.solei-close {
	position: relative;
	z-index: 5;
	cursor: pointer;
}

/* CF7: служебный блок для скринридеров — визуально скрыт, но доступен для SR */
.wpcf7 .screen-reader-response,
.screen-reader-response {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect( 0 0 0 0 ) !important;
	border: 0 !important;
}

/* Yandex SmartCaptcha: аккуратно внутри панелей и форм */
.smartcaptcha,
[class*="smartcaptcha"] {
	display: block;
	width: 300px;
	max-width: 100%;
	margin: 8px auto;
}
.smartcaptcha iframe,
[class*="smartcaptcha"] iframe {
	max-width: 100%;
}