/* GoldLine lead forms — дизайн як на маркетинговому сайті, палітра меблів */
:root {
	--gl-accent: #bdad7b;
	--gl-accent-soft: #d4c9a8;
	--gl-accent-dark: #615328;
	--gl-glow: rgba(189, 173, 123, 0.18);
	--gl-glow-strong: rgba(189, 173, 123, 0.28);
}

/* ── Бічна панель форми (як lead-modal на маркетингу) ── */
.lead-modal {
	--lm-accent: var(--gl-accent);
	--lm-accent-soft: var(--gl-accent-soft);
	--lm-glow-strong: var(--gl-glow-strong);
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
	box-sizing: border-box;
	visibility: hidden;
	pointer-events: none;
	padding: 0;
}

.lead-modal.lead-modal--visible {
	visibility: visible;
}

.lead-modal.is-open {
	pointer-events: auto;
}

.lead-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 8, 6, 0.82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.lead-modal.is-open .lead-modal__backdrop {
	opacity: 1;
}

.lead-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(720px, max(520px, 46vw));
	max-width: 100%;
	height: 100%;
	max-height: 100dvh;
	display: flex;
	flex-direction: column;
	border-radius: 24px 0 0 24px;
	overflow: hidden;
	box-shadow:
		-18px 0 50px rgba(0, 0, 0, 0.5),
		0 0 0 1px rgba(189, 173, 123, 0.12);
	transform: translate3d(105%, 0, 0);
	transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.lead-modal.is-open .lead-modal__dialog {
	transform: translate3d(0, 0, 0);
}

.lead-modal__panel {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: linear-gradient(195deg, #2a2318 0%, #181612 42%, #0c0b09 100%);
}

.lead-modal__panel::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: min(55%, 220px);
	height: min(42%, 200px);
	background: radial-gradient(circle at 100% 0%, var(--lm-glow-strong) 0%, transparent 72%);
	pointer-events: none;
	z-index: 0;
}

.lead-modal__sheet-inner {
	position: relative;
	z-index: 1;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 4.5vh, 40px) clamp(22px, 3.5vw, 44px) max(28px, env(safe-area-inset-bottom, 0px));
	padding-top: max(60px, env(safe-area-inset-top, 0px));
	box-sizing: border-box;
}

.lead-modal__main {
	position: relative;
	z-index: 2;
	flex: 0 1 auto;
	min-height: 0;
}

.lead-modal__close {
	position: absolute;
	top: max(14px, env(safe-area-inset-top, 0px));
	right: max(14px, env(safe-area-inset-right, 0px));
	z-index: 10;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #f5f0e6;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.22s ease, color 0.22s ease, transform 0.2s ease;
	padding: 0;
}

.lead-modal__close:hover {
	background: rgba(189, 173, 123, 0.18);
	color: #fff;
}

.lead-modal__close:focus-visible {
	outline: 2px solid var(--lm-accent);
	outline-offset: 2px;
}

.lead-modal__close:active {
	transform: scale(0.96);
}

/* ── Form card (shared: modal + sidebar) ── */
.cta-lead-form-card {
	position: relative;
	padding: 0;
	border-radius: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

.lead-modal .cta-lead-form-card {
	padding: 0;
}

.lead-modal .cta-lead-form-card__head h3 {
	padding-right: 48px;
}

.cta-lead-form-card__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 24px;
}

.cta-lead-form-card__icon {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: var(--gl-accent);
	background: rgba(189, 173, 123, 0.14);
	border: 1px solid rgba(189, 173, 123, 0.32);
	flex-shrink: 0;
}

.cta-lead-form-card__head h3,
.cta-lead-form-card__head .detail-title {
	font-size: 22px;
	line-height: 1.35;
	font-weight: 600;
	text-transform: none;
	color: #fff;
	margin: 0;
}

.cta-lead-form-card__head p {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #fff;
}

.cta-lead-form-card .form-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: #fff;
	margin-bottom: 8px;
}

.cta-lead-form-card .form-control {
	width: 100%;
	padding: 14px 16px;
	border-radius: 12px;
	font-size: 15px;
	color: #fff;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	box-sizing: border-box;
}

.cta-lead-form-card .form-control:focus {
	outline: none;
	border-color: rgba(189, 173, 123, 0.5);
	box-shadow: 0 0 0 3px rgba(189, 173, 123, 0.12);
	background: rgba(0, 0, 0, 0.42);
}

.cta-lead-form-card .form-control::placeholder {
	color: rgba(255, 255, 255, 0.38);
}

.cta-lead-form-card textarea.form-control {
	min-height: 100px;
	resize: vertical;
}

.cta-lead-form-card .form-group {
	margin-bottom: 18px;
}

.cta-lead-form-card__submit-wrap {
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	margin-top: 6px;
	margin-bottom: 0;
}

/* Вузька плашка з фото — під кнопкою, на всю ширину форми */
.lead-modal .gl-lead-form .lead-modal__visual,
.lead-modal .gl-lead-form__visual {
	flex-shrink: 0;
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 14px 0 0;
	padding: 0;
	height: clamp(68px, 20vw, 88px);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
	pointer-events: none;
}

.lead-modal .gl-lead-form .lead-modal__visual img,
.lead-modal .gl-lead-form__visual img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: center center;
	box-shadow: none;
}

.cta-lead-form-card__submit-wrap::after {
	content: '';
	position: absolute;
	top: 0;
	left: -120%;
	width: 55%;
	height: 100%;
	background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.35) 48%, transparent 100%);
	transform: skewX(-18deg);
	animation: glLeadBtnShimmer 3.2s ease-in-out infinite;
	pointer-events: none;
	z-index: 2;
}

@keyframes glLeadBtnShimmer {
	0%, 72% { left: -120%; }
	100% { left: 140%; }
}

.cta-lead-form-card button[type="submit"].btn-default,
.cta-lead-form-card button[type="submit"].btn-solid {
	display: block;
	width: 100%;
	text-align: center;
	padding: 18px 22px;
	font-size: clamp(12px, 1.5vw, 14px) !important;
	line-height: 1.35 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	white-space: normal !important;
	border-radius: 14px !important;
	position: relative;
	z-index: 1;
}

.cta-lead-form-card button[type="submit"].btn-default::before,
.cta-lead-form-card button[type="submit"].btn-solid::before {
	display: none;
}

.cta-lead-form-card button[type="submit"]:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* ── Sidebar variant (portfolio / blog) ── */
.gl-lead-form-card--sidebar {
	padding: 28px 24px 24px;
	border-radius: 22px;
	background:
		radial-gradient(ellipse 70% 60% at 100% 0%, rgba(189, 173, 123, 0.22) 0%, transparent 55%),
		linear-gradient(145deg, #4a4338 0%, #3d3830 48%, #353028 100%);
	border: 1px solid rgba(189, 173, 123, 0.32);
	box-shadow:
		0 16px 40px rgba(53, 48, 40, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gl-lead-form-card--sidebar::before {
	content: '';
	position: absolute;
	top: 0;
	left: 24px;
	right: 24px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(189, 173, 123, 0.55), transparent);
}

.gl-lead-form-card--sidebar {
	position: relative;
	overflow: hidden;
}

.gl-lead-form-card--sidebar .detail-sidebar-box {
	margin-bottom: 0;
	background: transparent;
	border: 0;
	padding: 0;
}

.gl-lead-form-card--sidebar .detail-input + .detail-input {
	margin-top: 0;
}

.gl-lead-form-card--sidebar .detail-input .form-control {
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-left: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	padding: 14px 16px;
	height: auto;
	min-height: 48px;
}

.gl-lead-form-card--sidebar .detail-input .form-control:focus {
	border-color: rgba(189, 173, 123, 0.5);
	box-shadow: 0 0 0 3px rgba(189, 173, 123, 0.12);
}

.gl-lead-form-card--sidebar .detail-input .btn-solid {
	width: 100%;
	height: auto;
	min-height: 52px;
	line-height: 1.35;
	border-radius: 14px;
	padding: 16px 22px;
	background: linear-gradient(90deg, var(--gl-accent-soft) 0%, var(--gl-accent) 100%);
	border: 0;
	color: #1a1814;
	font-weight: 600;
	font-size: 14px;
	text-transform: none;
}

.gl-lead-form-card--sidebar .detail-input .btn-solid:hover {
	filter: brightness(1.08);
}

/* ── Footer quick capture ── */
.footer-newsletter-form .gl-lead-footer-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer-newsletter-form .gl-lead-footer-form .form-label {
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.75);
	margin-bottom: 0;
}

.footer-newsletter-form .gl-lead-footer-form .form-group {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 0;
	margin: 0;
	border-radius: 0;
	overflow: visible;
	border: none;
	border-bottom: 1px solid var(--dark-divider-color, rgba(255, 255, 255, 0.1));
	background: transparent;
}

.footer-newsletter-form .gl-lead-footer-form .form-control {
	flex: 1;
	width: calc(100% - 48px);
	border: 0;
	border-radius: 0;
	background: transparent;
	padding: 10px 20px 25px 0;
	color: var(--white-color, #fff);
	font-size: 16px;
	line-height: 1.4;
	box-shadow: none;
}

.footer-newsletter-form .gl-lead-footer-form .form-control::placeholder {
	color: var(--white-color, #fff);
	opacity: 0.4;
}

.footer-newsletter-form .gl-lead-footer-form .form-control:focus {
	outline: none;
	box-shadow: none;
}

.footer-newsletter-form .gl-lead-footer-form .newsletter-btn {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	border-left: none;
	background: linear-gradient(to right, var(--accent-secondary-color, #bdad7b) 0%, var(--accent-color, #615328) 50%, var(--accent-secondary-color, #bdad7b) 100%);
	background-size: 200% auto;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-position 0.4s ease-in-out;
}

.footer-newsletter-form .gl-lead-footer-form .newsletter-btn img {
	width: 14px;
	height: auto;
	display: block;
	transition: transform 0.4s ease-in-out;
}

.footer-newsletter-form .gl-lead-footer-form .newsletter-btn:hover {
	background-position: right;
	filter: none;
}

.footer-newsletter-form .gl-lead-footer-form .newsletter-btn:hover img {
	transform: rotate(45deg);
}

/* ── Адаптив (як lead-modal маркетингу) ── */
@media (min-width: 768px) {
	.lead-modal .gl-lead-form .lead-modal__visual,
	.lead-modal .gl-lead-form__visual {
		margin-top: 16px;
		height: clamp(200px, 9vw, 108px);
		border-radius: 12px;
	}
}

@media (max-width: 991.98px) {
	.lead-modal__dialog {
		width: min(640px, 100%);
	}
}

@media (max-width: 767.98px) {
	.lead-modal__dialog {
		width: 100%;
		max-width: 100%;
		border-radius: 0;
		min-height: 100dvh;
		min-height: -webkit-fill-available;
	}

	.lead-modal__sheet-inner {
		padding-top: max(56px, env(safe-area-inset-top, 0px));
		padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
		padding-left: max(18px, env(safe-area-inset-left, 0px));
		padding-right: max(18px, env(safe-area-inset-right, 0px));
	}

	.cta-lead-form-card__head h3,
	.cta-lead-form-card__head .detail-title {
		font-size: clamp(1rem, 5.4vw, 1.22rem);
		padding-right: 54px;
	}

	.lead-modal .gl-lead-form .lead-modal__visual,
	.lead-modal .gl-lead-form__visual {
		margin-top: 12px;
		height: clamp(150px, 18vw, 80px);
	}

	.gl-lead-form-card--sidebar {
		padding: 22px 18px 20px;
	}
}

body.lead-modal-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.lead-modal__backdrop,
	.lead-modal__dialog,
	.lead-modal__close {
		transition-duration: 0.01ms !important;
	}

	.lead-modal__dialog {
		transform: none;
	}

	.cta-lead-form-card__submit-wrap::after {
		animation: none;
	}
}
