/**
 * Exam Schedule Styles
 * Modern interactive design for IIST exam schedules
 */

:root {
    --exam-primary: #003366;
    --exam-secondary: #0066cc;
    --exam-accent: #ff6600;
    --exam-light: #f8f9fa;
    --exam-midterm: #17a2b8;
    --exam-endsem: #28a745;
    --exam-backlog: #dc3545;
    --exam-summer: #ffc107;
}

/* Page Layout */
.exam-schedule-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: 100vh;
}

/* Page Header */
.exam-page-header {
    background: linear-gradient(135deg, var(--exam-primary) 0%, var(--exam-secondary) 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
}

.exam-page-header .breadcrumb {
    background: transparent;
    margin-bottom: 15px;
    padding: 0;
}

.exam-page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.exam-page-header .breadcrumb-item a:hover {
    color: white;
}

.exam-page-header .breadcrumb-item.active {
    color: white;
}

.exam-page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
    content: "/";
}

.exam-page-header .page-title {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 2rem;
}

.header-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.program-badge,
.exam-type-badge,
.semester-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
}

.program-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(5px);
}

.exam-type-badge {
    background: var(--exam-accent);
    color: white;
}

.semester-badge {
    background: rgba(255,255,255,0.3);
    color: white;
    backdrop-filter: blur(5px);
}

/* Exam Info Card */
.exam-info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 20px 25px;
    border-left: 4px solid var(--exam-secondary);
}

.exam-info-card .exam-date-info {
    font-size: 1.1rem;
    color: var(--exam-primary);
}

.exam-info-card .exam-notes {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* Exam type specific colors */
.exam-type-badge.mid-term-examinations,
.exam-type-badge.midterm-examinations,
.exam-type-badge.midterm {
    background: var(--exam-midterm);
}

.exam-type-badge.end-semester,
.exam-type-badge.end-semester-examinations {
    background: var(--exam-endsem);
}

.exam-type-badge.backlog,
.exam-type-badge.backlog-exam {
    background: var(--exam-backlog);
}

.exam-type-badge.summer,
.exam-type-badge.summer-exam,
.exam-type-badge.winter,
.exam-type-badge.winter-course-exam {
    background: var(--exam-summer);
    color: #333;
}

/* Content Wrapper */
.exam-content-wrapper {
    padding-bottom: 50px;
}

/* Schedule Section */
.schedule-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.schedule-header {
    background: var(--exam-primary);
    color: white;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.schedule-table-wrapper {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.schedule-table th {
    background: var(--exam-light);
    padding: 16px 24px;
    font-weight: 600;
    color: var(--exam-primary);
    border-bottom: 2px solid #dee2e6;
    text-align: left;
}

.schedule-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.schedule-table tr:hover {
    background: rgba(0, 102, 204, 0.03);
}

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

/* Download Button */
.download-btn {
    background: var(--exam-secondary);
    color: white !important;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    font-weight: 500;
}

.download-btn:hover {
    background: var(--exam-primary);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

/* Notices Grid */
.notices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.notice-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.notice-card-header {
    padding: 18px 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.notice-card-header i {
    font-size: 1.3rem;
}

.notice-card-header.hall {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notice-card-header.seating {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.notice-list {
    padding: 10px 0;
    max-height: 400px;
    overflow-y: auto;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item:hover {
    background: #f8f9fa;
}

.notice-info {
    flex: 1;
    min-width: 0;
}

.notice-item .title {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-item .date {
    font-size: 0.82rem;
    color: #777;
}

.notice-item .download-icon {
    color: var(--exam-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-item .download-icon:hover {
    transform: scale(1.15);
    color: var(--exam-primary);
    background: rgba(0, 102, 204, 0.1);
}

/* Back Link */
.exam-back-link {
    text-align: center;
    margin-top: 20px;
}

.exam-back-link .btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    border-width: 2px;
    transition: all 0.3s ease;
}

.exam-back-link .btn:hover {
    background: var(--exam-primary);
    border-color: var(--exam-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

/* Custom Scrollbar for Notice List */
.notice-list::-webkit-scrollbar {
    width: 6px;
}

.notice-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.notice-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.notice-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .exam-page-header {
        padding: 30px 0;
    }

    .exam-page-header .page-title {
        font-size: 1.5rem;
    }

    .notices-grid {
        grid-template-columns: 1fr;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 12px 16px;
    }

    .notice-item {
        padding: 12px 16px;
    }

    .header-badges {
        margin-top: 10px;
    }

    .program-badge,
    .exam-type-badge {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.schedule-section,
.notice-card {
    animation: fadeInUp 0.5s ease forwards;
}

.notice-card:nth-child(2) {
    animation-delay: 0.1s;
}

/* Empty State */
.empty-notice {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-notice i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}
