/* =============================================
   COMPONENT: Tables
   Source: layout/style.css lines 322-389
           layout/newStyle.css lines 3809-3918
   ============================================= */

/* -----------------------------------------
   Base Table Styles
   ----------------------------------------- */

table {
    margin: 10px 0 20px 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px;
}

table tr td img {
    max-width: 520px;
}


/* -----------------------------------------
   TableContent & Table3 Variants
   ----------------------------------------- */

table.TableContent tr td,
table.Table3 tr td {
    background: #f1e0c5;
}

table.TableContent tr.LabelH td {
    background: #240606;
}


/* -----------------------------------------
   TableContainer Override
   ----------------------------------------- */

.TableContainer table {
    margin: 0 !important;
}

.TableContainer td {
    padding: 2px 3px !important;
}


/* -----------------------------------------
   scoreTable - Shared Table Style
   Used by: highscores, onlinelist, support,
            killers, deaths, guilds, forum
   ----------------------------------------- */

.scoreTable {
    border-collapse: separate;
    border-spacing: 0 8px;
    width: 100%;
}

/* Table Header */
.scoreTable tr.yellow th,
.scoreTable tr.yellow td {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.9) 0%, rgba(101, 67, 33, 0.95) 100%);
    color: var(--color-gold-light, #FFD700);
    padding: 12px 15px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 600;
    border: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
}

.scoreTable tr.yellow th::after,
.scoreTable tr.yellow td::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
}

.scoreTable tr.yellow th:first-child,
.scoreTable tr.yellow td:first-child {
    border-radius: 8px 0 0 8px;
}

.scoreTable tr.yellow th:last-child,
.scoreTable tr.yellow td:last-child {
    border-radius: 0 8px 8px 0;
}

/* Data Rows */
.scoreTable tr.special {
    cursor: pointer;
    transition: all 0.3s ease;
}

.scoreTable tr.special td {
    background: linear-gradient(180deg, rgba(60, 25, 25, 0.85) 0%, rgba(40, 15, 15, 0.9) 100%);
    padding: 12px 15px;
    border-top: 1px solid rgba(255, 215, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    vertical-align: middle;
    color: #ddd;
    font-size: var(--font-size-base, 14px);
    transition: all 0.3s ease;
}

.scoreTable tr.special td:first-child {
    border-radius: 8px 0 0 8px;
    border-left: 3px solid rgba(255, 215, 0, 0.4);
}

.scoreTable tr.special td:last-child {
    border-radius: 0 8px 8px 0;
}

/* Hover */
.scoreTable tr.special:hover td {
    background: linear-gradient(180deg, rgba(80, 35, 35, 0.95) 0%, rgba(55, 22, 22, 0.98) 100%);
    border-top-color: rgba(255, 215, 0, 0.2);
}

.scoreTable tr.special:hover td:first-child {
    border-left-color: var(--color-gold-light, #FFD700);
}

/* Links in scoreTable */
.scoreTable tr.special td a {
    color: var(--color-text-primary, #fff);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.scoreTable tr.special td a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold-light, #FFD700);
    transition: width 0.3s ease;
}

.scoreTable tr.special td a:hover {
    color: var(--color-gold-light, #FFD700);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    text-decoration: none;
}

.scoreTable tr.special td a:hover::after {
    width: 100%;
}

/* Outfit column */
.scoreTable .outfitColumn {
    text-align: center;
    width: 70px;
}

.scoreTable .outfitColumn img {
    max-height: 64px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.scoreTable tr.special:hover .outfitColumn img {
    transform: scale(1.1);
}

/* Name column */
.scoreTable .nameColumn {
    text-align: left;
    font-weight: 500;
}

.scoreTable .nameColumn a {
    color: var(--color-text-primary, #fff);
    text-decoration: none;
    transition: all 0.3s ease;
}

.scoreTable .nameColumn a:hover {
    color: var(--color-gold-light, #FFD700);
    text-shadow: 0 0 10px rgba(201, 165, 92, 0.2);
}

.scoreTable .nameColumn img {
    margin-right: 8px;
    vertical-align: middle;
}


/* -----------------------------------------
   News Table (Parchment Style)
   ----------------------------------------- */

table#news {
    width: 100% !important;
    border: none !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
}

/* Text colors for parchment (dark text on light background) */
table#news td,
table#news p,
table#news span,
table#news div {
    background: transparent !important;
    color: #3d2b1f !important;
    font-family: var(--font-body) !important;
    border: none !important;
}

table#news td {
    color: #3d2b1f !important;
}

table#news tr.yellow td.zheadline {
    color: #4a3728 !important;
}

table#news a {
    color: #6b4423 !important;
}

table#news a:hover {
    color: #8b5a2b !important;
}

/* News table cells */
table#news td {
    padding: 10px 0 !important;
}

/* Headlines */
table#news tr.yellow td.zheadline {
    font-weight: bold !important;
    font-size: var(--font-size-lg) !important;
    padding-bottom: var(--spacing-base) !important;
    border-bottom: 1px solid rgba(74, 55, 40, 0.3) !important;
}

table#news p {
    line-height: 1.7 !important;
}

/* Images inside news */
table#news img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2) !important;
}


/* -----------------------------------------
   Changelog Table (Parchment Style)
   ----------------------------------------- */

table#changelogTable {
    width: 100% !important;
    border: none !important;
    border-collapse: separate !important;
    background: transparent !important;
}

table#changelogTable td {
    background: transparent !important;
    color: #3d2b1f !important;
    border: none !important;
    padding: 8px 10px !important;
}

table#changelogTable tr.yellow td {
    color: #4a3728 !important;
    font-weight: bold !important;
}

table#changelogTable a {
    color: #6b4423 !important;
}


/* -----------------------------------------
   Status Indicators (shared across pages)
   ----------------------------------------- */

.status-online {
    color: #28fc03;
    font-weight: bold;
    background: linear-gradient(135deg, rgba(40, 252, 3, 0.2) 0%, rgba(40, 252, 3, 0.1) 100%);
    padding: 5px 12px;
    border-radius: var(--radius-pill, 50px);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(40, 252, 3, 0.3);
    box-shadow: 0 0 15px rgba(40, 252, 3, 0.2);
    display: inline-block;
}

.status-offline {
    color: var(--color-error-bright, #ff4444);
    font-weight: bold;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.15) 0%, rgba(255, 68, 68, 0.08) 100%);
    padding: 5px 12px;
    border-radius: var(--radius-pill, 50px);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 68, 68, 0.25);
    display: inline-block;
}


/* -----------------------------------------
   Responsive: News & Changelog Tables
   ----------------------------------------- */

@media (max-width: 768px) {
    table#news,
    table#changelogTable {
        padding: 40px 25px 60px 25px !important;
        margin: 10px auto !important;
    }
}
