/* =============================================
   STICKY "SCHEDULE NOW" CTA
   Logic: assets/js/sticky-cta.js · Config: includes/wordpress/sticky-cta.php
   ============================================= */

.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    display: flex;
    justify-content: center;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
}

.sticky-cta.is-visible {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s linear 0s;
}

.sticky-cta__button {
    width: 100%;
    max-width: 420px;
    border: 0;
    border-radius: 6px;
    background: #fd934a;
    color: #fff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1em;
    letter-spacing: normal;
    cursor: pointer;
    padding: 12px 18px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sticky-cta__button:hover {
    background: #f07f30;
}

.sticky-cta__button:focus-visible {
    outline: 3px solid var(--blue, #1c5d86);
    outline-offset: 2px;
}

/* Hide while the mobile menu is open */
body:has(header.nav-open) .sticky-cta {
    display: none;
}

@media screen and (min-width: 1201px) {
    .sticky-cta {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .sticky-cta__button {
        max-width: 300px;
        min-height: 46px;
        font-size: 17px;
    }
}

/* =============================================
   SHEET VARIANT
   #form itself becomes the sheet (iframe is never moved/reloaded)
   ============================================= */

.sticky-cta-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sticky-cta-backdrop.is-open {
    opacity: 1;
}

#form.sticky-cta-sheet {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 99991 !important;
    width: 100% !important;
    max-width: none !important;
    max-height: 90vh;
    max-height: 94dvh;
    margin: 0 !important;
    padding: 26px 0px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

#form.sticky-cta-sheet .form {
    margin-top: 0;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    box-shadow: none;
    border: 0;
    border-radius: 0;
}

#form.sticky-cta-sheet.is-open {
    transform: translateY(0);
}

#form.sticky-cta-sheet .header-block[lwc-3eqp7sd7dga] {
    display: none;
}

#form.sticky-cta-sheet>*:not(.sticky-cta-sheet__close) {
    max-width: 640px;
    margin-left: auto !important;
    margin-right: auto !important;
}

#form.sticky-cta-sheet #sched-form {
    margin: 0
}

/* Close (X): fixed outside #form, pinned just above the sheet's top edge (top set by JS) */
.sticky-cta-sheet__close {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 99992;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #353535;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, top 0.2s ease;
}

.sticky-cta-sheet__close.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.sticky-cta-sheet__close:hover {
    background: #f0f0f0;
}

.sticky-cta-sheet__close:focus-visible {
    outline: 3px solid var(--blue, #1c5d86);
    outline-offset: 2px;
}

/* Lock page scroll while the sheet is open */
html.sticky-cta-lock,
html.sticky-cta-lock body {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {

    .sticky-cta,
    .sticky-cta.is-visible,
    .sticky-cta-backdrop,
    .sticky-cta-sheet__close,
    #form.sticky-cta-sheet {
        transition: none;
    }
}

@media screen and (min-width: 768px) {
    .sticky-cta {
        display: none !important;
    }
}