/* WARDOGS Asia match statistics page. Builds on /wardogs/wardogs.css (shell, panels, kicker, tables). */

.ws-hero {
    padding: 120px 0 40px;
}

.ws-hero h1 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 8px 0 12px;
}

.ws-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.72);
}

.ws-section {
    padding: 28px 0;
}

.ws-section h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.4rem;
    margin: 0 0 14px;
}

.ws-note {
    font-family: var(--text-mono);
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 10px 0 0;
}

/* Live panel */
.ws-live {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 860px) {
    .ws-live {
        grid-template-columns: 1.2fr 1fr;
    }
}

.ws-live-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 18px;
    margin-bottom: 14px;
}

.ws-live-map {
    font-family: 'Manrope', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
}

.ws-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    background: #7a7a7a;
}

.ws-dot.on {
    background: #36b37e;
    box-shadow: 0 0 10px rgba(54, 179, 126, 0.8);
}

.ws-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ws-score {
    flex: 1 1 120px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--wd-panel);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ws-score b {
    display: block;
    font-family: var(--text-mono);
    font-size: 1.5rem;
}

.ws-score span {
    font-family: var(--text-mono);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Window switch and tiles */
.ws-switch {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 18px;
}

.ws-switch button {
    font-family: var(--text-mono);
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--wd-olive-line);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.ws-switch button.is-active {
    background: var(--wd-olive-dim);
    color: #fff;
    border-color: var(--wd-olive);
}

.ws-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.ws-tile {
    padding: 16px 18px;
    border-radius: 10px;
    background: var(--wd-panel-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ws-tile b {
    display: block;
    font-family: var(--text-mono);
    font-size: 1.7rem;
}

.ws-tile span {
    font-family: var(--text-mono);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--wd-olive);
}

/* Faction bars */
.ws-bars {
    display: grid;
    gap: 10px;
}

.ws-bar {
    display: grid;
    grid-template-columns: 110px 1fr 90px;
    align-items: center;
    gap: 12px;
    font-family: var(--text-mono);
    font-size: 0.85rem;
}

.ws-bar-track {
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ws-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--wd-olive);
}

.ws-bar-fill.lonestar { background: #3b82f6; }
.ws-bar-fill.valkyra { background: #ef4444; }
.ws-bar-fill.manticore { background: #22c55e; }

.ws-faction {
    font-weight: 700;
}

.ws-faction.lonestar { color: #7fb0ff; }
.ws-faction.valkyra { color: #ff8a8a; }
.ws-faction.manticore { color: #7ee2a0; }

/* Grids of panels */
.ws-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 760px) {
    .ws-grid.two {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1000px) {
    .ws-grid.three {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.ws-panel {
    padding: 22px 22px 16px;
}

.ws-panel h3 {
    font-family: var(--text-mono);
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wd-olive);
    margin: 0 0 10px;
}

.ws-table-wrap {
    overflow-x: auto;
}

.wd-time-table td.num,
.wd-time-table th.num {
    text-align: right;
    font-family: var(--text-mono);
    white-space: nowrap;
}

.wd-time-table tr.is-clickable {
    cursor: pointer;
}

.wd-time-table tr.is-clickable:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.ws-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.ws-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    padding: 10px 0;
}

/* Hour chart */
.ws-hours {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 3px;
    align-items: end;
    height: 120px;
}

.ws-hour {
    background: var(--wd-olive);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    opacity: 0.85;
}

.ws-hours-labels {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 3px;
    font-family: var(--text-mono);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    text-align: center;
}

/* Detail drawer (match or player) */
.ws-detail {
    margin-top: 18px;
}

.ws-detail-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.ws-close {
    font-family: var(--text-mono);
    font-size: 0.74rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
}

.ws-status {
    font-family: var(--text-mono);
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Player search */
.ws-search {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.ws-search input {
    flex: 1 1 260px;
    max-width: 480px;
    font: inherit;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--wd-olive-line);
    background: var(--wd-panel);
    color: #fff;
}

.ws-search input:focus {
    outline: none;
    border-color: var(--wd-olive);
}

.ws-search button {
    font-family: var(--text-mono);
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--wd-olive);
    background: var(--wd-olive-dim);
    color: #fff;
    cursor: pointer;
}

/* Unique players by window */
.ws-unique .ws-tile.is-active {
    border-color: var(--wd-olive);
}

/* Sortable headers and the filter row */
.wd-time-table th.ws-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.wd-time-table th.ws-sortable[data-sort="asc"]::after {
    content: " \25B2";
    font-size: 0.6rem;
}

.wd-time-table th.ws-sortable[data-sort="desc"]::after {
    content: " \25BC";
    font-size: 0.6rem;
}

.wd-time-table tr.ws-filters td {
    padding: 4px 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wd-time-table tr.ws-filters input {
    width: 100%;
    min-width: 56px;
    box-sizing: border-box;
    font-family: var(--text-mono);
    font-size: 0.72rem;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
}

.wd-time-table tr.ws-filters input:focus {
    outline: none;
    border-color: var(--wd-olive);
}

.wd-time-table tr.ws-filters input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Small action buttons in tables and key/value lines in the player panel */
.ws-btn {
    font-family: var(--text-mono);
    font-size: 0.68rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--wd-olive-line);
    background: var(--wd-olive-dim);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.ws-btn:hover {
    border-color: var(--wd-olive);
}

.ws-kv {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 6px;
}

.ws-kv span {
    color: rgba(255, 255, 255, 0.6);
}

.ws-kv b {
    font-family: var(--text-mono);
    text-align: right;
}

/* Detail dialog: one layer for a player or a match, opened over the page */
.ws-dialog {
    width: min(1180px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 1px solid var(--wd-olive-line);
    border-radius: var(--radius-m, 14px);
    background: #101210;
    color: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.ws-dialog::backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.ws-dialog-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: #101210;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ws-dialog-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.ws-dialog-kind {
    display: block;
    font-family: var(--text-mono);
    font-size: 0.66rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wd-olive);
}

.ws-dialog-heading h3 {
    margin: 2px 0 0;
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-dialog-body {
    padding: 18px 20px 24px;
    overflow: auto;
    max-height: calc(100vh - 48px - 70px);
}

.ws-dialog-lead {
    font-family: var(--text-mono);
    font-size: 0.85rem;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
    .ws-dialog {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: 0;
    }

    .ws-dialog-body {
        max-height: calc(100vh - 70px);
        padding: 14px 16px 24px;
    }
}
