/* Timetable specific styles */
.timetable-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

#class-select-tt {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    flex-grow: 1;
}

#add-period-btn {
    padding: 10px 20px;
    background-color: #5DADE2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* Timetable Grid */
#timetable-grid-container {
    overflow-x: auto;
}

.timetable-grid {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    background-color: #fff;
}

.timetable-grid th, .timetable-grid td {
    border: 1px solid #ccc;
    padding: 10px;
    min-width: 120px;
}

.timetable-grid th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.timetable-grid .time-slot {
    font-weight: bold;
    background-color: #f9f9f9;
}

.period-cell {
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.period-cell:hover {
    background-color: #e9f5ff;
}

.period-entry {
    background-color: #e3f2fd;
    border-radius: 4px;
    padding: 8px;
    font-size: 0.9em;
}

.period-entry .subject {
    font-weight: bold;
    display: block;
    color: #1a5276;
}

.period-entry .teacher {
    font-size: 0.8em;
    color: #555;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: right;
}

.close-btn {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.modal-form input, .modal-form select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#save-period-btn, #delete-period-btn {
    padding: 12px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

#save-period-btn {
    background-color: #2ECC71;
}

#delete-period-btn {
    background-color: #E74C3C;
}
