/* ==========================================================================
   Vakil Hooshmand — popups (modal, corner slide-in, bottom sheet)
   ========================================================================== */
.vh-pop {
	--_c: var(--vh-maroon);
	--_c2: var(--vh-maroon-700);
	--_soft: var(--vh-maroon-50);
	position: fixed; inset: 0; z-index: 99990; display: grid; place-items: center; padding: 20px;
	font-family: var(--vh-font);
}
.vh-pop[hidden] { display: none; }
.vh-pop--green { --_c: var(--vh-green); --_c2: var(--vh-green-800); --_soft: var(--vh-green-50); }
.vh-pop--gold { --_c: #9A7740; --_c2: #6E5225; --_soft: var(--vh-gold-50); }
.vh-pop--light { --_c: var(--vh-maroon); --_c2: var(--vh-maroon-700); --_soft: var(--vh-cream); }

/* Backdrop */
.vh-pop__backdrop {
	position: absolute; inset: 0; background: rgba(22, 14, 18, .58);
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	opacity: 0; transition: opacity .35s ease;
}
.vh-pop.is-open .vh-pop__backdrop { opacity: 1; }

/* Box */
.vh-pop__box {
	position: relative; z-index: 1; width: min(460px, 100%); max-height: calc(100vh - 40px); overflow: auto;
	display: grid; border-radius: 28px; background: #fff; outline: none;
	box-shadow: 0 40px 90px -20px rgba(20, 10, 14, .45), 0 0 0 1px rgba(184, 148, 90, .18);
	opacity: 0; transform: translateY(24px) scale(.96);
	transition: opacity .35s cubic-bezier(.22, .61, .36, 1), transform .45s cubic-bezier(.22, 1.2, .36, 1);
}
.vh-pop.is-open .vh-pop__box { opacity: 1; transform: none; }
.vh-pop.is-closing .vh-pop__box { opacity: 0; transform: translateY(14px) scale(.98); transition-duration: .2s; }
.vh-pop.is-closing .vh-pop__backdrop { opacity: 0; }

.vh-pop--media .vh-pop__box { width: min(780px, 100%); grid-template-columns: 1fr 1.15fr; }
.vh-pop__media { position: relative; min-height: 100%; background: var(--_soft); }
.vh-pop__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Body with colored header band */
.vh-pop__body { position: relative; overflow: hidden; padding: 0 32px 28px; text-align: center; }
.vh-pop__body::before {
	content: ""; position: absolute; inset: 0 0 auto; height: 112px;
	background:
		radial-gradient(circle at 15% -20%, rgba(255, 255, 255, .22), transparent 45%),
		linear-gradient(135deg, var(--_c), var(--_c2));
}
.vh-pop--light .vh-pop__body::before { background: linear-gradient(180deg, var(--vh-cream), #fff); border-bottom: 1px solid var(--vh-border); }
.vh-pop__decor span { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); pointer-events: none; }
.vh-pop__decor span:first-child { width: 180px; height: 180px; top: -90px; right: -50px; }
.vh-pop__decor span:last-child { width: 110px; height: 110px; top: 20px; left: -40px; border-color: rgba(212, 180, 124, .4); }
.vh-pop--light .vh-pop__decor span { border-color: rgba(184, 148, 90, .3); }

.vh-pop__icon {
	position: relative; z-index: 1; display: grid; place-items: center; width: 84px; height: 84px; margin: 66px auto 0;
	border-radius: 26px; background: #fff; color: var(--_c);
	box-shadow: 0 16px 34px -12px rgba(20, 10, 14, .35), 0 0 0 6px rgba(255, 255, 255, .55);
	animation: vh-pop-bob 4s ease-in-out infinite;
}
.vh-pop__icon .vh-icon { width: 38px; height: 38px; }
@keyframes vh-pop-bob { 50% { transform: translateY(-4px); } }
/* No icon: push the first text below the colored band. */
.vh-pop__decor + .vh-pop__eyebrow, .vh-pop__decor + .vh-pop__title { margin-top: 128px; }
.vh-pop--slide .vh-pop__decor + .vh-pop__eyebrow, .vh-pop--slide .vh-pop__decor + .vh-pop__title { margin-top: 100px; }
.vh-pop--sheet .vh-pop__decor + .vh-pop__eyebrow, .vh-pop--sheet .vh-pop__decor + .vh-pop__title { margin-top: 0; }

.vh-pop__eyebrow {
	position: relative; display: inline-flex; align-items: center; gap: 6px; margin: 16px 0 0; padding: 4px 14px; border-radius: 999px;
	background: var(--_soft); color: var(--_c); font-size: 12.5px; font-weight: 800;
}
.vh-pop__title { position: relative; margin: 12px 0 8px; font-size: clamp(20px, 3.4vw, 24px); font-weight: 900; line-height: 1.6; color: var(--vh-text); }
.vh-pop__text { position: relative; margin: 0 auto 22px; max-width: 380px; color: var(--vh-muted); font-size: 15px; line-height: 2.05; }
.vh-pop__actions { position: relative; display: flex; flex-direction: column; gap: 8px; }
.vh-pop__btn { width: 100%; }
.vh-pop__btn.vh-btn--primary { --_bg: var(--_c); --_bd: var(--_c); }
.vh-pop__btn.vh-btn--primary:hover { --_bg: var(--_c2); --_bd: var(--_c2); }
.vh-pop__btn .vh-icon { width: 18px; height: 18px; transition: transform .2s; }
.vh-pop__btn:hover .vh-icon { transform: translateX(-4px); }
.vh-pop__btn--alt { color: var(--vh-muted); min-height: 44px; }
.vh-pop__note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px 0 0; color: var(--vh-muted); font-size: 12.5px; }
.vh-pop__note .vh-icon { width: 15px; height: 15px; color: var(--vh-success); }
.vh-pop__dismiss { margin-top: 10px; border: 0; background: none; color: #A39B91; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.vh-pop__dismiss:hover { color: var(--_c); }

.vh-pop__close {
	position: absolute; top: 14px; left: 14px; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center;
	border: 0; border-radius: 12px; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer;
	backdrop-filter: blur(4px); transition: background-color .2s, transform .2s;
}
.vh-pop__close:hover { background: rgba(255, 255, 255, .32); transform: rotate(90deg); }
.vh-pop__close .vh-icon { width: 18px; height: 18px; }
.vh-pop--light .vh-pop__close, .vh-pop--media .vh-pop__close { background: rgba(30, 24, 16, .06); color: var(--vh-muted); }
.vh-pop--media .vh-pop__close { background: rgba(255, 255, 255, .85); }

/* Slide-in card (bottom start corner, does not block the page) */
.vh-pop--slide { inset: auto 24px 24px auto; padding: 0; display: block; }
.vh-pop--slide .vh-pop__box { width: 360px; border-radius: 24px; transform: translateY(40px); }
.vh-pop--slide .vh-pop__body::before { height: 84px; }
.vh-pop--slide .vh-pop__icon { width: 64px; height: 64px; margin: 50px auto 0; border-radius: 20px; }
.vh-pop--slide .vh-pop__icon .vh-icon { width: 28px; height: 28px; }
.vh-pop--slide .vh-pop__title { font-size: 18px; }
.vh-pop--slide .vh-pop__text { font-size: 14px; margin-bottom: 16px; }
.vh-pop--slide .vh-pop__body { padding: 0 22px 20px; }

/* Bottom sheet (full width bar) */
.vh-pop--sheet { inset: auto 0 0 0; padding: 0; display: block; }
.vh-pop--sheet .vh-pop__box { width: 100%; max-width: none; border-radius: 26px 26px 0 0; transform: translateY(100%); }
.vh-pop--sheet .vh-pop__body { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 20px; padding: 22px max(24px, calc((100vw - 1240px) / 2)); text-align: start; }
.vh-pop--sheet .vh-pop__body::before { height: 100%; opacity: .07; }
.vh-pop--sheet .vh-pop__decor { display: none; }
.vh-pop--sheet .vh-pop__icon { grid-row: span 3; margin: 0; width: 64px; height: 64px; border-radius: 20px; background: var(--_c); color: #fff; box-shadow: none; }
.vh-pop--sheet .vh-pop__eyebrow, .vh-pop--sheet .vh-pop__title, .vh-pop--sheet .vh-pop__text { grid-column: 2; margin: 0; justify-self: start; }
.vh-pop--sheet .vh-pop__text { max-width: none; }
.vh-pop--sheet .vh-pop__actions { grid-column: 3; grid-row: 1 / span 3; flex-direction: row; }
.vh-pop--sheet .vh-pop__btn { width: auto; }
.vh-pop--sheet .vh-pop__note, .vh-pop--sheet .vh-pop__dismiss { grid-column: 2; justify-self: start; margin: 0; }
.vh-pop--sheet .vh-pop__close { top: 10px; left: 10px; background: rgba(30, 24, 16, .06); color: var(--vh-muted); }

/* Mobile: modal becomes a bottom sheet */
@media (max-width: 640px) {
	.vh-pop--modal { place-items: end center; padding: 0; }
	.vh-pop--modal .vh-pop__box { width: 100%; border-radius: 28px 28px 0 0; transform: translateY(100%); max-height: 92vh; }
	.vh-pop--modal.is-open .vh-pop__box { transform: none; }
	.vh-pop--media .vh-pop__box { grid-template-columns: 1fr; }
	.vh-pop--media .vh-pop__media { min-height: 160px; }
	.vh-pop__body { padding: 0 20px calc(22px + env(safe-area-inset-bottom)); }
	.vh-pop--slide { inset: auto 12px 12px 12px; }
	.vh-pop--slide .vh-pop__box { width: 100%; }
	.vh-pop--sheet .vh-pop__body { grid-template-columns: auto 1fr; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); }
	.vh-pop--sheet .vh-pop__actions { grid-column: 1 / -1; grid-row: auto; flex-direction: column; }
	.vh-pop--sheet .vh-pop__btn { width: 100%; }
}

body.vh-pop-lock { overflow: hidden; }
/* Keep the floating chat launcher from covering a modal popup. */
body.vh-pop-lock .vh-chat:not(.is-open) { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
	.vh-pop__box, .vh-pop__backdrop { transition: none; }
	.vh-pop__icon { animation: none; }
}
