/* Blue Ridge Sports Schedule Widget Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

.brss-sports-schedule-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

/* Table Container Styles */
.brss-schedule-table-container {
    position: relative;
    background-color: #ffffff;
    margin-bottom: 20px;
    max-height: 400px; /* Default height, can be overridden by Elementor */
    overflow-y: auto;
}

/* Table Styles */
.brss-schedule-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    margin: 0;
    table-layout: fixed;
}

/* Fixed Header */
.brss-table-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Header Styles */
.brss-schedule-table thead th {
    background-color: #1e3a8a;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    padding: 16px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #ffffff;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.brss-schedule-table thead th:last-child {
    border-right: none;
}


/* Ensure column alignment between header and body */
.brss-schedule-table th,
.brss-schedule-table td {
    box-sizing: border-box;
    padding: 16px 20px;
    width: 0; /* Force equal width distribution */
}

/* Specific column widths to match image - both header and body */
.brss-schedule-table th:nth-child(1),
.brss-schedule-table td:nth-child(1) {
    width: 25%;
    min-width: 120px;
}

.brss-schedule-table th:nth-child(2),
.brss-schedule-table td:nth-child(2) {
    width: 50%;
    min-width: 200px;
}

.brss-schedule-table th:nth-child(3),
.brss-schedule-table td:nth-child(3) {
    width: 25%;
    min-width: 100px;
    text-align: center;
}

/* Adjust for 2 columns when no results */
.brss-schedule-table-container:not(.has-results) th:nth-child(1),
.brss-schedule-table-container:not(.has-results) td:nth-child(1) {
    width: 30%;
}

.brss-schedule-table-container:not(.has-results) th:nth-child(2),
.brss-schedule-table-container:not(.has-results) td:nth-child(2) {
    width: 70%;
}

/* Custom scrollbar for table body */
.brss-table-body-container::-webkit-scrollbar {
    width: 8px;
}

.brss-table-body-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.brss-table-body-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.brss-table-body-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Sort Icon */
.brss-sort-icon {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.brss-sort-icon:hover {
    opacity: 1;
}

.brss-sort-icon.sorted {
    opacity: 1;
}

/* Table Body Styles */
.brss-schedule-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.brss-schedule-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Table Cell Styles */
.brss-schedule-table td {
    vertical-align: middle;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    border-right: 1px solid #e5e7eb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.brss-schedule-table td:last-child {
    border-right: none;
}

/* Date Column */
.brss-date {
    font-weight: 600;
    color: var(--brss-date-color, #111827);
    white-space: nowrap;
    font-size: 14px;
}

.brss-date strong {
    font-weight: 700;
    color: var(--brss-date-color, #111827);
}

.brss-time {
    font-weight: 400;
    color: #6b7280;
    font-size: 13px;
    display: block;
    margin-top: 2px;
}

/* Opponent Column */
.brss-opponent {
    color: #111827;
    cursor: pointer;
}

.brss-home-away {
    font-weight: 400;
    margin-right: 4px;
    color: #111827;
}

.brss-team-name {
    font-weight: 600;
    color: #111827;
}

.brss-location {
    color: #111827;
    font-size: 13px;
    display: block;
    margin-top: 2px;
    font-weight: 400;
}

/* Location Link Styles */
.brss-location-link {
    color: #2563eb;
    text-decoration: underline;
    font-size: 13px;
    display: block;
    margin-top: 2px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.brss-location-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.brss-location-link:visited {
    color: #7c3aed;
}

/* Result Column */
.brss-result {
    font-weight: 600;
    text-align: left;
    font-size: 14px;
}

.brss-result.win {
    color: #16a34a;
    font-weight: 700;
}

.brss-result.loss {
    color: #dc2626;
    font-weight: 700;
}

.brss-result.tie {
    color: #f59e0b;
    font-weight: 700;
}

.brss-result.not-played {
    color: #111827;
    font-weight: 400;
}

/* Live Stream Button */
.brss-live-stream-container {
    text-align: center;
    margin-top: 20px;
}

.brss-live-stream-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #991b1b;
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.brss-live-stream-btn:hover {
    background-color: #7f1d1d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.brss-live-stream-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brss-play-icon {
    font-size: 12px;
    margin-right: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .brss-schedule-table {
        font-size: 13px;
    }
    
    .brss-schedule-table th,
    .brss-schedule-table td {
        padding: 8px 12px;
    }
    
    .brss-live-stream-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .brss-schedule-table {
        font-size: 12px;
    }
    
    .brss-schedule-table th,
    .brss-schedule-table td {
        padding: 6px 8px;
    }
    
    .brss-live-stream-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .brss-location,
    .brss-location-link {
        font-size: 11px;
    }
}

/* No Events Message */
.brss-no-events-row {
    border-bottom: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.brss-no-events-message {
    text-align: center;
    padding: 40px 20px !important;
    vertical-align: middle;
}

.brss-no-events-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.brss-no-events-content p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.brss-no-events-content p:first-child {
    font-weight: 600;
    color: #111827;
    font-size: 15px;
}

.brss-no-events-subtitle {
    font-size: 13px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
}

/* Elementor Editor Styles */
.elementor-editor .brss-sports-schedule-widget {
    pointer-events: none;
}

.elementor-editor .brss-sports-schedule-widget * {
    pointer-events: none;
}

/* Ensure perfect column alignment */
.brss-schedule-table-container {
    position: relative;
}

/* Force column widths to be identical */
.brss-schedule-table-container .brss-schedule-table {
    width: 100%;
    table-layout: fixed;
}

/* Specific column widths */
.brss-schedule-table th:nth-child(1),
.brss-schedule-table td:nth-child(1) {
    width: 25%;
}

.brss-schedule-table th:nth-child(2),
.brss-schedule-table td:nth-child(2) {
    width: 50%;
}

.brss-schedule-table th:nth-child(3),
.brss-schedule-table td:nth-child(3) {
    width: 25%;
}
