/* =========================================================================
   UARO WoE — Overview (index.php) page chrome
   .woe-page-head--hero shared chrome lives in base.css so all pages that
   adopt the modifier (overview, leaderboard, sessions, kills, records,
   guild, session-detail) inherit it without duplication.
   ========================================================================= */


/* ---------- Section heads ---------- */
.woe-section__title {
    font-family: var(--woe-font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--woe-track-display);
    line-height: var(--woe-leading-title);
    color: var(--woe-text-primary);
}

.woe-section__head {
    border-bottom: 1px solid var(--woe-border);
    padding-bottom: 0.4rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.woe-section__head::after {
    /* tiny gold accent line under the title */
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, var(--df-gold), transparent);
}

.woe-section__meta {
    font-family: var(--woe-font-mono);
    font-size: var(--woe-text-eyebrow);
    letter-spacing: var(--woe-track-eyebrow);
    text-transform: uppercase;
    color: var(--woe-text-secondary);
}


/* ---------- Top-10 podium-flavored sections ----------
   Three .col-12.col-lg-4 sections in the row directly after the stat group.
   Highlight rank-1 row with gold tint, rank-2 with bone, rank-3 with rune. */
.row.g-4.woe-section > .col-12.col-lg-4 .woe-data-table tbody tr:nth-child(1) {
    background: linear-gradient(90deg, color-mix(in srgb, var(--df-gold) 14%, transparent), transparent 70%);
    box-shadow: inset 3px 0 0 var(--df-gold);
}
.row.g-4.woe-section > .col-12.col-lg-4 .woe-data-table tbody tr:nth-child(2) {
    box-shadow: inset 3px 0 0 var(--df-bone);
}
.row.g-4.woe-section > .col-12.col-lg-4 .woe-data-table tbody tr:nth-child(3) {
    box-shadow: inset 3px 0 0 var(--df-rune);
}


/* ---------- Stat group enhancements ---------- */
.woe-stat-group--wide {
    border: 1px solid var(--woe-border);
    border-radius: 4px;
    padding: 1rem;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--df-gold) 6%, transparent), transparent 40%),
        var(--woe-surface);
    position: relative;
}

/* Compose a 4-corner gold bracket on the stat group */
.woe-stat-group--wide {
    background-image:
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--df-gold) 6%, transparent), transparent 40%);
    background-size:
        14px 1.5px, 1.5px 14px,
        14px 1.5px, 1.5px 14px,
        14px 1.5px, 1.5px 14px,
        14px 1.5px, 1.5px 14px,
        100% 100%;
    background-position:
        6px 6px, 6px 6px,
        calc(100% - 6px) 6px, calc(100% - 6px) 6px,
        6px calc(100% - 6px), 6px calc(100% - 6px),
        calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) calc(100% - 6px),
        0 0;
    background-repeat: no-repeat;
}


/* ---------- Throne (castle ownership ornate frame) ---------- */
.woe-throne {
    position: relative;
    padding: 1.25rem 1rem 1.5rem;
    border: 1px solid color-mix(in srgb, var(--df-gold) 32%, var(--woe-border));
    border-radius: 4px;
    background:
        radial-gradient(ellipse at 50% -20%, color-mix(in srgb, var(--df-gold) 10%, transparent) 0%, transparent 55%),
        var(--woe-surface);
}

/* Gold corner brackets on the throne */
.woe-throne {
    background-image:
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        linear-gradient(var(--df-gold), var(--df-gold)),
        radial-gradient(ellipse at 50% -20%, color-mix(in srgb, var(--df-gold) 10%, transparent) 0%, transparent 55%);
    background-size:
        16px 2px, 2px 16px,
        16px 2px, 2px 16px,
        16px 2px, 2px 16px,
        16px 2px, 2px 16px,
        100% 100%;
    background-position:
        6px 6px, 6px 6px,
        calc(100% - 6px) 6px, calc(100% - 6px) 6px,
        6px calc(100% - 6px), 6px calc(100% - 6px),
        calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) calc(100% - 6px),
        0 0;
    background-repeat: no-repeat;
}

.woe-throne::after {
    /* Sigil flourish at the bottom */
    content: "✦  ✦  ✦";
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    color: color-mix(in srgb, var(--df-gold) 60%, transparent);
    font-size: var(--woe-text-eyebrow);
    /* Decorative sigil — letter-spacing intentionally loose (out-of-system). */
    letter-spacing: 0.4em;
    pointer-events: none;
}

.woe-throne .woe-castle-roster {
    margin: 0;
    padding: 0;
    list-style: none;
}


/* ---------- Top guilds table ---------- */
.woe-section .woe-data-table tbody tr {
    transition: background-color var(--woe-duration-fast) var(--woe-ease-out);
}
.woe-section .woe-data-table tbody tr:hover {
    background-color: var(--woe-row-hover-strong);
}


/* ---------- Timeline restyle (vertical) ----------
   Component lives at woe/includes/components/timeline.php and emits a
   .woe-emp-timeline > .woe-emp-timeline__item--{start|break|first-break|end}
   structure with .woe-emp-timeline__emp as the rail bead (containing an
   <img> for breaks, a <span class="woe-emp-timeline__glyph"> for bookends).
   Layout comes from custom.css; this block adds dark-fantasy chrome only. */

/* First-break milestone: gold ring + emperium pulse on the rail bead, and
   a gold-trimmed pill above the body. */
.woe-emp-timeline__item--first-break .woe-emp-timeline__emp {
    border-radius: 50%;
    box-shadow:
        0 0 0 2px var(--df-gold),
        0 0 18px color-mix(in srgb, var(--df-gold) 55%, transparent);
    animation: woe-emp-pulse 2.4s ease-in-out infinite;
}

/* Regular break: subtle blood ring around the rail bead. */
.woe-emp-timeline__item--break .woe-emp-timeline__emp {
    border-radius: 50%;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--df-gold) 40%, var(--woe-border)),
        0 0 12px color-mix(in srgb, var(--df-blood) 30%, transparent);
}

/* Bookend glyphs (start ▶ / end ■): rune-bone, no glow. */
.woe-emp-timeline__item--start .woe-emp-timeline__glyph,
.woe-emp-timeline__item--end .woe-emp-timeline__glyph {
    color: var(--df-bone);
    opacity: 0.7;
}

[data-bs-theme="light"] .woe-emp-timeline__item--start .woe-emp-timeline__glyph,
[data-bs-theme="light"] .woe-emp-timeline__item--end .woe-emp-timeline__glyph {
    color: var(--df-rune);
}

/* "First break" pill — JetBrains Mono uppercase gold trim. */
.woe-emp-timeline__pill {
    display: inline-block;
    font-family: var(--woe-font-mono);
    font-size: var(--woe-text-eyebrow);
    letter-spacing: var(--woe-track-eyebrow);
    text-transform: uppercase;
    color: var(--woe-text-accent);
    border: 1px solid color-mix(in srgb, var(--df-gold) 50%, var(--woe-border));
    background: color-mix(in srgb, var(--df-gold) 10%, transparent);
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 0.4rem;
    vertical-align: middle;
}

[data-bs-theme="light"] .woe-emp-timeline__pill {
    /* Color flips automatically via --woe-text-accent.
       Override the frame to blood-deep tint on cream. */
    border-color: color-mix(in srgb, var(--df-blood-deep) 40%, var(--woe-border));
    background: color-mix(in srgb, var(--df-blood-deep) 6%, transparent);
}


/* ---------- Interrupted alert ---------- */
.alert.alert-warning {
    border: 1px solid color-mix(in srgb, var(--df-ember) 50%, var(--woe-border));
    background: color-mix(in srgb, var(--df-ember) 10%, var(--woe-surface));
    color: var(--woe-text-primary);
    border-radius: 4px;
    font-family: var(--woe-font-body);
    font-style: italic;
}
.alert.alert-warning strong {
    font-style: normal;
    /* Theme-aware: ember on obsidian (dark), darker amber-brown on cream
       (light, 5.65:1 AA pass). Resolves via --woe-stat-damage-dealt. */
    color: var(--woe-stat-damage-dealt);
    font-family: var(--woe-font-display);
    text-transform: uppercase;
    letter-spacing: var(--woe-track-display);
    font-size: var(--woe-text-card-label);
}


/* ---------- Mobile: shrink hero ornaments to keep readability ---------- */
@media (max-width: 599px) {
    .woe-page-head--hero {
        padding-block: 1.4rem;
    }
    .woe-page-head--hero::after {
        width: 200px;
    }
    .woe-throne {
        padding-block: 1rem 1.4rem;
    }
}
