/*
 * ============================================
 * Theme Name: Fall of Stars V1 - Fanatically
 * Author: Ariane
 * Author URI: https://www.unloved-heart.net
 * Tokens and aesthetic matched to the Foundation
 * fanlisting header (dusk navy, amber gold,
 * slate teal) as dark glass over the page card.
 *
 * ============================================
 */

:root
{
    --text-dark: #f4efe3;
    --text-mid: #cfd3de;
    --text-light: #8b97b3;
    --white-soft: rgba(255, 255, 255, 0.1);
    --white-glass: rgba(255, 255, 255, 0.05);
    --border: rgba(201, 163, 94, 0.3);
    --shadow: rgba(0, 0, 0, 0.5);
    --g3: #c9a35e;
    --wine: #d1707f;
    --gold: #c9a35e;
    --gold-bright: #f0c77a;
    --gold-light: #f0c77a;
    --teal: #5fb3bd;
}

/* -----------------------------------------
   Forms
   Shared by the Codes donate form, the Join
   form, the Affiliates apply form, and the
   Update / Lost Password / Delete forms.
----------------------------------------- */
.fan-form
{
    color-scheme: dark;
}

.fan-form .join-field
{
    margin-bottom: 1.1em;
}

.fan-form label
{
    color: var(--gold);
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* "main" prefix: Fanatically injects its own inline <style> after this
   stylesheet (background: rgba(255,255,255,0.6) on every field), so these
   selectors need one more level of specificity to win. */
main .fan-form input[type=text],
main .fan-form input[type=email],
main .fan-form input[type=url],
main .fan-form input[type=file],
main .fan-form input[type=password],
main .fan-form select,
main .fan-form textarea
{
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
    color: var(--text-dark);
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    outline: none;
    padding: 10px 16px;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
}

main .fan-form input:hover,
main .fan-form select:hover,
main .fan-form textarea:hover
{
    border-color: rgba(201, 163, 94, 0.55);
}

main .fan-form input[type=text]:focus,
main .fan-form input[type=email]:focus,
main .fan-form input[type=url]:focus,
main .fan-form input[type=password]:focus,
main .fan-form select:focus,
main .fan-form textarea:focus
{
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(201, 163, 94, 0.06));
    border-color: var(--gold-bright);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(201, 163, 94, 0.2), 0 0 18px rgba(201, 163, 94, 0.18);
    outline: none;
}

.fan-form ::placeholder
{
    color: var(--text-light);
    font-style: italic;
    opacity: 0.7;
}

main .fan-form textarea
{
    line-height: 1.6;
    min-height: 120px;
    resize: vertical;
}

main .fan-form input[type=file]
{
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 8px 10px;
}

.fan-form input[type=file]::file-selector-button
{
    background: linear-gradient(to bottom, #d8b36c, #a37f3e);
    border: 0;
    border-radius: 6px;
    color: #120d03;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    margin-right: 14px;
    padding: 0.4rem 1rem;
    text-transform: uppercase;
    transition: filter 0.2s ease;
}

.fan-form input[type=file]::file-selector-button:hover
{
    filter: brightness(1.15);
}

main .fan-form select
{
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a35e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"), linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.04));
    background-position: right 16px center, 0 0;
    background-repeat: no-repeat;
    cursor: pointer;
    padding-right: 40px;
}

.fan-form select option
{
    background: #0a0d1c;
    color: var(--text-mid);
}

/* browsers paint autofilled fields pale yellow/blue by default */
.fan-form input:-webkit-autofill
{
    -webkit-box-shadow: 0 0 0 100px #0f1322 inset;
    -webkit-text-fill-color: var(--text-dark);
    caret-color: var(--text-dark);
}

/* breathing room between the toggle button and the form it opens */
#fan-donate-wrap,
#fan-apply-wrap,
#fan-kim-suggest-wrap
{
    margin-top: 1.6rem;
}

.fan-form button[type=submit]
{
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: var(--white-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 14px var(--shadow);
    color: var(--text-mid);
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    padding: 0.55rem 1.6rem;
    text-transform: uppercase;
    transition: all 0.25s ease;
}

.fan-form button[type=submit]:hover
{
    background: linear-gradient(120deg, rgba(201, 163, 94, 0.28) 0%, rgba(95, 179, 189, 0.22) 100%);
    border-color: var(--gold);
    box-shadow: 0 6px 20px var(--shadow);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.fan-form .fan-form-actions
{
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.4rem;
}

.fan-form .fan-label-hint
{
    color: var(--text-light);
    font-size: 0.8em;
    font-weight: 400;
}

.fan-form .fan-field-hint
{
    color: var(--text-light);
    display: block;
    font-size: 0.75em;
    letter-spacing: 0.04em;
    margin-top: 5px;
}

.fan-form .fan-checkbox-label
{
    align-items: baseline;
    color: var(--text-mid);
    cursor: pointer;
    display: flex;
    font-size: 0.82em;
    font-weight: 400;
    gap: 0.45rem;
}

.fan-form input[type=checkbox]
{
    accent-color: var(--g3);
    backdrop-filter: none;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    padding: 0;
    width: auto;
}


/* -----------------------------------------
   Feedback boxes
   Conditional - only render after a form is
   submitted, but every .fan-form page can
   trigger one, so they're core UX, not extra.
----------------------------------------- */
.fan-success
{
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(60, 140, 100, 0.18);
    border: 1px solid rgba(120, 200, 160, 0.4);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: #a9e3c3;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    padding: 12px 16px;
}

.fan-errors
{
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(190, 70, 80, 0.18);
    border: 1px solid rgba(230, 130, 140, 0.4);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: #f0b4ba;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    padding: 12px 16px;
}

.fan-errors ul
{
    margin: 0;
    padding-left: 1.2em;
}

.fan-errors ul li,
.fan-success ul li
{
    color: inherit;
    font-size: inherit;
    line-height: 1.7;
    margin-bottom: 0.3rem;
}


/* -----------------------------------------
   Donate / apply toggle
   Used on Codes ("Donate a Code") and
   Affiliates ("Apply to be an affiliate").
----------------------------------------- */
.fan-donate-toggle
{
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: var(--white-glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    color: var(--text-mid);
    cursor: pointer;
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    margin: 1.5em 0 0;
    padding: 0.55rem 1.6rem;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.25s ease;
    width: 100%;
}

.fan-donate-toggle:hover
{
    background: linear-gradient(120deg, rgba(201, 163, 94, 0.28) 0%, rgba(95, 179, 189, 0.22) 100%);
    border-color: var(--gold);
    color: var(--text-dark);
    transform: translateY(-2px);
}


/* -----------------------------------------
   Page content wrapper
   NOTE: these used to render their own glass
   card (background/border/radius/shadow/
   backdrop-filter + a gold hairline), the same
   treatment <main> in style.css already renders
   on every page. That stacked two nearly
   identical cards, producing a visible "box
   within a box". Unboxed here so these wrappers
   are page content living directly inside
   <main>'s own card. .fanlisting-stats-wrap
   further down is the one place that's SUPPOSED
   to nest a card inside <main> - left alone.
----------------------------------------- */
.fan-codes-page,
.fan-join-page,
.fan-update-page,
.fan-lostpass-page,
.fan-delete-page,
.fan-member-list-wrap
{
    animation: fadeUp 1s 0.2s ease both;
    margin-top: 2rem;
}


/* -----------------------------------------
   Codes size nav ("#50x50", "#60x90", ...)
   Real <nav> element, so it inherits style.css's
   bare `nav` selector (glass pill background,
   border, radius:999px, fixed padding,
   width:fit-content) meant for the header site
   nav. Reset to nothing below so it renders as
   individual pill links floating on the page,
   not a second glass pill wrapping around them.
   NOTE: Fanatically injects its own baseline
   dark "glass command palette" styling for this
   exact selector via an inline \3c style> tag inside
   <main> (see header.php output) - that tag comes
   AFTER this stylesheet in the document, so at
   equal specificity it wins the cascade. Every
   visual property below needs !important to beat
   it; drop one and the baseline's dark charcoal
   pill silently comes back for that property.
----------------------------------------- */
.fan-size-nav
{
    align-items: center;
    backdrop-filter: none !important;
    background: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.3rem;
    line-height: 1;
    margin-bottom: 1.4em;
    margin-top: 1.4em;
    padding: 0 !important;
    width: auto !important;
}

.fan-size-nav a
{
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background: var(--white-glass) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: var(--text-mid) !important;
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    line-height: 1;
    padding: 0.42rem 1rem !important;
    text-decoration: none !important;
    text-shadow: none !important;
    text-transform: uppercase;
    transition: all 0.22s ease;
}

.fan-size-nav a::before
{
    color: var(--gold) !important;
    content: "#" !important;
    margin-right: 3px !important;
    opacity: 0.85 !important;
}

.fan-size-nav a:hover
{
    background: linear-gradient(120deg, rgba(201, 163, 94, 0.28) 0%, rgba(95, 179, 189, 0.22) 100%) !important;
    border-color: var(--gold) !important;
    color: var(--text-dark) !important;
    transform: translateY(-2px);
}

.fan-size-nav a:focus-visible
{
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.fan-size-nav a:visited
{
    color: var(--text-mid) !important;
}

.fan-size-nav a:active
{
    background: linear-gradient(120deg, rgba(201, 163, 94, 0.4) 0%, rgba(95, 179, 189, 0.32) 100%) !important;
    border-color: var(--gold) !important;
    color: var(--text-dark) !important;
    transform: translateY(0);
}


/* -----------------------------------------
   Code thumbnails
   Fanatically renders these with inline
   style="" attributes on both the wrapping
   .fan-code-item div (display/padding) and the
   <img> itself (display:block) - no border,
   radius or shadow at all, so they sat flat on
   the card with nothing framing them. Same
   thumbnail-card treatment as the affiliate and
   joined-listing images below.
----------------------------------------- */
.fan-code-item img
{
    background: var(--white-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.fan-code-item img:hover
{
    border-color: var(--gold);
    box-shadow: 0 6px 16px var(--shadow);
    transform: translateY(-3px);
}


/* -----------------------------------------
   Affiliates
----------------------------------------- */
.fan-affiliates-page
{
    animation: fadeUp 1s 0.2s ease both;
    margin-top: 2rem;
}

.fan-affiliates-list
{
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fan-affiliates-page .affiliate-item
{
    display: inline-flex;
    position: relative;
}

.fan-affiliates-page .affiliate-item a
{
    border-radius: 8px;
    display: block;
    line-height: 0;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fan-affiliates-page .affiliate-item a:hover
{
    box-shadow: 0 6px 16px var(--shadow);
    transform: translateY(-3px);
}

.fan-affiliates-page .affiliate-item a:hover img
{
    border-color: var(--gold);
}

.fan-affiliates-page .affiliate-item a:focus-visible
{
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.fan-affiliates-page .affiliate-item a:active
{
    box-shadow: 0 3px 10px var(--shadow);
    transform: translateY(-1px);
}

.fan-affiliates-page .affiliate-item img
{
    background: var(--white-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    display: block;
    height: auto;
    max-width: 100%;
    transition: border-color 0.25s ease;
}


/* -----------------------------------------
   Member list
----------------------------------------- */
.fan-country-nav
{
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.3rem;
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
}

.fan-country-nav li
{
    display: block;
}

.fan-country-nav a
{
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: var(--white-glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 2px 6px var(--shadow);
    color: var(--text-mid);
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    padding: 0.35rem 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.22s ease;
}

.fan-country-nav a:hover
{
    background: linear-gradient(120deg, rgba(201, 163, 94, 0.28) 0%, rgba(95, 179, 189, 0.22) 100%);
    border-color: var(--gold);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.fan-country-nav a:focus-visible
{
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.fan-country-nav a:visited
{
    color: var(--text-mid);
}

.fan-country-nav a:active
{
    background: linear-gradient(120deg, rgba(201, 163, 94, 0.4) 0%, rgba(95, 179, 189, 0.32) 100%);
    border-color: var(--gold);
    color: var(--text-dark);
    transform: translateY(0);
}

.fan-member-list
{
    border-collapse: collapse;
    width: 100%;
}

.fan-member-list th
{
    border-bottom: 2px solid var(--gold);
    color: var(--gold-bright);
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    padding: 10px 12px;
    text-align: left;
    text-transform: uppercase;
}

.fan-member-list td
{
    border-bottom: 1px solid var(--border);
    color: var(--text-mid);
    font-size: 0.95rem;
    font-weight: 400;
    padding: 10px 12px;
    transition: background 0.2s ease;
}

.fan-member-list tr:hover td
{
    background: rgba(201, 163, 94, 0.08);
}

.fan-member-list a
{
    color: var(--text-mid);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fan-member-list a:hover
{
    color: var(--text-dark);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.fan-member-list a:focus-visible
{
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.fan-member-list a:visited
{
    color: var(--text-mid);
}

.fan-member-list a:active
{
    color: var(--wine);
}


/* -----------------------------------------
   Fanlisting stats (home page)
   The one wrapper that's SUPPOSED to render a
   nested card inside <main> - a highlighted
   block, not the whole page content.
----------------------------------------- */
.fanlisting-stats-wrap {
    animation: fadeUp 1s 0.2s ease both;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: var(--white-glass);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px var(--shadow);
    margin: 2rem 0;
    padding: 2.4rem 2.8rem;
    position: relative;
}

.fanlisting-stats-wrap::before {
    background: linear-gradient(
        90deg,
        transparent,
        var(--wine) 15%,
        var(--gold) 50%,
        var(--teal) 85%,
        transparent
    );
    border-radius: 1.5rem 1.5rem 0 0;
    content: '';
    height: 2px;
    left: 8%;
    opacity: 0.6;
    position: absolute;
    right: 8%;
    top: 0;
}

.fanlisting-stats-text p {
    color: var(--text-mid);
    font-family: 'Lora', Georgia, serif;
    font-size: 1.05rem;
}


/* -----------------------------------------
   Rules page (embedded at the top of Join)
   NOTE: unboxed, same reasoning as the "Page
   content wrapper" section above.
----------------------------------------- */
.fanlisting-rules {
    animation: fadeUp 1s 0.2s ease both;
    margin-top: 2rem;
}

.fanlisting-rules-intro,
.fanlisting-rules-footer {
    color: var(--text-mid);
    font-size: 1.18rem;
    line-height: 1.75;
    margin: 0 0 1.4rem;
}

.fanlisting-rules-footer {
    border-top: 1px solid var(--border);
    color: var(--wine);
    font-style: italic;
    margin-bottom: 0;
    margin-top: 1.8rem;
    padding-top: 1.6rem;
    text-align: center;
}

.fanlisting-rules-list {
    color: var(--text-mid);
    font-size: 1.1rem;
    line-height: 1.75;
    margin: 0 0 1.4rem;
    padding-left: 1.4rem;
}

.fanlisting-rules-list li {
    margin-bottom: 0.7rem;
}

.fanlisting-rules-list li::marker {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    font-weight: 600;
}


/* -----------------------------------------
   Responsive
----------------------------------------- */
@media (max-width: 600px) {
    .fanlisting-stats-wrap
    {
        padding: 1.6rem 1.25rem;
    }

    .fanlisting-rules-intro,
    .fanlisting-rules-footer,
    .fanlisting-rules-list
    {
        font-size: 1.05rem;
    }
}


/* -----------------------------------------
   Credit line
   When several Fanatically snippets share one
   page, only the last "Powered by Fanatically"
   line should show. Fanatically removes the
   earlier ones with an inline script, but a
   strict CSP can block that, so hide them here
   too (any credit followed by another credit
   among its siblings).
----------------------------------------- */
.fanatically-credit:has(~ .fanatically-credit)
{
    display: none;
}
