/* Dedicated updates board — dungeon theme on /updates/, space overrides on SC hub */

.updates-page .hero-lead {
    max-width: 42rem;
}

.updates-legend-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.updates-legend-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.updates-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid var(--panel-border);
}

body.theme-dungeon .updates-toolbar {
    border-color: rgba(110, 90, 62, 0.35);
    background: rgba(12, 10, 8, 0.45);
}

.updates-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.upd-tab {
    appearance: none;
    border: 1px solid rgba(140, 110, 70, 0.45);
    background: linear-gradient(180deg, #302621 0%, #1c1512 100%);
    color: #d7c4a4;
    border-radius: 4px;
    padding: 7px 12px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(186, 110, 63, 0.2);
}

.upd-tab:hover {
    border-color: rgba(196, 154, 72, 0.7);
    color: #f3e6c8;
}

.upd-tab.is-active {
    background: linear-gradient(180deg, #f3cf68 0%, #b8860b 100%);
    border-color: #6e4d02;
    color: #2e1d03;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

#updates-game-filter {
    min-width: 160px;
    max-width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    background: rgba(2, 6, 23, 0.45);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
}

.updates-list {
    display: grid;
    gap: 10px;
}

.upd-item {
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.28);
    overflow: hidden;
}

body.theme-dungeon .upd-item {
    border-color: rgba(110, 90, 62, 0.4);
    background: rgba(18, 14, 11, 0.55);
    box-shadow: inset 0 1px 0 rgba(232, 210, 160, 0.05);
}

.upd-item-summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px 12px;
    align-items: start;
    width: 100%;
    padding: 12px 14px;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.upd-item-summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.upd-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    grid-column: 1 / -1;
}

.upd-item-title {
    grid-column: 1 / 3;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

.upd-item-chevron {
    grid-column: 3;
    grid-row: 2;
    color: var(--muted);
    font-size: 0.85rem;
    align-self: center;
}

.upd-item.is-open .upd-item-chevron {
    transform: rotate(180deg);
}

.upd-item-body {
    display: none;
    padding: 0 14px 14px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.upd-item.is-open .upd-item-body {
    display: block;
}

.upd-item-body p {
    margin: 0 0 8px;
}

.upd-item-foot {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--muted);
}

.upd-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.upd-badge-game {
    color: #f3cf68;
    border-color: rgba(184, 134, 11, 0.55);
    background: rgba(184, 134, 11, 0.12);
}

.upd-badge-server {
    color: #c4b5a0;
    border-color: rgba(140, 120, 95, 0.55);
    background: rgba(90, 70, 50, 0.25);
}

.upd-badge-steam {
    color: #9ecbff;
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(37, 99, 235, 0.15);
}

.upd-badge-buildonly {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.1);
}

.upd-badge-sc-live {
    color: #67e8f9;
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.12);
}

.upd-badge-live {
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(74, 222, 128, 0.12);
}

.upd-badge-patch-notes {
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(59, 130, 246, 0.14);
}

.upd-badge-hotfix {
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.5);
    background: rgba(234, 88, 12, 0.14);
}

.upd-badge-ptu {
    color: #d8b4fe;
    border-color: rgba(192, 132, 252, 0.45);
    background: rgba(147, 51, 234, 0.12);
}

.upd-badge-source {
    color: var(--muted);
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.35);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.upd-game-chip {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
}

.upd-date {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.upd-pending {
    color: #f97316;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Thin ticker on main page */
.updates-ticker {
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(110, 90, 62, 0.42);
    background: rgba(18, 14, 11, 0.55);
    box-shadow: inset 0 1px 0 rgba(232, 210, 160, 0.06);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

.updates-ticker-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c49a48;
    white-space: nowrap;
}

.updates-ticker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.updates-ticker-list li {
    font-size: 0.85rem;
    color: var(--muted);
    min-width: 0;
}

.updates-ticker-list a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.updates-ticker-list a:hover {
    color: #f3cf68;
    text-decoration: underline;
}

.updates-ticker-more {
    margin-left: auto;
    white-space: nowrap;
}

.updates-ticker[hidden],
.updates-ticker.is-empty {
    display: none;
}

/* SC hub bottom section (theme-space) */
body.theme-space .sc-updates-section {
    margin-top: 22px;
}

body.theme-space .upd-tab {
    border-color: rgba(45, 212, 191, 0.35);
    background: rgba(8, 20, 32, 0.85);
    color: #b6e7df;
    border-radius: 2px;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    box-shadow: none;
}

body.theme-space .upd-tab.is-active {
    background: linear-gradient(180deg, rgba(45, 212, 191, 0.35), rgba(8, 47, 73, 0.9));
    border-color: rgba(45, 212, 191, 0.7);
    color: #ecfeff;
    text-shadow: none;
}

body.theme-space .upd-badge-game {
    color: #5eead4;
    border-color: rgba(45, 212, 191, 0.5);
    background: rgba(45, 212, 191, 0.12);
}

body.theme-space .upd-badge-server {
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.45);
    background: rgba(250, 204, 21, 0.1);
}

body.theme-space .sc-updates-ticker {
    margin: 0 0 18px;
    border-color: rgba(45, 212, 191, 0.28);
    background: rgba(4, 14, 24, 0.72);
    box-shadow: inset 0 1px 0 rgba(45, 212, 191, 0.08);
}

body.theme-space .sc-updates-ticker .updates-ticker-label {
    color: #5eead4;
}

body.theme-space .sc-updates-ticker .updates-ticker-list a:hover {
    color: #5eead4;
}

body.theme-space .upd-item {
    border-color: rgba(45, 212, 191, 0.22);
    background: rgba(6, 18, 30, 0.65);
}

body.theme-space .updates-toolbar {
    border-color: rgba(45, 212, 191, 0.22);
    background: rgba(4, 14, 24, 0.55);
}

html[data-theme="light"] .updates-ticker,
html[data-theme="light"] .upd-item,
html[data-theme="light"] .updates-toolbar {
    background: rgba(255, 255, 255, 0.55);
}

html[data-theme="light"] .upd-tab {
    background: #f3efe6;
    color: #3b2f1f;
}

html[data-theme="light"] .upd-tab.is-active {
    background: linear-gradient(180deg, #f3cf68 0%, #b8860b 100%);
    color: #2e1d03;
}

@media (max-width: 720px) {
    .upd-item-summary {
        grid-template-columns: 1fr auto;
    }

    .upd-item-title {
        grid-column: 1;
    }

    .upd-item-chevron {
        grid-column: 2;
        grid-row: 2;
    }

    .updates-ticker-more {
        margin-left: 0;
        width: 100%;
    }
}
