/* ==========================================================================
   1. Reset & Global Base Settings
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    

    background-color: #ebebeb;
    color: #303030;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================================
   2. Control Center Sidebar Layout
   ========================================================================== */
.sidebar {
    width: 280px;
    background-color: #1e293b;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    z-index: 10;
    flex-shrink: 0;
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

#search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    background-color: #0f172a;
    color: #fff;
    font-size: 0.9rem;
}

.check-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   3. Subtle Mobile App Promotion Frame
   ========================================================================== */
.app-promo {
    margin-top: auto;
    background-color: #0f172a;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.promo-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #3b82f6;
    font-weight: bold;
}

.app-promo h4 {
    margin: 4px 0;
    font-size: 0.95rem;
}

.app-promo p {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 12px;
}

.promo-buttons {
    display: flex;
    gap: 8px;
}

.promo-buttons .btn {
    flex: 1;
    text-align: center;
    background-color: #3b82f6;
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 6px 0;
    border-radius: 4px;
    font-weight: 500;
}

/* ==========================================================================
   4. Horizontal Timeline Scrolling Track
   ========================================================================== */
.timeline-container {
    flex: 1;
    width: 100vw;
    display: flex;
    overflow-x: auto;
    overflow-y: auto;
    padding: 10px;
    gap: 7px;
    scroll-behavior: smooth;
    align-items: flex-start;
}

/* ==========================================================================
   5. Seasonal Table Columns & Division Dividers
   ========================================================================== */
.year-column {
    flex: 0 0 112px;
    padding: 7px 4px;
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.year-header {
    background: #f9f9f9;
    color: #0f172a;
    border-bottom: 2px solid #d8e2e8;
    font-size: 0.86rem;
    padding-bottom: 5px;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 3;
}

/* Static Historical Note / War Era Columns */
.war-column {
    flex: 0 0 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    border: 2px dashed #f87171;
    border-radius: 8px;
    color: #991b1b;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    font-size: 0.9rem;
    align-self: stretch;
}

/* Sub-headers inside columns */
.flight-divider {
    font-size: 0.58rem;
    padding: 2px 4px;
    margin: 5px 0 2px 0;
    font-weight: bold;
    text-transform: uppercase;


    background-color: #e3edf2;
    color: #5f7082;
    border-radius: 3px;
    letter-spacing: 0.4px;
    text-align: center;
}

/* Hides the tier divider if it lands directly below the main year header */
.year-column *:nth-child(2).flight-divider {
    font-size: 0.58rem;
    padding: 2px 4px;
    margin: 5px 0 2px 0;
    font-weight: bold;
    text-transform: uppercase;
    color: #5f7082;
    background-color: #e3edf2;
    border-radius: 3px;
    letter-spacing: 0.4px;
    text-align: center;
}
/* ==========================================================================
   6. Individual Team Row Layouts
   ========================================================================== */


.team-row {

    --team-highlight-bg: #aed7ff;
    --team-highlight-text: #000000;
    --team-highlight-ring: #2563eb;

    font-size: 0.68rem;
    line-height: 1.15;
    padding: 2px 4px;
    margin-bottom: 1px;

    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 22px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;

    background-color: #f9f9f9;
    color: #303030;

    border: transparent 1px solid;
    box-shadow: inset 0 0 0 0 transparent;
    font-weight: 600;
    transition: background-color 0.08s linear, color 0.08s linear, box-shadow 0.08s linear, opacity 0.2s;
}

.team-rank {
    flex: 0 0 14px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}



.team-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-row.is-highlighted {
    background-color: var(--team-highlight-bg);
    color: var(--team-highlight-text);
    box-shadow: inset 0 0 0 2px var(--team-highlight-ring);
    z-index: 2;
}

.team-row.is-highlighted.is-white-highlight-team {
    box-shadow:
        inset 0 0 0 2px var(--team-highlight-ring),
        0 0 0 2px var(--team-highlight-ring);
}

/* Base mouse over state */
.team-row:hover {
    z-index: 2;
}

/* ==========================================================================
   7. Historical Achievement Icons
   ========================================================================== */


.team-icons {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    margin-left: auto;
    width: auto;
    height: 14px;
    overflow: hidden;
}

.team-icon {
    display: block;
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    flex: 0 0 14px;
    object-fit: contain;
    pointer-events: none;
}

.timeline-container.hide-trophy-icons .team-icons {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    margin-left: auto;
    width: auto;
    height: 14px;
    overflow: hidden;
}

/* ==========================================================================
   8. Script Engine Interactive Filters
   ========================================================================== */
.dimmed {
    opacity: 0.15;
    background-color: #f9f9f9 !important;
    color: #cccccc !important;
    border: transparent 1px solid !important;
    box-shadow: inset 0 0 0 0 transparent !important;
}


.team-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.96);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    pointer-events: none;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.08s linear, transform 0.08s linear;
    font-size: 0.75rem;
    line-height: 1.25;
}

.team-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.team-tooltip-title {
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 3px;
}

.team-tooltip-meta {
    color: #cbd5e1;
    margin-bottom: 4px;
}

.team-tooltip-trophies {
    color: #f8fafc;
}

/* Final safety override: trophy SVGs must never use their natural dimensions. */
.team-row img,
.team-row svg,
.team-icon {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    flex: 0 0 14px !important;
    object-fit: contain !important;
}



