/* trutourney.css - TruTourney Tournament Simulator Styles */

.trutourney-page {
    padding-top: 100px;
    background-color: #f4f4f9;
}

.trutourney-main-content {
    padding-top: 2rem;
    color: var(--text-primary);
    max-width: 1200px;
    margin: 0 auto;
}

/* Section Titles */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--header-bg, #2c3e50);
    border-bottom: 2px solid var(--accent-color, #3498db);
    padding-bottom: 0.5rem;
}

/* Date Navigation */
.date-navigation {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.date-nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-nav-btn {
    background: var(--accent-color, #3498db);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.date-nav-btn:hover {
    background: #2980b9;
}

.date-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.date-selector {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 4px;
    font-size: 1rem;
    min-width: 150px;
}

.simulation-info {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    text-align: center;
}

.mode-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.mode-badge.projected {
    background: #3498db;
    color: white;
}

.mode-badge.official {
    background: #27ae60;
    color: white;
}

.mode-badge.live {
    background: #e74c3c;
    color: white;
}

/* Championship Section */
.championship-section {
    margin-bottom: 2rem;
}

.championship-chart {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 300px;
}

.championship-bar-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.championship-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.champ-team-info {
    width: 200px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.champ-seed {
    background: #333;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.champ-team-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.champ-bar-wrapper {
    flex-grow: 1;
    background: #e9ecef;
    border-radius: 4px;
    height: 24px;
    overflow: hidden;
}

.champ-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.champ-probability {
    width: 60px;
    text-align: right;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-color, #3498db);
}

/* Region Tabs */
.region-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.region-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #dee2e6);
    background: var(--card-bg, #ffffff);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.region-tab:hover {
    background: #f0f0f0;
}

.region-tab.active {
    background: var(--accent-color, #3498db);
    color: white;
    border-color: var(--accent-color, #3498db);
}

/* Probabilities Table */
.probabilities-section {
    margin-bottom: 2rem;
}

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

.sim-results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    overflow: hidden;
}

.sim-results-table th,
.sim-results-table td {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color, #dee2e6);
}

.sim-results-table th {
    background: var(--header-bg, #2c3e50);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.sim-results-table tbody tr:hover {
    background: #f8f9fa;
}

.sim-results-table .col-seed {
    width: 50px;
}

.sim-results-table .col-team {
    text-align: left;
    min-width: 150px;
}

.sim-results-table .col-region {
    width: 80px;
}

.sim-results-table .col-prob {
    width: 60px;
}

.sim-results-table .col-champ {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    font-weight: 700;
    color: #1a1a1a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sim-results-table th.col-champ {
    background: linear-gradient(135deg, #d4af37 0%, #c5a028 100%);
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.sim-results-table td.col-champ {
    color: #1a1a1a;
    font-size: 1rem;
}

/* Probability cell styling */
.prob-high {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
    font-weight: 600;
}

.prob-medium {
    background: rgba(241, 196, 15, 0.2);
    color: #f39c12;
}

.prob-low {
    color: var(--text-secondary, #666);
}

.prob-zero {
    color: #ccc;
}

/* Matchup Calculator */
.matchup-section {
    margin-bottom: 2rem;
}

.matchup-calculator {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 1.5rem;
}

.matchup-inputs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.team-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 4px;
    font-size: 1rem;
    min-width: 200px;
}

.vs-label {
    font-weight: 700;
    color: var(--text-secondary, #666);
}

.calculate-btn {
    background: var(--accent-color, #3498db);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
}

.calculate-btn:hover {
    background: #2980b9;
}

.matchup-result {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.matchup-placeholder {
    color: var(--text-secondary, #666);
    font-style: italic;
}

.matchup-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.matchup-team {
    text-align: center;
}

.matchup-team-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.matchup-win-prob {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color, #3498db);
}

.matchup-vs {
    font-size: 1.5rem;
    color: var(--text-secondary, #666);
}

/* Methodology Section */
.methodology-section {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.methodology-section p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary, #555);
}

.methodology-section p:last-child {
    margin-bottom: 0;
}

/* Loading State */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary, #666);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .date-navigation {
        flex-direction: column;
    }

    .matchup-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .team-select {
        min-width: auto;
        width: 100%;
    }

    .champ-team-info {
        width: 120px;
        font-size: 0.8rem;
    }

    .sim-results-table {
        font-size: 0.85rem;
    }

    .sim-results-table th,
    .sim-results-table td {
        padding: 0.5rem 0.25rem;
    }
}
