/*
 * construction-popup.css
 * Splash & Dash Website (splashndashak.com)
 * (C) 2026 Northern Construction & Equipment, LLC (NCE)
 * Intellectual Property of NCE
 * Created by Billy Jack Wiglesworth on August 29, 2026.
 *
 * Styles for the "Open During Construction" announcement popup
 * (templates/partials/construction-popup.html).
 *
 * Notes:
 *  - Every selector is namespaced "sd-cpopup-" so nothing here can
 *    collide with the precompiled Tailwind sheet, and nothing here
 *    depends on Tailwind utilities existing in that compiled build.
 *  - Loaded from base.html only when PageData.ShowConstructionPopup
 *    is true, so pages without the popup pay zero CSS cost.
 *  - Palette matches the popup artwork: navy #092440, tunnel blue
 *    #1B6E9C, foam cyan #BFEAF7, "open" green #16A34A.
 */

/* ------------------------------------------------------------------ */
/* Overlay: full-viewport dimmer that centers the card.               */
/* z-index 1000 sits above the fixed site header (Tailwind z-50).     */
/* ------------------------------------------------------------------ */
.sd-cpopup-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(3, 18, 31, 0.72);
    opacity: 1;
    transition: opacity 0.25s ease;
}

/* JS toggles the [hidden] attribute; enforce it against the flex     */
/* display above (display:flex would otherwise override [hidden]).    */
.sd-cpopup-overlay[hidden] {
    display: none;
}

/* Applied by JS just before hiding so the overlay can fade out.      */
.sd-cpopup-closing {
    opacity: 0;
}

/* ------------------------------------------------------------------ */
/* Card: the dialog itself.                                           */
/* max-height + overflow keep it usable on short landscape phones.    */
/* ------------------------------------------------------------------ */
.sd-cpopup-card {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(3, 18, 31, 0.5);
    animation: sd-cpopup-in 0.3s ease-out;
}

/* Entrance: slight rise + scale so the card "arrives" rather than    */
/* popping. Runs automatically when [hidden] is removed.              */
@keyframes sd-cpopup-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ------------------------------------------------------------------ */
/* Artwork: the scene SVG. Block display kills the inline-image       */
/* baseline gap; the navy background matches the SVG's own backdrop   */
/* so any letterboxing is invisible while it loads.                   */
/* ------------------------------------------------------------------ */
.sd-cpopup-art {
    display: block;
    width: 100%;
    height: auto;
    background: #092440;
}

/* ------------------------------------------------------------------ */
/* Close (X) button: floats over the dark artwork, top-right.         */
/* ------------------------------------------------------------------ */
.sd-cpopup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(9, 36, 64, 0.55);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.sd-cpopup-close:hover {
    background: rgba(9, 36, 64, 0.85);
}

.sd-cpopup-close svg {
    width: 20px;
    height: 20px;
}

/* ------------------------------------------------------------------ */
/* Content block below the artwork.                                   */
/* Font-family is inherited from the site so the popup matches the    */
/* rest of the page typography.                                       */
/* ------------------------------------------------------------------ */
.sd-cpopup-content {
    padding: 22px 28px 26px;
    text-align: center;
}

/* Small uppercase locator line above the heading */
.sd-cpopup-eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1b6e9c;
}

/* Main heading; the word OPEN is emphasized in green via a span      */
.sd-cpopup-title {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
    color: #092440;
}

.sd-cpopup-open-word {
    color: #16a34a;
}

/* Body copy, width-limited for comfortable line length               */
.sd-cpopup-body {
    margin: 0 auto 12px;
    max-width: 46ch;
    font-size: 16px;
    line-height: 1.55;
    color: #374151;
}

/* Hours pill */
.sd-cpopup-hours {
    display: inline-block;
    margin: 0 0 18px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #092440;
    background: #e8f7fe;
    border: 1px solid #bfeaf7;
    border-radius: 999px;
}

/* ------------------------------------------------------------------ */
/* Action row: single primary dismiss button.                         */
/* ------------------------------------------------------------------ */
.sd-cpopup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.sd-cpopup-btn {
    appearance: none;
    display: inline-block;
    padding: 12px 22px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sd-cpopup-btn-primary {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

.sd-cpopup-btn-primary:hover {
    background: #12813b;
    border-color: #12813b;
}

/* Visible keyboard focus for every interactive element in the popup */
.sd-cpopup-close:focus-visible,
.sd-cpopup-btn:focus-visible {
    outline: 3px solid #4ade80;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Body scroll lock while the popup is open (class applied by JS).    */
/* ------------------------------------------------------------------ */
.sd-cpopup-noscroll {
    overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Small screens: tighter padding, smaller heading, stacked buttons.  */
/* ------------------------------------------------------------------ */
@media (max-width: 480px) {
    .sd-cpopup-content {
        padding: 18px 18px 22px;
    }

    .sd-cpopup-title {
        font-size: 23px;
    }

    .sd-cpopup-btn {
        flex: 1 1 100%;
    }
}

/* ------------------------------------------------------------------ */
/* Reduced motion: no entrance animation, no fades.                   */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .sd-cpopup-overlay {
        transition: none;
    }

    .sd-cpopup-card {
        animation: none;
    }
}