/* Timetable Page Styles */

/* Layout */
.timetable-main {
    max-width: 72rem;
    /* max-w-6xl */
    margin: 0 auto;
    padding: 0 1.5rem 4rem 1.5rem;
    font-family: 'Open Sans', sans-serif;
    min-height: 60vh;
}

/* Page Header (Imported from News/FAQs via global convention or redefine if needed) */
.page-header {
    background-color: var(--color-light, #f3f4f6);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    margin-bottom: 2rem;
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--color-dark, #1f2937);
    margin: 0;
}

/* Info Section */
.info-section {
    text-align: center;
    margin-bottom: 3rem;
}

.info-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary, #f97316);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-weight: 600;
    color: #4b5563;
    /* Gray-600 */
}

.info-icon {
    color: var(--color-primary, #f97316);
    margin-right: 0.5rem;
}

/* Toolbar */
.toolbar-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: var(--color-light, #f3f4f6);
}

@media (min-width: 768px) {
    .toolbar-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

/* Search */
.search-wrapper {
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .search-wrapper {
        width: 33%;
    }
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    /* Gray-300 */
    border-radius: 0.5rem;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--color-primary, #f97316);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* Filters */
.filters-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .filters-wrapper {
        width: 65%;
        align-items: flex-end;
    }
}

.filters-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

.filters-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .filters-group {
        justify-content: flex-end;
    }
}

.filter-select {
    padding: 0.75rem 2rem 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    width: 100%;
    /* Full width on mobile */
    min-width: 180px;
    transition: border-color 0.2s;
    margin-bottom: 0.5rem;
    /* Spacing between stacked selects on mobile */
}

@media (min-width: 768px) {
    .filter-select {
        width: auto;
        /* Auto width on desktop */
        margin-bottom: 0;
    }
}

.filter-select:focus {
    border-color: var(--color-primary, #f97316);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.table-container.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.timetable {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    /* Increased min-width for extra column */
}

.timetable thead {
    background-color: #1f2937;
    /* Gray-800 */
    color: white;
}

.timetable th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.timetable td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 0.95rem;
}

/* Zebra Striping */
.timetable tbody tr:nth-child(even) {
    background-color: #f9fafb;
    /* Gray-50 */
}

.timetable tbody tr:hover {
    background-color: #fff7ed;
    /* Orange-50 (Palest orange) */
}

/* Column Tweaks */
.col-hora {
    width: 10%;
    font-weight: 700;
}

.col-prova {
    width: 30%;
    font-weight: 600;
}

.col-genere {
    width: 15%;
}

.col-type {
    width: 20%;
    font-size: 0.85rem;
}

/* New Column */
.col-cat {
    width: 25%;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #e5e7eb;
    color: #374151;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

/* No Results */
#no-results-msg {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

#no-results-msg.hidden {
    display: none;
}