/* ============================================================
   Day-of-Giving — Popup E (dark)
   Mirrors `.popup-card.popup-card--dark` in docs/day-of-giving.html.
   Self-contained: this file ships independently of banner.css, so
   the CTA pill is restated here rather than inherited.
   ============================================================ */

.hcs-dog-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
    font-family: var(--hcs-font-body);
    color: var(--wp--preset--color--white);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 280ms ease-out, visibility 0s linear 280ms;
}
.hcs-dog-popup[data-open="1"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 280ms ease-out, visibility 0s;
}
.hcs-dog-popup[hidden] { display: none; }

/* --- Backdrop ------------------------------------------------ */
.hcs-dog-popup__backdrop {
    position: absolute;
    inset: 0;
    background: var(--wp--preset--color--backdrop, rgba(0, 30, 50, 0.72));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

/* --- Card ---------------------------------------------------- */
.hcs-dog-popup__card {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: var(--hcs-navy);
    color: var(--wp--preset--color--white);
    border-radius: var(--radius-xl, 20px);
    box-shadow: var(--shadow-dramatic, 0 16px 48px rgba(0, 71, 108, 0.22));
    animation: hcs-dog-popup-rise 400ms cubic-bezier(.22, 1, .36, 1) both;
}
.hcs-dog-popup__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--giving-gradient);
    z-index: 2;
    pointer-events: none;
}

/* --- Close button (filled beige circle) ---------------------- */
.hcs-dog-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--hcs-cream);
    color: var(--hcs-navy);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background-color 200ms ease, transform 200ms ease, color 200ms ease;
}
.hcs-dog-popup__close:hover,
.hcs-dog-popup__close:focus-visible {
    background: var(--hcs-beige);
    transform: scale(1.05);
}
.hcs-dog-popup__close:focus-visible {
    outline: 3px solid var(--giving-orange);
    outline-offset: 2px;
}

/* --- Body ---------------------------------------------------- */
.hcs-dog-popup__body {
    padding: clamp(2rem, 5vw, 2.5rem) 2rem 1.5rem;
    text-align: center;
}

.hcs-dog-popup__eyebrow {
    font-family: var(--hcs-font-display);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--giving-orange);
    margin: 0 0 0.75rem;
}

/* Circular logo seal, centered above the eyebrow. Base lives in core.css. */
.hcs-dog-popup__body .hcs-dog-logo-badge--popup {
    width: clamp(108px, 26vw, 140px);
    padding: clamp(10px, 3vw, 16px);
    margin: 0 auto 1.25rem;
}

/* Scoped via [data-hcs-dog-component] to outrank theme h2 color rules. */
[data-hcs-dog-component="popup"] .hcs-dog-popup__title,
.hcs-dog-popup .hcs-dog-popup__title {
    font-family: var(--hcs-font-display);
    font-weight: 600;
    font-size: clamp(1.625rem, 1.4rem + 1vw, 2rem);
    line-height: 1.15;
    color: var(--wp--preset--color--white);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin: 0 0 1rem;
}

.hcs-dog-popup__desc {
    font-family: var(--hcs-font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--hcs-text-soft, rgba(255, 255, 255, 0.85));
    margin: 0 0 1.5rem;
}

/* --- Video (16:9) ------------------------------------------- */
.hcs-dog-popup__video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--wp--preset--color--video-bg);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    margin: 0 0 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.hcs-dog-popup__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* --- Countdown + thermometer slots --------------------------- */
.hcs-dog-popup__countdown {
    margin: 1.25rem 0;
}
.hcs-dog-popup__thermometer {
    margin: 1.5rem 0;
}

/* --- CTA row + pill ----------------------------------------- */
.hcs-dog-popup__cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0 0;
}
/* Scoped via [data-hcs-dog-component] + a[class] to outrank theme link styles
   (e.g. global `a { border-bottom: 1px dashed; color: <teal> }` rules). */
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta,
.hcs-dog-popup a.hcs-dog-popup__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background-color: var(--giving-orange);
    color: var(--hcs-navy);
    font-family: var(--hcs-font-display);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border: 0;
    border-bottom: 0;
    border-radius: var(--wp--preset--border-radius--full, 9999px);
    box-shadow: 0 6px 18px rgba(var(--giving-orange-rgb), 0.4);
    transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
    cursor: pointer;
}
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta:visited,
.hcs-dog-popup a.hcs-dog-popup__cta:visited {
    color: var(--hcs-navy);
}
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta:hover,
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta:focus-visible,
.hcs-dog-popup a.hcs-dog-popup__cta:hover,
.hcs-dog-popup a.hcs-dog-popup__cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(var(--giving-orange-rgb), 0.5);
    filter: brightness(1.05);
    color: var(--hcs-navy);
}
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta:focus-visible,
.hcs-dog-popup a.hcs-dog-popup__cta:focus-visible {
    outline: 3px solid var(--wp--preset--color--white);
    outline-offset: 3px;
}
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta--secondary,
.hcs-dog-popup a.hcs-dog-popup__cta--secondary {
    background: transparent;
    color: var(--wp--preset--color--white);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
}
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta--secondary:visited,
.hcs-dog-popup a.hcs-dog-popup__cta--secondary:visited {
    color: var(--wp--preset--color--white);
}
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta--secondary:hover,
[data-hcs-dog-component="popup"] a.hcs-dog-popup__cta--secondary:focus-visible,
.hcs-dog-popup a.hcs-dog-popup__cta--secondary:hover,
.hcs-dog-popup a.hcs-dog-popup__cta--secondary:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--wp--preset--color--white);
    box-shadow: none;
    filter: none;
}

/* --- Footer dismiss ----------------------------------------- */
.hcs-dog-popup__footer {
    padding: 1rem 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hcs-dog-popup__dismiss {
    background: none;
    border: 0;
    padding: 0.5rem;
    color: var(--hcs-text-soft, rgba(255, 255, 255, 0.85));
    font-family: var(--hcs-font-body);
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 200ms ease;
}
.hcs-dog-popup__dismiss:hover,
.hcs-dog-popup__dismiss:focus-visible {
    color: var(--wp--preset--color--white);
}
.hcs-dog-popup__dismiss:focus-visible {
    outline: 2px solid var(--giving-orange);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Embedded countdown / thermometer dark-variant overrides */
.hcs-dog-popup .hcs-dog-countdown__number,
.hcs-dog-popup .countdown__number {
    background: rgba(255, 255, 255, 0.08);
    color: var(--wp--preset--color--white);
    box-shadow: none;
}
.hcs-dog-popup .hcs-dog-countdown__label,
.hcs-dog-popup .countdown__label {
    color: rgba(255, 255, 255, 0.5);
}
.hcs-dog-popup .hcs-dog-countdown__sep,
.hcs-dog-popup .countdown__sep {
    color: rgba(255, 255, 255, 0.15);
}
.hcs-dog-popup .hcs-dog-thermometer__track,
.hcs-dog-popup .thermometer__track {
    background: rgba(255, 255, 255, 0.1);
}
.hcs-dog-popup .hcs-dog-thermometer__raised,
.hcs-dog-popup .thermometer__raised {
    color: var(--giving-orange);
}
.hcs-dog-popup .hcs-dog-thermometer__goal,
.hcs-dog-popup .thermometer__goal,
.hcs-dog-popup .hcs-dog-thermometer__stats,
.hcs-dog-popup .thermometer__stats {
    color: rgba(255, 255, 255, 0.55);
}

/* --- Animation ---------------------------------------------- */
@keyframes hcs-dog-popup-rise {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hcs-dog-popup,
    .hcs-dog-popup__card {
        animation: none !important;
        transition: opacity 0ms !important;
    }
}

/* --- Mobile ------------------------------------------------- */
@media (max-width: 480px) {
    .hcs-dog-popup { padding: 0.75rem; }
    .hcs-dog-popup__body { padding: 2rem 1.25rem 1.25rem; }
    .hcs-dog-popup__footer { padding: 0.875rem 1.25rem 1.25rem; }
}
