/* ============================================================
 SELL CHICAGO PROPERTIES - Unified CTA Funnel
 - Sticky bottom-right primary CTA on every page
 - Single 1-modal funnel: Book → Time slot (Google Calendar) →
 Name+Phone+Email → POF upload → Confirm
 - Mobile-first, accessibility tab-trapped
 ============================================================ */

/* === STICKY PRIMARY CTA === */
.fnl-cta-trigger {
 position: fixed;
 bottom: 24px;
 right: 24px;
 z-index: 9000;
 background: var(--color-accent, #D4A843);
 color: var(--color-navy, #1B2A4A);
 border: none;
 border-radius: 999px;
 padding: 14px 22px 14px 18px;
 font-family: inherit;
 font-size: 15px;
 font-weight: 700;
 letter-spacing: 0.02em;
 box-shadow: 0 14px 36px -10px rgba(27, 42, 74, 0.45),
 0 6px 14px -6px rgba(0, 0, 0, 0.25);
 cursor: pointer;
 display: inline-flex;
 align-items: center;
 gap: 10px;
 transition: transform 0.22s ease, box-shadow 0.22s ease;
 -webkit-tap-highlight-color: transparent;
}
.fnl-cta-trigger:hover,
.fnl-cta-trigger:focus-visible {
 transform: translateY(-2px);
 box-shadow: 0 18px 44px -10px rgba(27, 42, 74, 0.55),
 0 8px 18px -6px rgba(0, 0, 0, 0.3);
 outline: none;
}
.fnl-cta-trigger__icon {
 width: 22px; height: 22px;
 border-radius: 50%;
 background: var(--color-navy, #1B2A4A);
 color: var(--color-accent, #D4A843);
 display: inline-flex; align-items: center; justify-content: center;
 font-size: 12px;
}
.fnl-cta-trigger__pulse {
 position: absolute;
 inset: -4px;
 border-radius: 999px;
 border: 2px solid rgba(212, 168, 67, 0.5);
 animation: fnlPulse 2.4s ease-out infinite;
 pointer-events: none;
}
@keyframes fnlPulse {
 0% { transform: scale(0.92); opacity: 0.9; }
 70% { transform: scale(1.18); opacity: 0; }
 100% { transform: scale(1.18); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
 .fnl-cta-trigger__pulse { animation: none; opacity: 0; }
}
@media (max-width: 540px) {
 .fnl-cta-trigger { bottom: 16px; right: 16px; padding: 12px 18px 12px 14px; font-size: 14px; }
}

/* === MODAL CONTAINER === */
.fnl-modal {
 position: fixed; inset: 0;
 z-index: 9500;
 background: rgba(15, 22, 38, 0.7);
 backdrop-filter: blur(6px);
 -webkit-backdrop-filter: blur(6px);
 display: flex; align-items: flex-start; justify-content: center;
 padding: 5vh 16px 16px;
 overflow-y: auto;
 opacity: 0;
 pointer-events: none;
 transition: opacity 0.22s ease;
}
.fnl-modal[data-open="true"] {
 opacity: 1;
 pointer-events: auto;
}
.fnl-modal__panel {
 background: #FAF8F5;
 border-radius: 8px;
 width: 100%;
 max-width: 560px;
 box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.55);
 overflow: hidden;
 transform: translateY(20px);
 transition: transform 0.28s ease;
 position: relative;
}
.fnl-modal[data-open="true"] .fnl-modal__panel { transform: translateY(0); }

.fnl-modal__close {
 position: absolute;
 top: 12px; right: 12px;
 width: 44px; height: 44px;
 border: none;
 background: transparent;
 color: #FAF8F5;
 font-size: 28px;
 line-height: 1;
 cursor: pointer;
 z-index: 2;
 border-radius: 50%;
 display: flex; align-items: center; justify-content: center;
 transition: background 0.18s ease;
}
.fnl-modal__close:hover { background: rgba(255,255,255,0.15); }

/* === HEADER === */
.fnl-modal__hdr {
 background: var(--color-navy, #1B2A4A);
 color: #FAF8F5;
 padding: 28px 28px 22px;
}
.fnl-modal__step-tag {
 font-size: 11px;
 letter-spacing: 0.18em;
 text-transform: uppercase;
 color: var(--color-accent, #D4A843);
 font-weight: 600;
 margin: 0 0 8px;
}
.fnl-modal__title {
 font-family: 'Cormorant Garamond', Georgia, serif;
 font-size: 28px;
 font-weight: 500;
 line-height: 1.18;
 margin: 0 0 8px;
 color: #FAF8F5;
}
.fnl-modal__sub {
 font-size: 14.5px;
 line-height: 1.55;
 color: #CFC9BD;
 margin: 0;
}

/* === PHASE STEPPER === */
.fnl-steps {
 display: flex;
 gap: 6px;
 padding: 14px 28px 0;
 background: var(--color-navy, #1B2A4A);
}
.fnl-step {
 flex: 1;
 height: 4px;
 background: rgba(255,255,255,0.12);
 border-radius: 2px;
 transition: background 0.3s ease;
}
.fnl-step.is-active { background: var(--color-accent, #D4A843); }
.fnl-step.is-done { background: var(--color-accent, #D4A843); }

/* === BODY === */
.fnl-modal__body { padding: 26px 28px; }
.fnl-phase { display: none; }
.fnl-phase.is-active { display: block; }

/* Phase 1 - quick gate */
.fnl-row {
 display: grid;
 gap: 12px;
 grid-template-columns: 1fr 1fr;
 margin-bottom: 12px;
}
@media (max-width: 480px) {
 .fnl-row { grid-template-columns: 1fr; }
}
.fnl-field { display: block; }
.fnl-field__label {
 display: block;
 font-size: 11px;
 letter-spacing: 0.12em;
 text-transform: uppercase;
 color: #6B6B6B;
 font-weight: 600;
 margin-bottom: 5px;
}
.fnl-field input,
.fnl-field select,
.fnl-field textarea {
 width: 100%;
 border: 1px solid var(--color-border, #E5E1D8);
 background: #fff;
 border-radius: 4px;
 padding: 12px 14px;
 font-family: inherit;
 font-size: 16px; /* 16px kills iOS zoom on focus */
 line-height: 1.4;
 color: #1B2A4A;
 transition: border-color 0.18s ease, box-shadow 0.18s ease;
 box-sizing: border-box;
}
.fnl-field input:focus,
.fnl-field select:focus,
.fnl-field textarea:focus {
 outline: none;
 border-color: var(--color-accent, #D4A843);
 box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

/* Calendar embed wrapper */
.fnl-cal-wrap {
 border: 1px solid var(--color-border, #E5E1D8);
 border-radius: 6px;
 overflow: hidden;
 background: #fff;
 margin-bottom: 16px;
 min-height: 720px;
}
.fnl-cal-wrap iframe,
.fnl-cal-wrap .calendly-inline-widget {
 display: block;
 width: 100%;
 height: 720px;
 min-height: 720px;
 border: 0;
}
@media (max-width: 540px) {
 .fnl-cal-wrap,
 .fnl-cal-wrap iframe,
 .fnl-cal-wrap .calendly-inline-widget { min-height: 820px; height: 820px; }
}
.fnl-cal-fallback {
 padding: 22px 18px;
 text-align: center;
}
.fnl-cal-fallback a {
 display: inline-block;
 background: var(--color-accent, #D4A843);
 color: var(--color-navy, #1B2A4A);
 font-weight: 700;
 padding: 12px 22px;
 border-radius: 4px;
 text-decoration: none;
 margin-top: 12px;
}

/* POF upload */
.fnl-pof {
 background: #fff;
 border: 1px dashed #B5AB8E;
 border-radius: 6px;
 padding: 18px 16px;
 text-align: center;
}
.fnl-pof input[type=file] {
 display: block;
 margin: 8px auto 0;
 font-size: 14px;
 max-width: 100%;
}
.fnl-pof__or {
 font-size: 13px;
 color: #6B6B6B;
 margin: 14px 0 6px;
}
.fnl-pof__email a {
 color: var(--color-navy, #1B2A4A);
 font-weight: 600;
 text-decoration: underline;
}

/* Consent line */
.fnl-consent {
 display: flex;
 gap: 10px;
 align-items: flex-start;
 font-size: 12.5px;
 line-height: 1.5;
 color: #4A4A4A;
 margin: 14px 0 0;
}
.fnl-consent input { margin-top: 3px; }
.fnl-error {
 border: 1px solid rgba(201, 42, 42, 0.28);
 background: rgba(201, 42, 42, 0.08);
 color: #7A1E1E;
 border-radius: 4px;
 padding: 12px 14px;
 font-size: 13px;
 line-height: 1.5;
 margin: 14px 0 0;
}
.fnl-error[hidden] { display: none; }
.fnl-error a {
 color: #7A1E1E;
 font-weight: 700;
}

/* Footer action bar */
.fnl-actions {
 display: flex;
 justify-content: space-between;
 gap: 12px;
 margin-top: 20px;
}
.fnl-btn {
 border: none;
 border-radius: 4px;
 padding: 13px 22px;
 font-family: inherit;
 font-size: 15px;
 font-weight: 600;
 cursor: pointer;
 -webkit-tap-highlight-color: transparent;
 min-height: 44px;
}
.fnl-btn--primary {
 background: var(--color-accent, #D4A843);
 color: var(--color-navy, #1B2A4A);
}
.fnl-btn--primary:hover { filter: brightness(1.05); }
.fnl-btn--ghost {
 background: transparent;
 color: var(--color-navy, #1B2A4A);
 border: 1px solid var(--color-border, #E5E1D8);
}
.fnl-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Phase 3 - confirmation */
.fnl-confirm {
 text-align: center;
 padding: 12px 4px 4px;
}
.fnl-confirm__check {
 width: 64px; height: 64px;
 margin: 0 auto 16px;
 background: var(--color-accent, #D4A843);
 color: var(--color-navy, #1B2A4A);
 border-radius: 50%;
 display: flex; align-items: center; justify-content: center;
 font-size: 30px; font-weight: 700;
}
.fnl-confirm h3 {
 font-family: 'Cormorant Garamond', Georgia, serif;
 font-size: 26px;
 color: var(--color-navy, #1B2A4A);
 margin: 0 0 10px;
 font-weight: 500;
}
.fnl-confirm p {
 font-size: 15px;
 line-height: 1.6;
 color: #2A2A2A;
 margin: 0 0 8px;
}

/* Direct contact strip in confirm */
.fnl-direct {
 margin-top: 22px;
 padding-top: 18px;
 border-top: 1px solid var(--color-border, #E5E1D8);
 display: flex;
 justify-content: center;
 gap: 16px;
 font-size: 14px;
}
.fnl-direct a {
 color: var(--color-navy, #1B2A4A);
 text-decoration: none;
 font-weight: 600;
 padding: 6px 10px;
 border-radius: 4px;
}
.fnl-direct a:hover { background: rgba(212,168,67,0.12); }

/* Lock body scroll when open */
body.fnl-locked { overflow: hidden; touch-action: none; }
