/*
 * "Almost done!" processing overlay for the STANDARD booking form.
 *
 * Reuses the visual of the NYC pilot's final overlay (the #bookingDone block in
 * js/booking-mobile-nyc.js) but standalone: id-scoped, with the NYC widget's
 * design tokens inlined as literal values (those CSS variables are not in scope
 * on the plain booking page) and sizes in px so nothing depends on the page's
 * root font-size.
 *
 * Shown on submit, mobile only, by js/booking-almost-done.js. It fills the wait
 * while send-mail.php processes the POST and redirects to /thank-you.
 */
#emaids-ad-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(21, 41, 61, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Mobile only: even if .show is toggled on a wider viewport, stay hidden. */
@media (max-width: 820px) {
    #emaids-ad-overlay.show {
        display: flex;
    }
}

#emaids-ad-overlay svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

#emaids-ad-overlay .emaids-ad-card {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 1px solid #d9e3ec;
    border-radius: 22px;
    padding: 26px 22px 28px;
    text-align: center;
    box-shadow: 0 22px 52px -10px rgba(21, 41, 61, 0.22), 0 6px 16px rgba(21, 41, 61, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#emaids-ad-overlay .emaids-ad-card b {
    display: block;
    color: #15293d;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 9px;
}

#emaids-ad-overlay .emaids-ad-card p {
    max-width: 280px;
    margin: 0 auto;
    color: #5d6f81;
    font-size: 16px;
    line-height: 1.5;
}

/* Hourglass box + decorative sparks/dots. */
#emaids-ad-overlay .emaids-ad-hourbox {
    position: relative;
    width: 150px;
    height: 118px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ring: green arc (~⅓, top-right) over a near-white ring, static icon centered. */
#emaids-ad-overlay .emaids-ad-ring {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f9c84;
}

#emaids-ad-overlay .emaids-ad-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from -14deg, #3fbfa4 0 5%, #1f9c84 5% 37%, #e7eef1 37% 100%);
}

#emaids-ad-overlay .emaids-ad-ring::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #fff;
}

#emaids-ad-overlay .emaids-ad-ring svg {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
}

#emaids-ad-overlay .emaids-ad-spk {
    position: absolute;
    line-height: 0;
    color: #1f9c84;
}

#emaids-ad-overlay .emaids-ad-spk svg {
    display: block;
}

#emaids-ad-overlay .emaids-ad-s1 { top: 10px; left: 20px; opacity: 0.45; }
#emaids-ad-overlay .emaids-ad-s1 svg { width: 18px; height: 18px; }
#emaids-ad-overlay .emaids-ad-s2 { top: 30px; right: 14px; opacity: 0.30; }
#emaids-ad-overlay .emaids-ad-s2 svg { width: 13px; height: 13px; }
#emaids-ad-overlay .emaids-ad-s3 { top: 6px; right: 30px; opacity: 0.22; }
#emaids-ad-overlay .emaids-ad-s3 svg { width: 10px; height: 10px; }

#emaids-ad-overlay .emaids-ad-dot {
    position: absolute;
    border-radius: 50%;
    background: #1f9c84;
}

#emaids-ad-overlay .emaids-ad-d1 { width: 7px; height: 7px; bottom: 24px; left: 26px; opacity: 0.40; }
#emaids-ad-overlay .emaids-ad-d2 { width: 9px; height: 9px; bottom: 16px; right: 32px; opacity: 0.25; }

/* "Do not refresh/close/back" note (soft green). */
#emaids-ad-overlay .emaids-ad-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    background: #e9f6f2;
    border: 1px solid #d3ebe4;
    border-radius: 12px;
    padding: 13px 15px;
    margin: 18px 0 2px;
}

#emaids-ad-overlay .emaids-ad-note-ic {
    flex-shrink: 0;
    margin-top: 1px;
    color: #1b75bb;
}

#emaids-ad-overlay .emaids-ad-note-ic svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8;
}

#emaids-ad-overlay .emaids-ad-note-tx {
    color: #5d6f81;
    font-size: 14px;
    line-height: 1.5;
}

#emaids-ad-overlay .emaids-ad-note-tx b {
    display: block;
    color: #1f9c84;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 2px;
}

/* Thin separator + bottom blue spinner (the only moving part). */
#emaids-ad-overlay .emaids-ad-sep {
    display: block;
    height: 1px;
    max-width: 260px;
    margin: 22px auto 0;
    background: #d9e3ec;
}

#emaids-ad-overlay .emaids-ad-spin {
    display: block;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    margin: 18px auto 2px;
    border-radius: 50%;
    border: 3px solid #d9e3ec;
    border-top-color: #1b75bb;
    animation: emaidsAdSpin 0.75s linear infinite;
}

@keyframes emaidsAdSpin {
    to { transform: rotate(360deg); }
}
