/* callback - «Заказать звонок»: header pill, phone-dropdown item, menu-overlay button, floating button
   and the modal (functions.php wp_footer, assets/callback.js). Loaded after style.css. */

/* ---------- Header pill (wide screens only; the header row is already full below this) ---------- */

.site-header__callback {
	display: none;
	align-items: center;
	min-height: 2.75rem;
	padding: 0 1.25rem;
	border: 2px solid var(--wp--preset--color--coral);
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--coral);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.site-header__callback:hover,
.site-header__callback:focus-visible {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--base);
}

@media (min-width: 1281px) {
	.site-header__callback { display: inline-flex; }
	.site-header__bar.search-open .site-header__callback { display: none; }
}

/* ---------- Same action inside the phone dropdown and the full-screen menu ---------- */

.site-header__phone-dropdown-callback {
	width: 100%;
	align-items: flex-start;
	border: 0;
	background: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.site-header__nav-overlay-callback {
	flex: 1 1 100%;
	min-height: 48px;
	padding: 0 24px;
	border: 2px solid var(--wp--preset--color--coral);
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--coral);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.site-header__nav-overlay-callback:hover,
.site-header__nav-overlay-callback:focus-visible {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--base);
}

/* ---------- Floating button ---------- */

.callback-fab {
	position: fixed;
	right: clamp(16px, 2.5vw, 28px);
	bottom: clamp(16px, 2.5vw, 28px);
	z-index: 55;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--base);
	box-shadow: 0 8px 22px rgba(155, 3, 35, 0.4), 0 2px 6px rgba(43, 43, 43, 0.18);
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.callback-fab:hover { background: #7f0219; transform: scale(1.06); }

.callback-fab:focus-visible {
	outline: 3px solid var(--wp--preset--color--contrast);
	outline-offset: 3px;
}

/* The cookie notice sits in the same corner: lift the button above it while it shows */
.has-cookie-notice .callback-fab { bottom: 100px; }

@media (max-width: 600px) {
	.has-cookie-notice .callback-fab { bottom: 212px; }
}

/* ---------- Modal ---------- */

body.callback-open { overflow: hidden; }

.callback-dialog {
	box-sizing: border-box;
	width: min(28rem, 100% - 32px);
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 36px 32px 32px;
	overflow-y: auto;
	border: 0;
	border-radius: 28px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	box-shadow: 0 24px 64px rgba(43, 43, 43, 0.35);
}

.callback-dialog::backdrop {
	background: rgba(43, 43, 43, 0.6);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.callback-dialog__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: inherit;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.callback-dialog__close:hover { background: rgba(43, 43, 43, 0.08); }

.callback-dialog__title {
	margin: 0 44px 8px 0;
	font-size: clamp(1.6rem, 4vw, 2rem);
	line-height: 1.15;
}

.callback-dialog__lead {
	margin: 0 0 22px;
	font-size: 1.0625rem;
	line-height: 1.5;
}

.callback-form[hidden],
.callback-done[hidden] { display: none; }

.callback-field {
	display: block;
	margin: 0 0 16px;
	font-size: 1rem;
	line-height: 1.4;
}

.callback-field > span { display: block; margin-bottom: 6px; }

.callback-field input,
.callback-field select {
	box-sizing: border-box;
	width: 100%;
	min-height: 50px;
	padding: 12px 16px;
	border: 1px solid rgba(43, 43, 43, 0.22);
	border-radius: 14px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 1.0625rem;
}

.callback-field input:focus,
.callback-field select:focus {
	outline: none;
	border-color: var(--wp--preset--color--coral);
	box-shadow: 0 0 0 3px rgba(155, 3, 35, 0.14);
}

.callback-form [aria-invalid="true"] {
	border-color: var(--wp--preset--color--coral);
	box-shadow: 0 0 0 3px rgba(155, 3, 35, 0.14);
}

/* Honeypot: out of sight and out of the tab order, but present for bots */
.callback-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.callback-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 4px 0 6px;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.callback-consent input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--wp--preset--color--coral);
}

.callback-consent a { color: var(--wp--preset--color--coral); }

.callback-status {
	min-height: 1.4em;
	margin: 6px 0 12px;
	color: var(--wp--preset--color--coral);
	font-size: 0.9375rem;
	line-height: 1.4;
}

.callback-submit {
	width: 100%;
	min-height: 52px;
	cursor: pointer;
}

.callback-submit:disabled { opacity: 0.6; cursor: progress; }

.callback-done {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	color: var(--wp--preset--color--coral);
}

.callback-done .callback-dialog__title { margin: 12px 0 8px; }
.callback-done .callback-dialog__lead { color: var(--wp--preset--color--contrast); }
.callback-done .callback-submit { color: var(--wp--preset--color--base); }

@media (max-width: 600px) {
	.callback-dialog { padding: 32px 20px 24px; border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.callback-fab,
	.site-header__callback { transition: none; }
}
