/* ============================================
   Blue Chip Analytics - Consensus Line Page
   Styles for the College Football Power Rating
   Consensus Prediction Tool (index.php)
   Extends base.css
   ============================================ */

/* ---- Page Header ---- */
/* Note: .header, .header-content, .nav are page-local overrides.
   The shared site header is handled by header.php + its own stylesheet. */

.header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #3182ce 100%);
    color: white;
    padding: 20px 0;
    margin-bottom: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* ---- Navigation ---- */
.nav {
    display: flex;
    justify-content: left;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nav a:hover,
.nav a.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

/* ---- Intro / Heading Block ---- */
/* .container is already defined in base.css; this page uses an
   alternate wider wrapper for the intro section only. */

.intro-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.heading {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.heading h1 {
    color: #1a365d;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
}

.heading p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #555;
}

/* ---- Summary Stats Bar ---- */
.summary-stats {
    background: white;
    padding: 0.8rem;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.8rem;
}

.summary-stats h3 {
    color: #667eea;
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

.stat-label {
    font-weight: 600;
    color: #555;
}

.stat-value {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1rem;
}

/* ---- Games Table (Desktop) ---- */
.games-table-container {
    background: white;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    margin-bottom: 1rem;
}

.games-table-header {
    background: #f5f5f5;
    color: #333;
    padding: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.games-table-header h3 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: bold;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

.games-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.games-table th {
    background: #f8f8f8;
    color: #333;
    font-weight: bold;
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.8rem;
}

.games-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    white-space: nowrap;
    font-size: 0.8rem;
}

.games-table tr:nth-child(even) {
    background-color: #fafafa;
}

.games-table tr:hover {
    background-color: #f0f0f0;
}

/* ---- Table Cell Types ---- */
.team-name {
    font-weight: normal;
    color: #333;
}

/* Highlighted row: game predicted as a pick / even */
.even-game-row {
    background-color: #fff3cd !important;
    border-left: 3px solid #ffc107;
}

/* De-emphasised row: user skipped this matchup */
.skipped-row {
    opacity: 0.5;
    background-color: #f8f9fa !important;
}

.warning-cell {
    text-align: center;
    color: #e10707;
    font-weight: bold;
}

/* ---- Slider (Desktop) ---- */
.slider-cell {
    width: 200px;
    padding: 0.3rem 0.5rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-slider {
    width: 120px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #3b82f6 0%, #f3f4f6 50%, #10b981 100%);
    outline: none;
    appearance: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    border: 2px solid #667eea;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.range-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    border: 2px solid #667eea;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.prediction-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

/* ---- Skip Checkbox ---- */
.actions-cell {
    text-align: center;
    width: 60px;
    vertical-align: middle;
}

.skip-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    margin: 0 auto;
}

/* ---- Calculator / Survey Form Section ---- */
.calculator-section {
    background: white;
    padding: 0.6rem;
    border: 1px solid #e0e0e0;
    margin-bottom: 0.5rem;
}

.calculator-section h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: bold;
}

.calculator-section h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: normal;
}

.calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

/* ---- Info / Submit Cards ---- */
.info-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.info-form {
    display: grid;
    gap: 1.5rem;
}

.submit-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

/* ---- Form Groups ---- */
/* .form-group uses base flex-column pattern; label/input scoped here */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #555;
    font-size: 0.9rem;
}

/* Broad label/input rules (page-scoped, override base resets) */
label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

input,
select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: #4c6ef5;
}

/* Tighter variants used inside .calculator-form / .calculator-section */
.form-group input,
.form-group select {
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* ---- Submit Button ---- */
/* Two visual variants present in the source; the gradient version
   (used on the submit card) takes priority via cascade order. */
.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Warning & Status Banners ---- */
.warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.success h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* Generic skipped state (used on mobile cards via JS class toggle) */
.skipped {
    opacity: 0.5;
    pointer-events: none;
}

/* ---- Mobile Cards ---- */
/* Hidden by default; shown via media query below */
.mobile-cards {
    display: none;
}

.mobile-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-card.even-game {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.mobile-card.skipped {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.mobile-matchup-number {
    font-weight: bold;
    color: #667eea;
    font-size: 0.9rem;
}

.mobile-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.mobile-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.mobile-team {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.mobile-away-team,
.mobile-home-team {
    color: #333;
}

.mobile-vs {
    color: #666;
    font-size: 0.8rem;
    margin: 0 0.5rem;
}

.mobile-prediction {
    margin-bottom: 0.75rem;
}

.mobile-prediction-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.mobile-slider-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mobile-range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #f3f4f6 50%, #10b981 100%);
    outline: none;
    appearance: none;
    cursor: pointer;
}

.mobile-range-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 2px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 2px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-prediction-text {
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.mobile-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.mobile-skip-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
}

/* ---- Email Confirmation Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    text-align: center;
}

.modal-box h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #333;
}

.modal-box p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #555;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#proceed-btn {
    background: #10b981;
    color: white;
}

#cancel-btn {
    background: #e5e7eb;
    color: #333;
}

/* ============================================
   Responsive Overrides
   ============================================ */

/* Tablet & below (≤768px) */
@media (max-width: 768px) {
    .intro-container {
        padding: 10px;
    }

    /* .container padding already handled by base.css; these tighten it further */
    .container {
        padding: 0.5rem;
    }

    .header-content {
        padding: 0 0.5rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    .nav {
        gap: 1rem;
        justify-content: center;
        flex-direction: column;
        padding: 1rem;
    }

    .nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Summary stats */
    .summary-stats {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .stat-item {
        padding: 0.3rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    /* Swap table → cards on mobile */
    .games-table-container {
        display: none;
    }

    .mobile-cards {
        display: block;
    }

    /* Calculator */
    .calculator-section {
        padding: 0.5rem;
    }

    .calculator-form {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.4rem;
        font-size: 0.85rem;
    }

    /* Submit button */
    .submit-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Structural layout tweaks */
    .hero-card {
        padding: 2rem 1rem;
    }

    .hero-card h2 {
        font-size: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .teams-container {
        flex-direction: column;
        gap: 1rem;
    }

    .team-card {
        max-width: 100%;
        width: 100%;
    }

    .actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

/* Desktop (≥769px) — ensure table shown, cards hidden */
@media (min-width: 769px) {
    .games-table-container {
        display: block;
    }

    .mobile-cards {
        display: none;
    }
}
