/* PHL Schedule Page Styles */

/* Header Styles */
.schedule-header {
    margin-bottom: 2rem;
}

.schedule-title {
    color: var(--phl-orange);
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 0;
}

/* Filter Section Styles */
.schedule-filters .card {
    border: 2px solid var(--phl-orange);
    box-shadow: 0 4px 8px rgba(239, 123, 0, 0.1);
}

.schedule-filters .card-header {
    background-color: var(--phl-orange);
    border-bottom: 1px solid var(--phl-orange-dark);
}

.schedule-filters .card-title {
    color: white;
    font-weight: 600;
}

.schedule-filters .form-label {
    font-weight: 600;
    color: var(--phl-blue);
    margin-bottom: 0.5rem;
}

.schedule-filters .form-select,
.schedule-filters .form-control {
    border: 2px solid var(--phl-line);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.schedule-filters .form-select:focus,
.schedule-filters .form-control:focus {
    border-color: var(--phl-orange);
    box-shadow: 0 0 0 0.2rem rgba(239, 123, 0, 0.25);
}

/* Multi-select styling */
.schedule-filters select[multiple] {
    min-height: 120px;
    background-image: none;
}

.schedule-filters .playoff-week {
    background-color: var(--phl-gold-soft);
    color: var(--phl-warn);
    font-weight: 600;
}

.schedule-filters .regular-week {
    background-color: #ffffff;
    color: var(--phl-text);
}

/* Quick Filter Buttons */
.schedule-filters .btn-group .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.btn-outline-phl-primary {
    color: var(--phl-orange);
    border-color: var(--phl-orange);
    background-color: transparent;
}

.btn-outline-phl-primary:hover,
.btn-outline-phl-primary:focus,
.btn-outline-phl-primary:active {
    background-color: var(--phl-orange);
    border-color: var(--phl-orange);
    color: white;
}

/* Results Summary */
.schedule-summary {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--phl-line);
}

.results-info {
    font-size: 0.95rem;
    color: var(--phl-muted);
}

.loading-indicator {
    color: var(--phl-orange);
    font-size: 0.875rem;
}

/* Schedule Table Styles */
.schedule-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.schedule-table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.schedule-table .table-group-header {
    background-color: var(--phl-blue);
    color: white;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-color: var(--phl-blue-dark);
    vertical-align: middle;
}

.schedule-table thead th {
    background-color: var(--phl-gray);
    color: var(--phl-blue);
    font-weight: 600;
    font-size: 0.85rem;
    border-color: var(--phl-line);
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
    vertical-align: middle;
}

.schedule-table .sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.schedule-table .sortable:hover {
    background-color: rgba(239, 123, 0, 0.1);
}

.schedule-table .sortable i {
    margin-left: 0.25rem;
    font-size: 0.75rem;
    color: var(--phl-orange);
}

.schedule-table tbody tr {
    transition: background-color 0.2s ease;
}

.schedule-table tbody tr:hover {
    background-color: rgba(239, 123, 0, 0.05);
}

.schedule-table tbody td {
    padding: 0.75rem 0.5rem;
    border-color: var(--phl-line);
    vertical-align: middle;
}

/* Matchup Row Styling */
.matchup-row.current-week {
    background-color: rgba(70, 130, 180, 0.1);
    border-left: 4px solid var(--phl-blue);
}

.matchup-row.playoff-game {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--phl-gold);
}

/* Team and Owner Styling */
.schedule-table .fw-bold {
    font-weight: 700;
    color: var(--phl-blue);
}

.schedule-table a {
    color: var(--phl-blue);
    transition: color 0.2s ease;
}

.schedule-table a:hover {
    color: var(--phl-orange);
    text-decoration: underline;
}

/* Score and Outcome Styling */
.text-success {
    color: var(--phl-win) !important;
    font-weight: 600;
}

.text-danger {
    color: var(--phl-loss) !important;
    font-weight: 600;
}

.schedule-table .text-end {
    text-align: right;
    font-weight: 500;
}

.schedule-table .text-center {
    text-align: center;
}

/* Box Score Button */
.btn-outline-primary {
    --bs-btn-color: var(--phl-blue);
    --bs-btn-border-color: var(--phl-blue);
    --bs-btn-hover-bg: var(--phl-blue);
    --bs-btn-hover-border-color: var(--phl-blue);
    --bs-btn-active-bg: var(--phl-blue);
    --bs-btn-active-border-color: var(--phl-blue);
}

.btn-outline-primary .fas {
    font-size: 0.75rem;
}

/* Pagination Styles */
.schedule-pagination .pagination {
    margin-bottom: 0;
}

.schedule-pagination .page-link {
    color: var(--phl-blue);
    border-color: var(--phl-line);
    padding: 0.5rem 0.75rem;
}

.schedule-pagination .page-link:hover {
    color: var(--phl-orange);
    background-color: rgba(239, 123, 0, 0.1);
    border-color: var(--phl-orange);
}

.schedule-pagination .page-item.active .page-link {
    background-color: var(--phl-orange);
    border-color: var(--phl-orange);
    color: white;
}

.schedule-pagination .page-item.disabled .page-link {
    color: var(--phl-muted);
    background-color: #fff;
    border-color: var(--phl-line);
}

/* Responsive Design */
@media (max-width: 768px) {
    .schedule-title {
        font-size: 1.75rem;
    }
    
    .schedule-filters .row {
        row-gap: 1rem;
    }
    
    .schedule-filters .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .schedule-table {
        font-size: 0.8rem;
    }
    
    .schedule-table thead th,
    .schedule-table tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    .schedule-table .table-group-header {
        font-size: 0.75rem;
    }
    
    /* Stack certain columns on mobile */
    .schedule-table .d-md-none {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .schedule-header .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .schedule-table tbody td:nth-child(3),
    .schedule-table tbody td:nth-child(4) {
        display: none;
    }
    
    .schedule-table thead th:nth-child(3),
    .schedule-table thead th:nth-child(4) {
        display: none;
    }
}

/* Loading States */
.loading-indicator.show {
    display: inline-flex !important;
    align-items: center;
}

.table-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation for filter updates */
.schedule-table-container.updating {
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

/* Filter Badge Styling */
.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: var(--phl-orange);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    margin: 0.25rem 0.25rem 0 0;
}

.filter-badge .btn-close {
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='m.235 1.47 6.53 6.53L.235 14.53l1.06 1.06L7.825 9.06l6.53 6.53 1.06-1.06L9.885 8.06l6.53-6.53L15.355.47 8.825 7l-6.53-6.53L1.235.47z'/%3e%3c/svg%3e");
    font-size: 0.5rem;
    opacity: 1;
}

.filter-badges {
    margin-top: 0.5rem;
    min-height: 1rem;
}

/* Empty State */
.schedule-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--phl-muted);
}

.schedule-empty i {
    font-size: 3rem;
    color: var(--phl-blue);
    margin-bottom: 1rem;
}

.schedule-empty h5 {
    color: var(--phl-blue);
    margin-bottom: 1rem;
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sortable:focus {
    outline: 2px solid var(--phl-orange);
    outline-offset: -2px;
}