/* =========================================
   YFHB POPUP LEAD CAPTURE CSS
   ========================================= */
#yfhb-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13,31,51,.78);
    backdrop-filter: blur(5px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
#yfhb-popup-overlay.yfhb-visible {
    opacity: 1;
    pointer-events: all;
}
#yfhb-popup {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 820px;
    width: 100%;
    position: relative;
    transform: translateY(28px) scale(.97);
    transition: transform .38s cubic-bezier(.34,1.4,.64,1);
    box-shadow: 0 30px 80px rgba(0,0,0,.32);
    max-height: 92vh;
    overflow-y: auto;
}
#yfhb-popup-overlay.yfhb-visible #yfhb-popup {
    transform: translateY(0) scale(1);
}
#yfhb-popup-inner {
    display: grid;
    grid-template-columns: 220px 1fr;
}
#yfhb-popup-left {
    background: linear-gradient(160deg,#1A3A5C 0%,#0D1F33 100%);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
}
.popup-home-icon svg { width: 80px; height: 80px; }
.popup-left-stat {
    font-family: 'Raleway', sans-serif;
    font-size: .75rem;
    color: rgba(255,255,255,.65);
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.3;
}
.popup-left-stat span {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #C8922A;
    line-height: 1.1;
    margin-bottom: .2rem;
}
#yfhb-popup-right {
    padding: 2.25rem 2rem;
}
.popup-badge {
    display: inline-block;
    background: #C8922A;
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .2em;
    padding: .3rem .9rem;
    border-radius: 100px;
    margin-bottom: .875rem;
}
#yfhb-popup-right h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #1A3A5C;
    margin-bottom: .5rem;
    line-height: 1.25;
}
#yfhb-popup-right > p {
    font-size: .88rem;
    color: #718096;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.popup-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
.popup-field { margin-bottom: .875rem; }
.popup-field label {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2D3748;
    margin-bottom: .3rem;
}
.popup-field input,
.popup-field select {
    width: 100%;
    padding: .72rem .9rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: .9rem;
    color: #2D3748;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: 'Source Sans 3', sans-serif;
    -webkit-appearance: none;
    appearance: none;
}
.popup-field input:focus,
.popup-field select:focus {
    border-color: #C8922A;
    box-shadow: 0 0 0 3px rgba(200,146,42,.15);
}
.popup-btn-submit {
    width: 100%;
    padding: .95rem 1.5rem;
    background: #C8922A;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, transform .15s;
    margin-bottom: .875rem;
}
.popup-btn-submit:hover          { background: #a67520; transform: translateY(-1px); }
.popup-btn-submit:disabled       { opacity: .65; cursor: not-allowed; transform: none; }
.popup-trust {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: .74rem;
    color: #718096;
    margin-bottom: .875rem;
}
.popup-or {
    text-align: center;
    font-size: .78rem;
    color: #A0AEC0;
    margin-bottom: .875rem;
    position: relative;
}
.popup-or::before, .popup-or::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 28%;
    height: 1px;
    background: #E2E8F0;
}
.popup-or::before { left: 0; }
.popup-or::after  { right: 0; }
.popup-btn-call {
    display: block;
    width: 100%;
    padding: .78rem;
    text-align: center;
    background: #1A3A5C;
    color: #fff !important;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    transition: background .2s;
    text-decoration: none;
}
.popup-btn-call:hover { background: #0D1F33; }
#yfhb-popup-close {
    position: absolute;
    top: .875rem;
    right: .875rem;
    width: 32px; height: 32px;
    background: rgba(0,0,0,.12);
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    color: #fff;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}
#yfhb-popup-close:hover { background: rgba(0,0,0,.28); }
#popup-form-msg {
    padding: .75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: .88rem;
    font-weight: 600;
}
#popup-form-msg.yfhb-success { background:#f0fff4; color:#276749; border:1px solid #9ae6b4; }
#popup-form-msg.yfhb-error   { background:#fff5f5; color:#c53030; border:1px solid #feb2b2; }

/* Exit Intent Bar */
#yfhb-exit-bar {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    left: auto;
    top: auto;
    max-width: 360px;
    background: #1A3A5C;
    color: #fff;
    z-index: 9998;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(13,31,51,.35), 0 2px 8px rgba(0,0,0,.2);
    display: flex;
    flex-direction: column;
    gap: .75rem;
    font-family: 'Raleway', sans-serif;
    font-size: .88rem;
    font-weight: 600;
    border-left: 4px solid #C8922A;
    /* Hidden off-screen bottom-right, slides up when visible */
    transform: translateY(calc(100% + 2rem));
    opacity: 0;
    transition: transform .4s ease, opacity .4s ease;
    pointer-events: none;
}
#yfhb-exit-bar.yfhb-bar-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
/* Bar inner layout */
#yfhb-exit-bar-msg {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    line-height: 1.4;
    font-size: .88rem;
    color: rgba(255,255,255,.9);
}
#exit-bar-cta {
    display: inline-block;
    background: #C8922A;
    color: #fff !important;
    padding: .5rem 1.25rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: .82rem;
    white-space: nowrap;
    text-decoration: none;
    text-align: center;
    transition: background .2s;
}
#exit-bar-cta:hover { background: #a3731e; color: #fff !important; }
#yfhb-exit-bar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
    transition: color .2s;
}
#yfhb-exit-bar-close:hover { color: #fff; }

/* Mobile — full width at bottom */
@media (max-width: 640px) {
    #yfhb-exit-bar {
        left: 1rem;
        right: 1rem;
        max-width: none;
        bottom: 5rem; /* above the sticky mobile CTA bar */
    }
    #yfhb-popup-inner { grid-template-columns: 1fr; }
    #yfhb-popup-left  { display: none; }
    #yfhb-popup-right { padding: 2rem 1.5rem; }
    .popup-row        { grid-template-columns: 1fr; }
    #yfhb-popup-close { background: rgba(0,0,0,.2); color: #333; }
}
