/* ============================================================
   SmileCare — Engagement Features
   1. Sticky "Get Started" CTA bar (appears on scroll)
   2. Exit-intent popup with soft offer
   ============================================================ */

/* =============================================
   1. STICKY CTA BAR
   ============================================= */
.sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: #fff;
    border-top: 1px solid var(--slate-200);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, .10);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.sticky-bar.show {
    transform: translateY(0);
}
.sticky-bar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.sticky-bar-msg {
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-800);
    min-width: 0;
    line-height: 1.35;
}
.sticky-bar-msg .sticky-bar-sub {
    display: block;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--slate-500);
    margin-top: 2px;
}
.sticky-bar-ctas {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.sticky-bar-ctas .btn {
    padding: 10px 22px;
    font-size: 14px;
    border-radius: 9px;
    white-space: nowrap;
}
.sticky-bar-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--slate-100);
    color: var(--slate-500);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background .2s ease, color .2s ease;
}
.sticky-bar-close:hover {
    background: var(--slate-200);
    color: var(--slate-700);
}

/* Responsive */
@media (max-width: 720px) {
    .sticky-bar-msg .sticky-bar-sub { display: none; }
    .sticky-bar-msg { font-size: 13.5px; }
    .sticky-bar-ctas .btn-ghost { display: none; }
    .sticky-bar-ctas .btn { padding: 9px 18px; font-size: 13px; }
}
@media (max-width: 480px) {
    .sticky-bar-inner { padding: 10px 16px; }
    .sticky-bar-msg { font-size: 12.5px; }
}

/* =============================================
   2. EXIT-INTENT POPUP
   ============================================= */
.exit-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.exit-overlay.show {
    opacity: 1;
    visibility: visible;
}
.exit-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(15, 23, 42, .25);
    transform: scale(.92) translateY(20px);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
    position: relative;
}
.exit-overlay.show .exit-modal {
    transform: scale(1) translateY(0);
}
.exit-modal-top {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
    padding: 36px 32px 28px;
    text-align: center;
    color: #fff;
    position: relative;
}
.exit-modal-top .em-badge {
    display: inline-block;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    color: var(--teal-50);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 16px;
}
.exit-modal-top .em-emoji {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 12px;
}
.exit-modal-top h3 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.25;
}
.exit-modal-top p {
    font-size: 15px;
    color: var(--teal-100);
    line-height: 1.5;
}
.exit-modal-body {
    padding: 28px 32px 32px;
    text-align: center;
}
.exit-modal-body .em-perks {
    text-align: left;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}
.exit-modal-body .em-perks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
    color: var(--slate-600);
    line-height: 1.5;
    margin-bottom: 10px;
}
.exit-modal-body .em-perks li .em-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: var(--teal-50);
    color: var(--teal-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}
.exit-modal-body .btn {
    width: 100%;
    margin-bottom: 12px;
}
.exit-modal-body .em-fineprint {
    font-size: 12.5px;
    color: var(--slate-400);
    margin-top: 4px;
}
.exit-modal-body .em-nothanks {
    display: inline-block;
    background: none;
    border: none;
    color: var(--slate-400);
    font-size: 13px;
    cursor: pointer;
    padding: 6px;
    margin-top: 8px;
    transition: color .2s ease;
}
.exit-modal-body .em-nothanks:hover {
    color: var(--slate-600);
}
.exit-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background .2s ease;
    z-index: 2;
}
.exit-close:hover {
    background: rgba(255, 255, 255, .3);
}

/* Responsive */
@media (max-width: 480px) {
    .exit-modal-top { padding: 28px 24px 22px; }
    .exit-modal-top h3 { font-size: 20px; }
    .exit-modal-top .em-emoji { font-size: 36px; }
    .exit-modal-body { padding: 22px 24px 26px; }
    .exit-modal-body .em-perks li { font-size: 13.5px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sticky-bar,
    .exit-modal,
    .exit-overlay {
        transition: none !important;
    }
}
