/* Weekly Schedule Styles */
.weekly-schedule-section {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e1e5e9);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.weekly-schedule-section h2 {
    color: var(--text-color, #333);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.schedule-container {
    position: relative;
}

.schedule-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--muted-color, #666);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color, #e1e5e9);
    border-top: 3px solid var(--accent-color, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.schedule-error {
    text-align: center;
    padding: 2rem;
    color: var(--error-color, #dc3545);
    background: var(--error-bg, #f8d7da);
    border-radius: 8px;
}

.schedule-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e1e5e9);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--table-bg, #fff);
}

.schedule-table thead th {
    background: var(--header-bg, #f8f9fa);
    color: var(--header-text, #495057);
    font-weight: 600;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color, #dee2e6);
    white-space: nowrap;
}

.schedule-table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    vertical-align: top;
}

.schedule-table tbody tr:hover {
    background: var(--hover-bg, #f8f9fa);
}

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

/* Column specific styles */
.schedule-table td:first-child {
    font-weight: 500;
    color: var(--primary-color, #007bff);
    white-space: nowrap;
}

.schedule-table td:nth-child(2) {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    white-space: nowrap;
    color: var(--time-color, #6c757d);
}

.schedule-table td:nth-child(3) {
    font-weight: 500;
}

.schedule-table td:nth-child(4) {
    color: var(--desc-color, #6c757d);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Responsive design */
@media (max-width: 768px) {
    .schedule-table {
        font-size: 0.8rem;
    }
    
    .schedule-table td,
    .schedule-table th {
        padding: 0.5rem;
    }
    
    .schedule-table td:nth-child(4) {
        display: none; /* Hide description on mobile */
    }
    
    .schedule-table thead th:nth-child(4) {
        display: none;
    }
}

/* Dark mode support */
[data-theme="dark"] .weekly-schedule-section,
.dark-mode .weekly-schedule-section {
    --card-bg: #2a2d3a;
    --border-color: #3e4144;
    --text-color: #e9ecef;
    --muted-color: #adb5bd;
    --header-bg: #343a40;
    --header-text: #f8f9fa;
    --table-bg: #2a2d3a;
    --hover-bg: #343a40;
    --primary-color: #66b3ff;
    --time-color: #adb5bd;
    --desc-color: #adb5bd;
    --error-color: #f8d7da;
    --error-bg: #721c24;
    --accent-color: #66b3ff;
}

/* Fallback mode indicator */
.fallback-mode .weekly-schedule-section {
    opacity: 0.8;
    border-left: 4px solid var(--warning-color, #ffc107);
}

.fallback-mode .weekly-schedule-section::before {
    content: "📅 Afișare din program";
    display: block;
    font-size: 0.8rem;
    color: var(--warning-color, #856404);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Loading states */
.schedule-table tbody.loading {
    opacity: 0.6;
    pointer-events: none;
}

.schedule-table tbody.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color, #e1e5e9);
    border-top: 2px solid var(--accent-color, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}