/* =============================================================================
 * Org website footer - mobile accordions + back-to-top pill
 * =============================================================================
 *
 * Sitemap / Hours / Upcoming columns wrap their contents in a <details>
 * accordion. On desktop (md+), the accordion is pinned open and the
 * summary acts like a plain heading. On mobile, the summary becomes a
 * clickable toggle with a chevron indicator.
 *
 * The matching JS in /web/js/website-footer.js force-opens all
 * accordions whenever the viewport crosses back to >= 768px, so a
 * visitor who collapsed a section on mobile and resized to desktop
 * doesn't see a stuck-closed column.
 */

/* -----------------------------------------------------------------------------
 * Footer column accordions
 * -------------------------------------------------------------------------- */

.website-footer-accordion {
    margin: 0;
}

.website-footer-accordion > summary {
    list-style: none;
}

.website-footer-accordion > summary::-webkit-details-marker {
    display: none;
}

.website-footer-accordion > summary::marker {
    display: none;
}

/* Desktop: accordion acts as a transparent wrapper - summary renders
 * inline as if the <details> wasn't there. Click handling is killed so
 * the visitor can't accidentally collapse a column on desktop. */
@media (min-width: 768px) {
    .website-footer-accordion > summary {
        cursor: default;
        display: block;
        pointer-events: none;
    }
}

/* Mobile: each column collapses to a tappable summary with a chevron.
 * A subtle bottom border separates stacked accordions. */
@media (max-width: 767.98px) {
    .website-footer-accordion {
        border-bottom: 1px solid var(--website-footer-border, rgba(255, 255, 255, 0.08));
    }

    .website-footer-accordion > summary {
        cursor: pointer;
        user-select: none;
        padding: 0.75rem 0;
        position: relative;
        padding-right: 2rem;
    }

    .website-footer-accordion > summary h6 {
        margin-bottom: 0 !important;
        display: inline-block;
    }

    .website-footer-accordion > summary::after {
        content: '\f078'; /* fa-chevron-down */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        right: 0.25rem;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.2s ease;
        font-size: 0.75rem;
        opacity: 0.65;
    }

    .website-footer-accordion[open] > summary::after {
        transform: translateY(-50%) rotate(180deg);
    }

    .website-footer-accordion[open] > *:not(summary) {
        padding-bottom: 0.75rem;
    }
}

/* -----------------------------------------------------------------------------
 * Back-to-top pill
 * -------------------------------------------------------------------------- */

.website-back-to-top {
    position: fixed;
    /* Position (left/right) and bottom offset are driven by attribute
       selectors below so the visitor's chosen layout takes effect without
       extra classes. Defaults match the most common "right + normal". */
    right: 1.5rem;
    bottom: 1.5rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background-color: var(--color-primary-600, #2563eb);
    color: var(--color-on-primary, #ffffff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.15s ease;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.website-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.website-back-to-top:hover,
.website-back-to-top:focus-visible {
    background-color: var(--color-primary-700, #1d4ed8);
    outline: none;
}

.website-back-to-top:focus-visible {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 0 0 3px var(--color-primary-200, rgba(37, 99, 235, 0.4));
}

/* -- Position (left | right) ------------------------------------------ */

.website-back-to-top[data-position="left"] {
    right: auto;
    left: 1.5rem;
}

/* -- Shape (circle | rounded | square) -------------------------------- */

.website-back-to-top[data-shape="circle"] {
    border-radius: 50%;
}
.website-back-to-top[data-shape="rounded"] {
    border-radius: 0.5rem;
}
.website-back-to-top[data-shape="square"] {
    border-radius: 0;
}

/* -- Icon style (arrow | chevron | label) ----------------------------- */

/* "Top" label takes more horizontal room than a single glyph, so the pill
   widens out into a small capsule and the radius adapts when shape=circle
   (otherwise we'd get an oval). */
.website-back-to-top[data-icon="label"] {
    width: auto;
    min-width: 2.75rem;
    padding: 0 0.9rem;
    font-size: 0.825rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.website-back-to-top[data-icon="label"][data-shape="circle"] {
    border-radius: 2rem;
}

.website-back-to-top-label {
    text-transform: uppercase;
}

/* -- Vertical offset (compact | normal | loose) ----------------------- */

.website-back-to-top[data-offset="compact"] {
    bottom: 0.75rem;
}
.website-back-to-top[data-offset="normal"] {
    bottom: 1.5rem;
}
.website-back-to-top[data-offset="loose"] {
    bottom: 2.5rem;
}

/* -- Mobile visibility ------------------------------------------------- */

@media (max-width: 767.98px) {
    .website-back-to-top[data-mobile="0"] {
        display: none !important;
    }
    /* On phones, ease the offset / size for thumb reach regardless of
       what desktop chose - mobile real estate is precious. */
    .website-back-to-top {
        width: 2.5rem;
        height: 2.5rem;
    }
    .website-back-to-top[data-position="right"] {
        right: 1rem;
    }
    .website-back-to-top[data-position="left"] {
        left: 1rem;
    }
}

@media print {
    .website-back-to-top {
        display: none !important;
    }
}

/* -----------------------------------------------------------------------------
 * Footer background (image/video/animation)
 *
 * WebsiteBackgroundWidget emits absolute .wb-bg-layer + .wb-bg-overlay (full
 * styling lives in website-background.css). The footer must be a positioning
 * context, and its real content (strips, columns, copyright) must sit above
 * the background layers.
 * -------------------------------------------------------------------------- */
footer[data-web="footer"] {
    position: relative;
}

footer[data-web="footer"] > .container,
footer[data-web="footer"] > div[data-web="footer-pre-strip"],
footer[data-web="footer"] > div[data-web="footer-post-strip"],
footer[data-web="footer"] > *:not(.wb-bg-layer):not(.wb-bg-overlay) {
    position: relative;
    z-index: 2;
}

/* -----------------------------------------------------------------------------
 * Live statistics strip (footer_show_stats)
 *
 * Compact centered line of live counters, mirroring the platform footer's
 * brand-column stats. Numbers count up via stats-counter.js.
 * -------------------------------------------------------------------------- */
.website-footer-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
    font-size: 0.85rem;
    opacity: 0.85;
    text-align: center;
}

.website-footer-stats .website-footer-stat {
    white-space: nowrap;
}

.website-footer-stats .website-footer-stat:not(:last-child)::after {
    content: '\00B7';
    margin-left: 0.75rem;
    opacity: 0.5;
}

.website-footer-stats .stat-number,
.website-footer-stats .stat-suffix {
    font-weight: 700;
}
