/**
 * Racing Schedule Frontend Styles
 * Matches the Southern Thunder schedule table design
 */

.racing-schedule-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Scroll hint text */
.racing-schedule-wrapper::before {
    content: '← Scroll →';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 11px;
    color: #666;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 10px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.racing-schedule-wrapper.scrollable::before {
    opacity: 1;
}

/* Hide scroll hint on mobile after user starts scrolling */
@media screen and (max-width: 768px) {
    .racing-schedule-wrapper::before {
        font-size: 10px;
        padding: 4px 8px;
        top: 5px;
        right: 10px;
    }
    
    .racing-schedule-wrapper.scrolling::before {
        opacity: 0;
    }
}

/* Header Section */
.racing-schedule-header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.racing-schedule-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.racing-schedule-sponsor {
    display: flex;
    align-items: center;
}

.racing-schedule-sponsor img {
    max-height: 60px;
    width: auto;
}

/* Table Styles */
.racing-schedule-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.4;
    table-layout: auto;
}

.racing-schedule-table thead {
    background: #2c3e50;
}

.racing-schedule-table thead th {
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    text-transform: capitalize;
    border: none;
    white-space: nowrap;
}

.racing-schedule-table tbody tr.odd {
    background: #fff;
}

.racing-schedule-table tbody tr.even {
    background: #f5f5f5;
}

.racing-schedule-table tbody tr:hover {
    background: #e8f4f8;
}

.racing-schedule-table tbody td {
    padding: 8px 12px;
    border: none;
    vertical-align: middle;
    white-space: nowrap;
}

/* Column Widths */
.racing-schedule-table .col-date {
    min-width: 70px;
    width: auto;
    position: sticky;
    left: 0;
    z-index: 10;
}

.racing-schedule-table .col-series {
    min-width: 120px;
    width: auto;
}

.racing-schedule-table .col-track {
    min-width: 200px;
    width: auto;
}

.racing-schedule-table .col-purse {
    min-width: 90px;
    width: auto;
    text-align: right;
    padding-right: 20px;
}

.racing-schedule-table thead .col-purse {
    text-align: right;
    padding-right: 20px;
}

.racing-schedule-table .col-winner {
    min-width: 150px;
    width: auto;
}

/* Winner Styling */
.racing-schedule-table .winner-name a,
.racing-schedule-table .winner-name {
    color: #c41e3a;
    text-decoration: none;
    font-weight: 500;
}

.racing-schedule-table .winner-name a:hover {
    text-decoration: underline;
    color: #8b0000;
}

/* Status Styling */
.racing-schedule-table .status-cancelled,
.racing-schedule-table .status-postponed,
.racing-schedule-table .status-rained-out,
.racing-schedule-table .status-reset {
    color: #666;
    font-style: italic;
}

/* No Events Message */
.racing-schedule-wrapper .no-events {
    padding: 20px;
    text-align: center;
    background: #f5f5f5;
    color: #666;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .racing-schedule-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .racing-schedule-table {
        font-size: 11px;
        min-width: 550px;
    }
    
    .racing-schedule-table thead th {
        font-size: 10px;
        padding: 8px 10px;
    }
    
    .racing-schedule-table tbody td {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    /* Ensure full text is visible on mobile */
    .racing-schedule-table thead th,
    .racing-schedule-table tbody td {
        white-space: nowrap;
    }
}

@media screen and (max-width: 480px) {
    .racing-schedule-table {
        font-size: 10px;
        min-width: 500px;
    }
    
    .racing-schedule-table thead th {
        font-size: 9px;
        padding: 6px 8px;
        font-weight: 600;
    }
    
    .racing-schedule-table tbody td {
        font-size: 10px;
        padding: 6px 8px;
    }
    
    /* Ensure all content is visible on very small screens */
    .racing-schedule-table .col-date {
        min-width: 60px;
        width: auto;
    }
    
    .racing-schedule-table .col-series {
        min-width: 100px;
        width: auto;
    }
    
    .racing-schedule-table .col-track {
        min-width: 180px;
        width: auto;
    }
    
    .racing-schedule-table .col-purse {
        min-width: 80px;
        width: auto;
    }
    
    .racing-schedule-table .col-winner {
        min-width: 130px;
        width: auto;
    }
}
