/* Modal Styles */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 800px;
}

.modal-content.modal-xl {
    max-width: 1100px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #1e3a5f;
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    background-color: #f7fafc;
    border-radius: 0 0 8px 8px;
}

/* Course Info Panel */
.course-info-panel {
    padding: 16px 20px;
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.course-info-table {
    width: 100%;
    border-collapse: collapse;
}

.course-info-table th,
.course-info-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #d1d5db;
}

.course-info-table th {
    background-color: #1e3a5f;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.course-info-table td {
    background-color: white;
    font-size: 0.9rem;
}

/* Slots Table (Faculty Selection) */
.slots-table {
    width: 100%;
    border-collapse: collapse;
}

.slots-table th,
.slots-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #d1d5db;
    vertical-align: middle;
}

.slots-table thead th {
    background-color: #1e3a5f;
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
}

.slots-table tbody tr {
    transition: background-color 0.2s;
}

.slots-table tbody tr:hover {
    background-color: #f0fdf4;
}

.slots-table tbody tr.selected {
    background-color: #d1fae5;
}

.slots-table tbody tr.clash-row {
    background-color: #fee2e2;
}

.slots-table .slot-code {
    font-weight: 600;
    color: #1e3a5f;
}

.slots-table .venue {
    font-size: 0.9rem;
}

.slots-table .faculty-name {
    text-align: left;
    font-size: 0.9rem;
}

.slots-table .clash-status {
    color: #e53e3e;
    font-weight: 500;
    font-size: 0.85rem;
}

.slots-table .available-seats {
    font-weight: 600;
}

.slots-table .available-seats.low {
    color: #d69e2e;
}

.slots-table .available-seats.full {
    color: #e53e3e;
}

/* Radio Button Styling */
.slots-table input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #38a169;
}

.slots-table .full-label {
    color: #e53e3e;
    font-weight: 500;
}

/* Slots Section Header */
.slots-section-header {
    background-color: #1e3a5f;
    color: #fefce8;
    text-align: center;
    padding: 8px;
    font-weight: 600;
}

/* Registered Courses Table in Modal */
.registered-table {
    width: 100%;
    border-collapse: collapse;
}

.registered-table th,
.registered-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.registered-table th {
    background-color: #4a5568;
    color: white;
    font-weight: 500;
}

.registered-table tbody tr:nth-child(even) {
    background-color: #f7fafc;
}

.registered-table .delete-btn {
    background-color: #e53e3e;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.registered-table .delete-btn:hover {
    background-color: #c53030;
}

/* Loading State */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #cbd5e0;
}