/* ============================================================
   maps.css — Map Stats page styles
   Requires: style.css (base, nav, footer, shared components)
   ============================================================ */

/* ---------- Table card ---------- */

.table-card {
    background: rgba(12, 12, 12, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    margin-bottom: 40px;
}

.table-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.table-card-header h2 {
    font-family: 'Future Rot', sans-serif;
    font-size: 22px;
    color: #ff9900;
    margin: 0;
    letter-spacing: 1px;
}

.map-count {
    font-family: 'StratumNo2', sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: #555;
    letter-spacing: 1px;
}

/* ---------- Table wrapper & scrollbar ---------- */

.table-wrapper {
    overflow-x: auto;
}

.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ---------- Table ---------- */

.maps-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'StratumNo2', sans-serif;
    font-size: 14px;
}

.maps-table th {
    background: rgba(5, 5, 5, 0.95);
    color: #ff9900;
    font-family: 'StratumNo2', sans-serif;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 153, 0, 0.2);
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

.maps-table th.col-name {
    text-align: left;
}

.maps-table th.sortable {
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.maps-table th.sortable:hover {
    background: rgba(255, 153, 0, 0.08);
    color: #ffbb44;
}

.maps-table th.sort-desc,
.maps-table th.sort-asc {
    color: #ffcc66;
    background: rgba(255, 153, 0, 0.1);
}

.sort-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.maps-table th.sortable:hover .sort-icon,
.maps-table th.sort-desc .sort-icon,
.maps-table th.sort-asc .sort-icon {
    opacity: 1;
}

.maps-table td {
    padding: 10px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #999;
    transition: background 0.15s ease;
}

.maps-table td.col-name {
    text-align: left;
}

.maps-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
    color: #bbb;
}

.maps-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- Map name ---------- */

.col-name {
    min-width: 200px;
}

.map-name {
    font-family: 'StratumNo2', sans-serif;
    font-weight: normal;
    color: #ccc;
    font-size: 14px;
}

/* ---------- Loading / error ---------- */

.loading-cell {
    text-align: center !important;
    padding: 52px 0 !important;
    color: #444;
    font-family: 'StratumNo2', sans-serif;
    font-size: 15px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 153, 0, 0.2);
    border-top-color: #ff9900;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-cell {
    text-align: center !important;
    padding: 52px 0 !important;
    color: #c0392b;
    font-family: 'StratumNo2', sans-serif;
    font-size: 13px;
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.page-btn {
    font-family: 'StratumNo2', sans-serif;
    font-size: 13px;
    color: #666;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 34px;
    text-align: center;
}

.page-btn:hover:not(:disabled) {
    color: #ff9900;
    border-color: rgba(255, 153, 0, 0.35);
    background: rgba(255, 153, 0, 0.06);
}

.page-btn.active {
    color: #ff9900;
    border-color: rgba(255, 153, 0, 0.5);
    background: rgba(255, 153, 0, 0.1);
    cursor: default;
}

.page-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.page-dots {
    color: #444;
    font-size: 13px;
    padding: 0 4px;
    line-height: 1;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .maps-table th,
    .maps-table td {
        padding: 9px 10px;
        font-size: 12px;
    }

    .col-stat {
        display: none;
    }

    /* keep time and common kills on mobile */
    .maps-table th:nth-child(2),
    .maps-table td:nth-child(2),
    .maps-table th:nth-child(3),
    .maps-table td:nth-child(3) {
        display: table-cell;
    }
}
