/**
 * NCAAM Historical Records Page Styles
 * Dedicated stylesheet for the history page
 * Updated: January 11, 2026 - Match NFL KPI style, centered headers, improved tables
 */

/* ============================================
   History Page Wrapper
   ============================================ */
.shamlock-history-wrapper {
    min-height: 100vh;
    background: var(--sham-bg, #f9fafb);
    padding-bottom: 40px;
}

/* Container - match other pages */
.shamlock-history-wrapper .shamlock-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Page Header - Match NFL Picks page style
   ============================================ */
.shamlock-history-wrapper .shamlock-header {
    background: #ffffff;
    padding: 40px 0 30px 0;
    text-align: center;
    border-top: 4px solid var(--sham-green, #16a34a);
    border-radius: 12px 12px 0 0;
    margin: 20px auto 0 auto;
    max-width: 1400px;
}

.shamlock-history-wrapper .page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--sham-green, #16a34a);
    margin-bottom: 8px;
}

.shamlock-history-wrapper .page-title .accent {
    color: #1f2937;
}

.shamlock-history-wrapper .shamlock-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* ============================================
   Filters Bar
   ============================================ */
.shamlock-history-filters {
    background: #ffffff;
    border-bottom: 1px solid var(--sham-line, #e5e7eb);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shamlock-select,
.shamlock-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    min-width: 160px;
}

.shamlock-select:focus,
.shamlock-input:focus {
    outline: none;
    border-color: var(--sham-green, #16a34a);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* ============================================
   Section Titles - Green header bar, CENTERED
   ============================================ */
.shamlock-history-wrapper .section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--sham-green, #16a34a);
    padding: 12px 20px;
    margin: 0 0 20px 0;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.shamlock-history-wrapper .section-title .accent {
    color: #ffffff;
}

/* ============================================
   Season Performance KPIs - Match NFL Style
   ============================================ */
.shamlock-season-performance {
    padding: 32px 0;
}

.shamlock-history-wrapper .shamlock-kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

.shamlock-history-wrapper .shamlock-kpi-card {
    background: var(--sham-card, #ffffff);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--sham-green, #16a34a);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 140px;
    text-align: center;
    position: relative;
}

.shamlock-history-wrapper .shamlock-kpi-title {
    font-size: 0.9rem;
    color: var(--sham-muted, #6b7280);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* KPI Title - Show full on desktop, abbreviated on mobile */
.shamlock-history-wrapper .shamlock-kpi-title .kpi-title-abbr {
    display: none;
}

.shamlock-history-wrapper .shamlock-kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sham-green, #16a34a);
    margin-bottom: 12px;
    line-height: 1;
}

/* Red color for percentages under 50% */
.shamlock-history-wrapper .shamlock-kpi-value.kpi-under-50 {
    color: #dc3545;
}

.shamlock-history-wrapper .shamlock-kpi-record {
    font-size: 1rem;
    color: var(--sham-text, #374151);
    margin-bottom: 8px;
}

.shamlock-history-wrapper .shamlock-kpi-streak {
    font-size: 0.85rem;
    color: var(--sham-muted, #6b7280);
    margin-top: auto;
}

/* ============================================
   Confidence Breakdown - ATS + Totals Rows
   ============================================ */
.shamlock-confidence-section {
    padding: 32px 0;
    background: #ffffff;
}

.confidence-row-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 24px 0 12px 0;
    text-align: center;
}

.confidence-row-title:first-of-type {
    margin-top: 0;
}

.confidence-kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin: 0 auto;
    max-width: 900px;
}

/* Confidence KPI cards - compact size */
.confidence-kpi {
    border-top-color: var(--sham-gold, #d6b25e) !important;
}

/* Border color classes - applied via JS based on win rate */
.confidence-kpi.border-gold {
    border-top-color: var(--sham-gold, #d6b25e) !important;
}

.confidence-kpi.border-green {
    border-top-color: var(--sham-green, #16a34a) !important;
}

.confidence-kpi.border-red {
    border-top-color: #dc3545 !important;
}

.confidence-kpi .shamlock-kpi-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.confidence-kpi .shamlock-kpi-title .stars {
    font-size: 14px;
    color: var(--sham-gold, #d6b25e);
    letter-spacing: 1px;
}

.confidence-kpi .shamlock-kpi-title .star-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--sham-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Confidence cards - compact size */
.confidence-row .shamlock-kpi-card {
    padding: 15px 10px;
    min-height: auto;
}

.confidence-row .shamlock-kpi-value {
    font-size: 1.5rem;
}

.confidence-row .shamlock-kpi-subtitle {
    font-size: 12px;
}

/* ============================================
   Daily Results Section
   ============================================ */
.shamlock-daily-results {
    padding: 32px 0;
    background: #ffffff;
}

/* Daily Controls Bar - Month selector + Team search */
.daily-controls-bar {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.daily-controls-bar .month-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.daily-controls-bar .month-selector label,
.daily-controls-bar .team-search-wrapper label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.daily-controls-bar .shamlock-select {
    min-width: 160px;
}

.daily-controls-bar .team-search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.daily-controls-bar .shamlock-input {
    width: 250px;
}

/* Legacy: Team Search Bar in Summary View */
.daily-search-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    max-width: 400px;
}

.daily-search-bar label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.daily-search-bar .shamlock-input {
    width: 100%;
}

/* Detail Filter Bar */
.detail-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-filter-bar .shamlock-input {
    max-width: 300px;
}

#detailFilterCount {
    font-size: 13px;
    color: #6b7280;
}

/* Team Search Autocomplete Dropdown */
.team-search-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.team-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.team-search-dropdown.active {
    display: block;
}

.team-search-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
    transition: background 0.15s;
}

.team-search-item:last-child {
    border-bottom: none;
}

.team-search-item:hover,
.team-search-item.selected {
    background: #f0fdf4;
    color: var(--sham-green, #16a34a);
}

.team-search-item .team-conference {
    font-size: 12px;
    color: #9ca3af;
    margin-left: 8px;
}

.team-search-no-results {
    padding: 12px 14px;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

/* Daily Summary Table - Centered */
.daily-summary-table {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

/* Daily Games Table - HTML Table structure */
.daily-games-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    max-width: 100%;
    margin: 0 auto;
}

.daily-games-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.daily-games-table thead th {
    background: var(--sham-green, #16a34a);
    padding: 12px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
}

.daily-games-table thead th.col-game {
    text-align: left;
    min-width: 160px;
}

.daily-games-table tbody td {
    padding: 12px 10px;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.daily-games-table tbody td.col-game {
    text-align: left;
}

.daily-games-table tbody tr:hover td {
    background: #f9fafb;
}

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

/* Daily Summary Table Header - ALL white text */
.daily-header {
    display: grid;
    background: var(--sham-green, #16a34a);
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
    grid-template-columns: 100px 60px 1fr 1fr 1fr 1fr;
    text-align: center;
}

/* Ensure all spans in headers are white */
.daily-header span {
    color: #ffffff !important;
}

/* Daily Summary Rows */
.daily-row {
    display: grid;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    transition: background 0.15s;
    grid-template-columns: 100px 60px 1fr 1fr 1fr 1fr;
    cursor: pointer;
    text-align: center;
}

.daily-row:hover {
    background: #f9fafb;
}

.daily-row:last-child {
    border-bottom: none;
}

/* Aggregate totals row */
.daily-aggregate {
    border-top: 2px solid var(--sham-green, #0d6939);
    background: #f8fafc;
}

.daily-aggregate .aggregate-row {
    background: transparent;
    cursor: default;
}

.daily-aggregate .aggregate-row:hover {
    background: transparent;
}

.daily-aggregate .col-date {
    color: var(--sham-green, #0d6939);
}

.col-date {
    font-weight: 600;
    color: #1f2937;
    text-align: left;
}

.col-games {
    text-align: center;
    color: #6b7280;
}

.col-ats,
.col-ou,
.col-su,
.col-sbr {
    text-align: center;
    font-weight: 600;
}

.units-positive {
    color: var(--sham-green, #16a34a);
}

.units-negative {
    color: var(--sham-red, #dc2626);
}

.record-winning {
    color: var(--sham-green, #16a34a);
}

.record-losing {
    color: var(--sham-red, #dc2626);
}

.record-even {
    color: #6b7280;
}

/* Detail View */
.back-to-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 16px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}

.back-to-summary:hover {
    background: #e5e7eb;
}

.detail-date-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.detail-summary-bar {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.summary-item {
    color: #6b7280;
}

.summary-divider {
    color: #d1d5db;
}

/* Matchup/Game cell content layout - use inline display to preserve table cell borders */
.col-matchup,
.col-game {
    /* Don't use display:flex on td - breaks border-bottom alignment */
}

.at-symbol {
    color: #9ca3af;
    font-size: 12px;
}

.col-pick,
.col-ats-pick,
.col-ou-pick {
    font-weight: 600;
    color: #374151;
}

/* O/U Pick Stacked Display */
.col-ou-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.ou-direction {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
}

.ou-value {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.col-pred-score,
.col-final,
.col-pred-total {
    text-align: center;
    font-weight: 500;
    color: #374151;
}

.col-result,
.col-ats-result,
.col-ou-result,
.col-su-result,
.col-sbr-result {
    text-align: center;
    font-weight: 700;
}

.result-win {
    color: var(--sham-green, #16a34a);
}

.result-loss {
    color: var(--sham-red, #dc2626);
}

.result-push {
    color: #f59e0b;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.page-btn.active {
    background: var(--sham-green, #16a34a);
    border-color: var(--sham-green, #16a34a);
    color: #ffffff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 8px 4px;
    color: #9ca3af;
}

/* ============================================
   Conference Standings - Expanded columns
   ============================================ */
.shamlock-standings-section {
    padding: 32px 0;
}

.standings-controls {
    margin-bottom: 20px;
    text-align: center;
}

.standings-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.standings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
}

.standings-table th {
    background: var(--sham-green, #16a34a);
    padding: 12px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

/* Picker record columns - slightly different styling */
.standings-table th.picker-col {
    background: var(--sham-green-dark, #15803d);
}

.standings-table td {
    padding: 10px;
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    background: #fff;
}

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

.standings-table tr:hover td {
    background: #f9fafb;
}

/* Sticky columns only apply at tablet/mobile - see media queries below */

.rank-cell {
    font-weight: 700;
    color: #6b7280;
    width: 50px;
    min-width: 50px;
    background: #fff;
}

.team-cell {
    font-weight: 600;
    color: #1f2937;
    text-align: left !important;
    white-space: nowrap;
    min-width: 120px;
    background: #fff;
}

/* Ensure sticky columns keep background on hover */
.standings-table tr:hover .rank-cell,
.standings-table tr:hover .team-cell {
    background: #f9fafb;
}

.record-cell {
    color: #374151;
}

/* SBR Lock Icon for Non-Members */
.sbr-lock-icon {
    width: 16px;
    height: 16px;
    filter: grayscale(100%);
    opacity: 0.6;
    vertical-align: middle;
}

.pct-cell {
    font-weight: 600;
    color: var(--sham-green, #16a34a);
}

.streak-cell {
    font-weight: 600;
}

.streak-win {
    color: var(--sham-green, #16a34a);
}

.streak-loss {
    color: var(--sham-red, #dc2626);
}

.no-data,
.error-cell,
.loading-cell {
    text-align: center;
    color: #6b7280;
    padding: 40px 16px;
}

/* ============================================
   Back to Picks Link
   ============================================ */
.shamlock-back-link {
    padding: 24px 0;
    text-align: center;
}

.back-to-picks {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--sham-green, #16a34a);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-to-picks:hover {
    background: var(--sham-green-hover, #15803d);
}

/* ============================================
   Loading States
   ============================================ */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6b7280;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--sham-green, #16a34a);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

/* ============================================
   Skeleton Loaders
   ============================================ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-row {
    height: 48px;
    margin-bottom: 8px;
    border-radius: 6px;
}

.skeleton-rows {
    padding: 8px 0;
}

.skeleton-table-row td {
    padding: 4px 0;
}

.error-state {
    text-align: center;
    padding: 40px;
    color: var(--sham-red, #dc2626);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .shamlock-history-wrapper .shamlock-kpis {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .shamlock-history-wrapper .shamlock-kpis {
        grid-template-columns: repeat(3, 1fr);
    }

    .confidence-kpis {
        grid-template-columns: repeat(5, 1fr);
        max-width: 100%;
        gap: 10px;
    }

    .confidence-row .shamlock-kpi-card {
        padding: 12px 8px;
    }

    .confidence-row .shamlock-kpi-value {
        font-size: 1.25rem;
    }

    .confidence-kpi .shamlock-kpi-title .stars {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .shamlock-history-wrapper .page-title {
        font-size: 1.75rem;
    }

    .shamlock-history-wrapper .shamlock-kpi-title .kpi-title-full {
        display: none;
    }
    .shamlock-history-wrapper .shamlock-kpi-title .kpi-title-abbr {
        display: inline;
    }

    .shamlock-history-wrapper .shamlock-kpis {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .shamlock-select,
    .shamlock-input {
        width: 100%;
    }

    .confidence-kpis {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        max-width: 100%;
    }

    .confidence-row .shamlock-kpi-card {
        padding: 10px 6px;
    }

    .confidence-row .shamlock-kpi-value {
        font-size: 1rem;
    }

    .confidence-row .shamlock-kpi-record {
        font-size: 0.75rem;
    }

    .confidence-kpi .shamlock-kpi-title .stars {
        font-size: 10px;
        letter-spacing: 0;
    }

    .confidence-kpi .shamlock-kpi-title .star-label {
        font-size: 8px;
    }

    .confidence-row-title {
        font-size: 0.85rem;
    }

    /* ============================================
       TABLET: Daily Summary - Full width, no horizontal scroll needed
       ============================================ */
    .daily-summary-table {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .daily-header,
    .daily-row,
    .aggregate-row {
        grid-template-columns: 1fr 0.6fr 1.1fr 1.1fr 0.9fr 0.9fr;
        font-size: 12px;
        padding: 10px 12px;
        white-space: nowrap;
    }

    /* Prevent text wrapping in result columns */
    .daily-row .col-ats,
    .daily-row .col-ou,
    .daily-row .col-su,
    .daily-row .col-sbr,
    .aggregate-row .col-ats,
    .aggregate-row .col-ou,
    .aggregate-row .col-su,
    .aggregate-row .col-sbr {
        white-space: nowrap;
    }

    /* TABLET: Ensure border shows above aggregate row */
    .daily-aggregate {
        border-top: 2px solid var(--sham-green, #0d6939);
    }

    /* ============================================
       TABLET: Daily Games Table - Horizontal scroll, NO sticky
       ============================================ */
    .daily-games-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .daily-games-table {
        min-width: 700px;
    }

    /* Remove sticky columns - use horizontal scroll instead */
    .daily-games-table th.col-game,
    .daily-games-table td.col-game {
        position: static;
        z-index: auto;
        box-shadow: none;
    }

    /* ============================================
       TABLET: Conference Standings - Horizontal scroll, NO sticky
       ============================================ */
    .standings-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .standings-table {
        min-width: 650px;
        border-collapse: separate;
        border-spacing: 0;
        table-layout: auto;
    }

    .standings-table th,
    .standings-table td {
        padding: 8px 6px;
        font-size: 11px;
        white-space: nowrap;
        /* No sticky - horizontal scroll instead */
        position: static;
        z-index: auto;
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .shamlock-history-wrapper .shamlock-header {
        padding: 24px 0;
    }

    .shamlock-history-wrapper .page-title {
        font-size: 1.5rem;
    }

    .shamlock-history-wrapper .shamlock-kpis {
        grid-template-columns: 1fr;
    }

    /* Daily Summary - horizontal scroll on mobile */
    .daily-summary-table {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .daily-header,
    .daily-row,
    .aggregate-row {
        min-width: 500px;
        grid-template-columns: 80px 50px 90px 90px 70px 70px;
    }

    /* Show SU column - horizontal scroll handles overflow */
    .col-su {
        display: inline !important;
    }

    .pagination-controls {
        flex-wrap: wrap;
    }

    /* ============================================
       MOBILE: Daily Summary - Stack record/pct vertically
       The content is like "3-2 (60.0%)" - use word-wrap to stack
       ============================================ */
    .daily-row .col-ats,
    .daily-row .col-ou,
    .daily-row .col-su,
    .daily-row .col-sbr,
    .aggregate-row .col-ats,
    .aggregate-row .col-ou,
    .aggregate-row .col-su,
    .aggregate-row .col-sbr {
        font-size: 10px;
        line-height: 1.4;
    }

    /* Aggregate row needs more room for record tallies */
    .daily-header,
    .daily-row,
    .aggregate-row {
        min-width: 540px;
        grid-template-columns: 80px 44px 1fr 1fr 1fr 1fr;
    }

    /* MOBILE: Ensure border shows above aggregate row - must match row min-width for horizontal scroll */
    .daily-aggregate {
        border-top: 2px solid var(--sham-green, #0d6939) !important;
        min-width: 540px;
    }

    /* MOBILE: Detail summary bar - stack label above record */
    .detail-summary-bar {
        flex-wrap: wrap;
        gap: 0;
        padding: 10px 12px;
    }

    .detail-summary-bar .summary-divider {
        display: none;
    }

    .detail-summary-bar .summary-item {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        font-size: 12px;
        padding: 4px 6px;
    }

    /* ============================================
       MOBILE: Daily Games Table - Horizontal scroll, NO sticky
       ============================================ */
    .daily-games-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .daily-games-table {
        min-width: 700px;
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
    }

    .daily-games-table th,
    .daily-games-table td {
        padding: 8px 6px;
        font-size: 11px;
        white-space: nowrap;
        text-align: center;
    }

    .daily-games-table tbody td {
        border-bottom: 1px solid #e5e7eb;
    }

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

    .daily-games-table thead th {
        background: var(--sham-green, #16a34a);
        color: #fff;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .daily-games-table tbody td {
        background: #fff;
    }

    .daily-games-table tbody tr:nth-child(even) td {
        background: #f9fafb;
    }

    /* Game column - NO sticky, just left-align */
    .daily-games-table th.col-game,
    .daily-games-table td.col-game {
        text-align: left;
        min-width: 120px;
    }

    /* O/U Pick column - stacked layout */
    .daily-games-table .col-ou-pick {
        line-height: 1.2;
    }

    .daily-games-table .col-ou-pick .ou-direction,
    .daily-games-table .col-ou-pick .ou-value {
        display: block;
    }

    /* ============================================
       MOBILE: Conference Standings - Show ALL columns with scroll
       ============================================ */
    .standings-table th.picker-col,
    .standings-table td:nth-child(n+7) {
        display: table-cell !important;
    }
}

/* ==========================================================================
   HISTORY PAGE GATING
   7-day window for non-members, blur older content with CTA
   Per gating spec v2
   ========================================================================== */

/* Blurred/gated rows beyond 7-day window */
.history-gated-row {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
    opacity: 0.6;
}

/* CTA bar inserted before gated content */
.history-gate-cta {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin: 16px 0;
    padding: 0;
}

.gate-cta-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    flex-wrap: wrap;
}

.gate-cta-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.gate-cta-text {
    flex: 1;
    min-width: 200px;
}

.gate-cta-text h4 {
    color: #166534;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.gate-cta-text p {
    color: var(--sham-green-hover, #15803d);
    font-size: 0.875rem;
    margin: 0;
}

.gate-cta-button {
    background: var(--sham-green, #16a34a);
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.gate-cta-button:hover {
    background: var(--sham-green-hover, #15803d);
    color: #fff;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .gate-cta-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .gate-cta-text {
        min-width: unset;
    }

    .gate-cta-button {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   History Detail Gated Section
   For non-members trying to view pick-by-pick history
   ============================================ */
.history-detail-gated {
    padding: 20px;
}

.history-detail-gated .gated-content-card {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.05) 0%, #ffffff 100%);
    border: 2px solid rgba(22, 163, 74, 0.2);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
}

.history-detail-gated .gated-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.history-detail-gated .gated-content-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.history-detail-gated .gated-headline {
    font-size: 1.1rem;
    color: #374151;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.history-detail-gated .gated-subtext {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.history-detail-gated .shamlock-upgrade-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--sham-green, #16a34a), var(--sham-green-hover, #15803d));
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.history-detail-gated .shamlock-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

@media (max-width: 640px) {
    .history-detail-gated .gated-content-card {
        padding: 40px 24px;
        margin: 20px auto;
    }

    .history-detail-gated .gated-content-card h3 {
        font-size: 1.25rem;
    }
}
