/* public/css/supporter_banner.css */
/* ============================================================
   Dispattern — SUPPORTER BANNER (extracted + tuned)
   ============================================================ */

/* Token shims w/ fallbacks (aligns with other pages) */
:root {
    /* Surfaces */
    --_bg-1: var(--secondary-bg, var(--bg-1, #0a0f25));
    --_bg-2: var(--hover-bg, var(--bg-2, #10162f));
    /* Text */
    --_text-0: var(--primary-text, var(--text-0, #ffffff));
    /* Accents / brand */
    --_accent: var(--accent, var(--accent-color, #8a7cff));
    /* Borders */
    --_border: var(--border, var(--border-color, rgba(92,217,240,0.25)));
}

/* Make space at bottom when banner present */
body.has-supporter-banner {
    padding-bottom: var(--supporter-banner-height, 64px);
}

/* =========================
   Banner
   ========================= */
.supporter-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--_bg-2);
    color: var(--_text-0);
    overflow: hidden;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid var(--_border);
    box-sizing: border-box;
    gap: 12px;
}

.supporter-banner-left {
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Right icon set */
.supporter-banner-right a {
    color: var(--_text-0);
    margin-left: 14px;
    font-size: 1.2rem;
    transition: color .2s ease, opacity .2s ease, transform .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .supporter-banner-right a:hover {
        color: var(--_accent);
        transform: translateY(-1px);
    }

    .supporter-banner-right a.donate-link {
        opacity: .8;
    }

        .supporter-banner-right a.donate-link:hover {
            opacity: 1;
        }

/* Lucide + brand SVG sizing */
.supporter-banner-right i[data-lucide],
.supporter-banner-right svg.icon-brand,
.return-to-top i[data-lucide],
.email-list i[data-lucide] {
    width: 1em;
    height: 1em;
}

/* Tabler brand icon to visually match Lucide */
svg.icon-brand {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    vertical-align: -0.125em;
}

/* =========================
   Ticker
   ========================= */
.ticker-container {
    overflow: hidden;
    flex: 1;
    margin: 0 12px;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    display: block;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ticker-scroll 20s linear infinite;
}

/* Ticker */
.ticker-item {
    display: inline-block;
    margin-right: 50px;
    font-size: 1rem;
    line-height: 1.2;
    color: #fff; /* force white */
}

    /* keep strong same color */
    .ticker-item strong {
        color: inherit;
    }

.ticker-container:hover .ticker {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* =========================
   Return to Top — NEW vibe
   ========================= */
.return-to-top {
    position: fixed;
    right: 20px;
    bottom: calc(var(--supporter-banner-height, 64px) + 20px);
    /* glassy gradient like cards */
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03)), linear-gradient(180deg, var(--_bg-2), var(--_bg-1));
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid var(--_border);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    transition: opacity .28s ease, transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, filter .16s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 10000;
    /* subtle start offset for nicer reveal */
    transform: translateY(4px);
}

    .return-to-top.visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .return-to-top i[data-lucide] {
        width: 22px;
        height: 22px;
        color: currentColor;
        /* small lift on hover syncs with button motion */
        transition: transform .16s ease, filter .16s ease;
    }

    .return-to-top:hover {
        border-color: color-mix(in oklab, var(--_accent) 40%, var(--_border));
        box-shadow: 0 12px 28px rgba(0,0,0,.45), 0 0 0 3px rgba(118,115,184,.08);
        transform: translateY(-2px);
        /* gentle brighten like other CTAs */
        filter: brightness(1.02);
    }

        .return-to-top:hover i[data-lucide] {
            transform: translateY(-1px);
        }

    /* active press */
    .return-to-top:active {
        transform: translateY(0);
        box-shadow: 0 6px 16px rgba(0,0,0,.35);
    }

    /* keyboard focus */
    .return-to-top:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(118,115,184,.25), 0 10px 24px rgba(0,0,0,.35);
        border-color: var(--_accent);
    }

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
    .return-to-top {
        transition: opacity .2s linear, transform .2s linear, box-shadow .2s linear, border-color .2s linear, background .2s linear;
    }

    .ticker {
        animation-duration: 35s;
    }
}

/* =========================
   Email modal
   ========================= */
.email-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.email-modal {
    background: var(--_bg-2);
    color: var(--_text-0);
    padding: 20px;
    border-radius: 10px;
    max-width: 380px;
    width: 92%;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    position: relative;
    border: 1px solid var(--_border);
}

    .email-modal h2 {
        margin: 0 0 6px;
        font-size: 1.15rem;
    }

.copy-toast {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--_accent);
    color: #000;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: .9rem;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
    z-index: 10002;
}

.email-list {
    list-style: none;
    padding: 0;
    margin: 1em 0 0;
}

    .email-list li {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 0;
        border-bottom: 1px solid var(--_border);
        line-height: 1.4;
    }

        .email-list li:last-child {
            border-bottom: 0;
        }

.email-text {
    flex: 1;
    margin-right: 8px;
}

.email-address {
    font-weight: 700;
}

.email-purpose {
    font-size: .9rem;
    margin-top: 2px;
    opacity: .85;
}

.email-list button.copy-email {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--_text-0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
    transition: background-color .15s ease, transform .15s ease;
}

    .email-list button.copy-email:hover {
        background-color: rgba(255,255,255,0.08);
        transform: translateY(-1px);
    }

    .email-list button.copy-email:focus {
        outline: 2px solid var(--_accent);
        outline-offset: 2px;
    }

.email-modal .modal-close {
    margin-top: 1em;
    background: var(--_accent);
    border: none;
    color: #000;
    padding: .55em 1em;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background .15s ease, transform .15s ease;
}

    .email-modal .modal-close:hover {
        background: color-mix(in oklab, var(--_accent), black 10%);
        transform: translateY(-1px);
    }

/* =========================
   Responsive
   ========================= */
@media (max-width: 720px) {
    .supporter-banner {
        padding: 8px 12px;
        gap: 8px;
    }

    .supporter-banner-left {
        font-size: 1rem;
    }

    .ticker-item {
        margin-right: 28px;
        font-size: .95rem;
    }

    .supporter-banner-right a {
        margin-left: 10px;
    }

    .return-to-top {
        right: 14px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .supporter-banner-left {
        display: none;
    }

    .ticker-container {
        margin: 0 6px;
    }
}
