/* Page sheet for guilds.php. Linked after style.css by includes/css.php,
   so these rules win ties against the shared sheet. */

#guild-grid { opacity: 0; transition: opacity 0.35s ease; }
#guild-grid.loaded { opacity: 1; }

/* Embedded so styling holds even with a stale cached style.css */
.player-link { color: inherit; text-decoration: none; transition: color 0.15s; }
.player-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── Guild cards ─────────────────────────────────────
   align-self:start = each card is only as tall as its own
   content, so expanding one no longer stretches its row. */
.guild-grid  { align-items: start; }
.guild-card  {
    align-self: start;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.guild-banner {
    position: relative; height: 90px; overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(154,35,35,0.10), transparent 70%),
        linear-gradient(135deg, #17120f 0%, #0c0a09 100%);
    border-bottom: 1px solid var(--border);
}
.guild-monogram {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.7rem; font-weight: 900;
    color: rgba(201,168,76,0.45);
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.guild-banner::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.4));
}
.guild-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 14px;
}
.guild-body  { padding: 15px 18px 16px; }
.guild-name  {
    color: var(--text-main); font-size: 1.05rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 12px;
}
.guild-meta  { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 0.76rem; font-weight: 600;
    color: var(--text-mid);
}
.chip svg     { opacity: 0.7; }
.guild-line   { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 4px; }
.guild-line b { color: var(--text-mid); font-weight: 600; }
.guild-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 14px;
    color: var(--accent); font-size: 0.7rem; font-weight: 800;
    letter-spacing: 0.12em; text-transform: uppercase;
}
.guild-toggle svg { transition: transform 0.25s ease; }
.guild-card.open .guild-toggle svg { transform: rotate(180deg); }
.guild-details {
    display: block; overflow: hidden;
    max-height: 0; opacity: 0;
    transition: max-height 0.32s ease, opacity 0.25s ease,
                margin-top 0.25s ease, padding-top 0.25s ease;
    border-top: 1px solid transparent;
}
.guild-details.active {
    max-height: 3000px; opacity: 1;
    margin-top: 14px; padding-top: 14px;
    border-top-color: var(--border);
}
.detail-label {
    color: var(--accent); font-size: 0.66rem; text-transform: uppercase;
    letter-spacing: 0.1em; display: block; margin-bottom: 5px;
}
.detail-value { color: var(--text-mid); font-size: 0.9rem; display: block; }
.member-links { line-height: 1.95; }
.chip-stat { font-variant-numeric: tabular-nums; }
/* Match the Σ / x̄ chip-key markers: accent colour, full opacity. */
.chip svg.chip-icon { color: var(--accent); opacity: 1; flex-shrink: 0; }

/* ── Combined boss-kill breakdown under the member list ── */
.boss-breakdown {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border);
}
.boss-breakdown-title {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent);
    font-size: 0.66rem; font-weight: 800;
    letter-spacing: 0.1em; text-transform: uppercase;
}
.boss-breakdown-title svg { opacity: 0.8; }
.boss-stat {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
}
.boss-stat .boss-name  { color: var(--text-dim); letter-spacing: 0.02em; }
.boss-stat .boss-kills { color: var(--text-mid); font-weight: 800; font-variant-numeric: tabular-nums; }
.chip-stat .chip-key {
    color: var(--accent); font-weight: 800; margin-right: 2px;
    font-family: 'Cambria Math', Georgia, serif;
}
.member-filter {
    display: block; width: 100%; margin: 8px 0 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 7px 10px;
    color: var(--text-main);
    font: inherit; font-size: 0.85rem;
}
.member-filter:focus { outline: none; border-color: var(--accent); }
.member-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.85rem;
}
.member-table th, .member-table td {
    text-align: left; padding: 6px 10px;
    border-bottom: 1px solid var(--border);
}
.member-table th {
    cursor: pointer; user-select: none;
    color: var(--accent);
    font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em;
    font-weight: 800;
}
.member-table th .sort-ind::after { content: ''; opacity: 0.6; margin-left: 4px; font-size: 0.7rem; }
.member-table th.sort-asc  .sort-ind::after { content: '▲'; }
.member-table th.sort-desc .sort-ind::after { content: '▼'; }
.member-table td { color: var(--text-mid); font-variant-numeric: tabular-nums; }
.member-table tr.hidden { display: none; }
.remort-cell img { vertical-align: middle; }
.member-table .lvl-cell {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.member-table .lvl-cell .lvl-badge {
    color: var(--sage); font-family: monospace; font-weight: 700;
}
.member-table .lvl-cell .remort-badge {
    color: var(--accent); font-weight: 900; margin-left: 4px;
}
.member-table .lvl-cell .remort-badge img { vertical-align: middle; }
.grank-cell {
    color: var(--text-mid);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}
.grank-cell.gr-1 { color: var(--gold); font-weight: 800; }
.grank-cell.gr-2 { color: #b89346; font-weight: 700; }
.grank-cell.gr-3 { color: #8aaa78; font-weight: 600; }
.grank-cell.gr-4 { color: var(--text-mid); }
.grank-cell.gr-5 { color: var(--text-dim); font-style: italic; }
.treasury-amount { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }

.richest-section { margin-top: 48px; }
.richest-head {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 18px;
    color: var(--text-mid);
    font-size: 0.72rem; font-weight: 800;
    letter-spacing: 0.16em; text-transform: uppercase;
}
.richest-head::before { content:''; width:3px; height:13px; background:var(--accent); border-radius:2px; }
.richest-head::after  { content:''; flex:1; height:1px; background:linear-gradient(90deg,var(--border-light),transparent); }

/* ── Richest guilds: the same roster row gold.php uses ───
   The list markup (rank / name / bar / amount) is the shared
   .rank-table.roster primitive in style.css; only the total
   bar below is page-local. Embedded, like gold.php's copy, so
   the section still reads with a stale cached style.css. */
/* Names its table on purpose: `.rank-table td` sets a colour and would
   otherwise out-specify a bare .gold-amount (same rule in style.css). */
.gold-amount,
.rank-table td.gold-amount { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 600; }
/* .rank-row carries cursor:pointer sitewide, so the row that has no
   card to jump to (a chest that outlived its guild) opts back out. */
.richest-row:not(.is-jump) { cursor: default; }
.richest-row .r-name { letter-spacing: 0.04em; }
/* Landing spot for that jump: clear of the sticky navbar. */
.guild-card { scroll-margin-top: calc(var(--nav-height) + 14px); }

.gold-total-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 4px; padding: 16px 20px;
    background: rgba(201,168,76,0.06);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 6px;
    text-align: left;
}
.gold-total-bar .lbl {
    font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-dim); font-weight: 700;
}
.gold-total-bar .tb-val {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.gold-total-bar .val {
    font-size: 1.4rem; font-weight: 800; color: var(--gold);
    font-variant-numeric: tabular-nums;
}
.gold-total-bar .val small { font-size: 0.7rem; color: var(--text-dim); font-weight: 600; }
.gold-total-bar .share {
    font-size: 0.72rem; color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
    .gold-total-bar .tb-val { align-items: flex-start; }
}
