/* Custom CSS for UDST Easy Scheduler with FullCalendar */

:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    /* Component Colors */
    --lecture-color: #007bff;
    --lecture-theater-color: #6f42c1;
    --lab-color: #28a745;
    --active-color: #e3f2fd;
    --inactive-color: #ffebee;
}

body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Styling */
header {
    background: linear-gradient(135deg, var(--primary-color), #004499) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Card Styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0 !important;
}

/* Button Styling */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Form Styling */
.form-select, .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Faculty Search Styling */
#facultySearch {
    border-color: #28a745;
    background-color: #f8fff9;
}

#facultySearch:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

#facultySearch::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Enhanced dropdown styling */
.form-select option {
    padding: 8px 12px;
}

.enhanced-dropdown {
    position: relative;
}

.search-highlight {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

/* Legend Styling */
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid #dee2e6;
}

.legend-color.lecture {
    background-color: var(--lecture-color);
}

.legend-color.lecture-theater {
    background-color: var(--lecture-theater-color);
}

.legend-color.lab {
    background-color: var(--lab-color);
}

.legend-color.active {
    background-color: var(--active-color);
    border: 2px solid var(--primary-color);
}

.legend-color.inactive {
    background-color: var(--inactive-color);
    border: 2px solid var(--danger-color);
}

/* Capacity Legend in Main Legend */
.legend-capacity-section {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
}

.legend-capacity-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.legend-capacity-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.75rem;
}

.legend-capacity-color {
    width: 16px;
    height: 6px;
    border-radius: 3px;
    margin-right: 8px;
}

/* FullCalendar Custom Styling */
#calendar {
    max-width: 100%;
    min-height: 600px;
}

/* FullCalendar Event Styling */
.fc-event-lecture {
    background-color: var(--lecture-color) !important;
    border-color: var(--lecture-color) !important;
}

.fc-event-lecture-theater {
    background-color: var(--lecture-theater-color) !important;
    border-color: var(--lecture-theater-color) !important;
}

.fc-event-lab {
    background-color: var(--lab-color) !important;
    border-color: var(--lab-color) !important;
}

.fc-event.inactive {
    background-color: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
    opacity: 0.7;
}

/* Custom event content styling */
.fc-event-content-custom {
    padding: 2px;
}

.fc-event-title-custom {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.2;
}

.fc-event-details {
    font-size: 0.78rem;
    opacity: 0.9;
    line-height: 1.1;
}

.fc-event-time-custom {
    font-size: 0.74rem;
    opacity: 0.8;
    margin-top: 2px;
    font-weight: 500;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 2px;
}

/* Capacity Indicator Styles */
.capacity-indicator {
    padding: 3px 4px 2px 4px;
    border-top: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
    backdrop-filter: blur(2px);
    box-shadow: 
        0 1px 3px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Progress Bar Capacity Indicator */
.capacity-progress {
    height: 4px;
    background-color: rgba(255,255,255,0.4);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.capacity-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 
        0 0 4px rgba(255,255,255,0.3),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

/* Color coding for different capacity levels */
.capacity-low { background-color: #28a745; } /* Green for 0-50% */
.capacity-medium { background-color: #ffc107; } /* Yellow for 50-75% */
.capacity-high { background-color: #fd7e14; } /* Orange for 75-90% */
.capacity-full { background-color: #dc3545; } /* Red for 90%+ */
.capacity-over { background-color: #6f42c1; } /* Purple for over capacity */

.capacity-text {
    font-size: 0.62rem;
    font-weight: 600;
    text-align: center;
    line-height: 1;
    opacity: 1;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
    color: rgba(255,255,255,0.95);
}

/* Pie Chart Capacity Indicator */
.capacity-pie {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    margin: 2px auto;
    background: conic-gradient(
        var(--capacity-color) var(--capacity-percentage),
        rgba(255,255,255,0.3) var(--capacity-percentage)
    );
    border: 1px solid rgba(255,255,255,0.4);
}

.capacity-pie::after {
    content: attr(data-percentage);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.55rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

/* Mini capacity indicator for smaller events */
.capacity-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-top: 2px;
}

.capacity-dots {
    display: flex;
    gap: 1px;
}

.capacity-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.3);
}

.capacity-dot.filled {
    background-color: white;
}

/* Responsive capacity indicators */
@media (max-width: 768px) {
    .capacity-indicator {
        padding: 2px 3px 1px 3px;
        margin-top: 2px;
    }
    
    .capacity-progress {
        height: 3px;
    }
    
    .capacity-text {
        font-size: 0.58rem;
    }
    
    .capacity-pie {
        width: 16px;
        height: 16px;
    }
    
    .capacity-pie::after {
        font-size: 0.5rem;
    }
}

/* Hide capacity indicator in very small events */
.fc-timegrid-event.fc-event-short .capacity-indicator {
    display: none;
}

/* Alternative: Show only mini indicator for short events */
.fc-timegrid-event.fc-event-short .capacity-progress,
.fc-timegrid-event.fc-event-short .capacity-text {
    display: none;
}

.fc-timegrid-event.fc-event-short .capacity-mini {
    display: flex;
}

/* Capacity legend items */
.capacity-legend {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.capacity-legend-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.capacity-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.capacity-legend-color {
    width: 16px;
    height: 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.capacity-legend-color.low { background-color: #28a745; }
.capacity-legend-color.medium { background-color: #ffc107; }
.capacity-legend-color.high { background-color: #fd7e14; }
.capacity-legend-color.full { background-color: #dc3545; }
.capacity-legend-color.over { background-color: #6f42c1; }

/* Animation for capacity indicators */
.capacity-indicator.animated .capacity-progress-bar {
    animation: fillProgress 1s ease-out;
}

@keyframes fillProgress {
    from { width: 0%; }
    to { width: var(--final-width); }
}

.capacity-indicator.animated .capacity-pie {
    animation: fillPie 1s ease-out;
}

@keyframes fillPie {
    from { 
        background: conic-gradient(
            rgba(255,255,255,0.3) 0%,
            rgba(255,255,255,0.3) 100%
        );
    }
    to { 
        background: conic-gradient(
            var(--capacity-color) var(--capacity-percentage),
            rgba(255,255,255,0.3) var(--capacity-percentage)
        );
    }
}

/* FullCalendar Header Customization */
.fc-header-toolbar {
    margin-bottom: 1rem !important;
}

.fc-button-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.fc-button-primary:hover {
    background-color: #004499 !important;
    border-color: #004499 !important;
}

.fc-button-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25) !important;
}

/* FullCalendar Time Grid Styling */
.fc-timegrid-slot {
    height: 3em !important;
}

.fc-timegrid-slot-minor {
    border-top-style: dotted !important;
}

/* Summary Table Styling */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--dark-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px;
}

.table tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: var(--success-color);
    color: white;
}

.status-badge.inactive {
    background-color: var(--danger-color);
    color: white;
}

.component-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.component-badge.lecture {
    background-color: var(--lecture-color);
}

.component-badge.lecture-theater {
    background-color: var(--lecture-theater-color);
}

.component-badge.lab {
    background-color: var(--lab-color);
}

/* Upload Status Styling */
.upload-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
}

.upload-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
}

/* Loading Animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #calendar {
        min-height: 400px;
    }
    
    .fc-header-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    
    .fc-event-title-custom {
        font-size: 0.8rem;
    }
    
    .fc-event-details {
        font-size: 0.72rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    #calendar {
        min-height: 350px;
    }
    
    .fc-event-details {
        display: none;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Custom Searchable Dropdown Styling */
.custom-searchable-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-search-container {
    position: relative;
    width: 100%;
}

.dropdown-search-input {
    width: 100%;
    padding-right: 40px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropdown-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    outline: none;
}

.dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.dropdown-search-container.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dropdown-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-option:hover {
    background-color: #f8f9fa;
}

.dropdown-option.selected {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-option.no-results {
    color: #6c757d;
    font-style: italic;
    cursor: default;
}

.dropdown-option.no-results:hover {
    background-color: transparent;
}

/* Scrollbar for dropdown options */
.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
    }

/* Faculty Schedule Header Styles */
#scheduleTitle .text-muted {
    font-size: 0.9rem;
    line-height: 1.4;
}

#scheduleTitle .text-muted i {
    color: #6c757d;
    margin-right: 0.25rem;
}

.faculty-info-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

.weekly-hours-highlight {
    color: #0d6efd;
    font-weight: 600;
}

/* Hours Breakdown Styles */
.hours-breakdown {
    font-size: 0.85rem;
    line-height: 1.3;
}

.breakdown-item {
    display: inline-block;
    margin-right: 0.5rem;
    color: #495057;
}

.breakdown-item.lecture {
    color: #0d6efd;
}

.breakdown-item.lab {
    color: var(--lab-color);
}

.breakdown-item.tutorial {
    color: #198754;
}

.breakdown-item.seminar {
    color: #6f42c1;
}

.breakdown-item.practical {
    color: #fd7e14;
}

.breakdown-item.workshop {
    color: #20c997;
}

.breakdown-item.project {
    color: #e83e8c;
}

.breakdown-item.other {
    color: #6c757d;
}

.breakdown-item i {
    opacity: 0.8;
}

.breakdown-item strong {
    font-weight: 600;
}

/* Faculty View Toggle Styles */
.btn-group .btn-check:checked + .btn-outline-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-group .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.btn-group .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* College Schedule Styles */
.college-faculty-row {
    transition: background-color 0.2s ease;
}

.college-faculty-row:hover {
    background-color: #f8f9fa;
}

.expand-icon {
    transition: transform 0.2s ease;
    color: #6c757d;
}

.faculty-details-row {
    border-top: none;
}

.faculty-details-content {
    border-left: 4px solid var(--primary-color);
    animation: fadeInDetails 0.3s ease-in-out;
}

@keyframes fadeInDetails {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.faculty-details-content h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.faculty-details-content .table {
    margin-bottom: 0;
}

.faculty-details-content .table th {
    background-color: #f8f9fa;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.faculty-details-content .table td {
    font-size: 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

/* College Summary Responsive */
@media (max-width: 768px) {
    .faculty-details-content .table-responsive {
        font-size: 0.8rem;
    }
    
    .faculty-details-content .table td,
    .faculty-details-content .table th {
        padding: 0.5rem 0.25rem;
    }
    
    .btn-group .btn {
        font-size: 0.85rem;
        padding: 0.375rem 0.5rem;
    }
}

#collegeFacultySchedules {
    margin-bottom: 2rem;
}

.college-faculty-schedule-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 2rem;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.2s;
}
.college-faculty-schedule-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

#scrollButtons {
    position: fixed;
    right: 24px;
    bottom: 32px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#scrollButtons button {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollButtons button:hover {
    background: #084298;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    transform: translateY(-2px) scale(1.08);
}

#scrollToTop, #scrollToBottom {
    opacity: 0.92;
}

#scrollToTop[hidden], #scrollToBottom[hidden] {
    display: none;
}

/* Print-optimized styles */
@media print {
    /* Hide navigation, sidebar, controls, scroll buttons, and non-schedule UI */
    header,
    aside,
    #databaseStatusBar,
    #scheduleControls,
    #legend,
    #welcomeMessage,
    #scrollButtons,
    .modal,
    .btn,
    .dropdown-options,
    #refreshSchedule,
    #weekView,
    #printSchedule {
        display: none !important;
    }

    body, html {
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    main.col-md-9 {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Only show the schedule container and its content */
    #scheduleContainer {
        display: block !important;
        margin: 0;
        padding: 0;
        box-shadow: none !important;
        background: #fff !important;
    }

    /* Hide summary table and main calendar ONLY in college/building view */
    .multi-schedule-view #summaryCard,
    .multi-schedule-view #calendar {
        display: none !important;
    }

    /* Each faculty/room card starts on a new page */
    .college-faculty-schedule-card {
        page-break-before: always;
        break-before: page;
        background: #fff !important;
        box-shadow: none !important;
        border: none !important;
        margin: 0 0 24px 0 !important;
        padding: 0 !important;
    }
    .college-faculty-schedule-card:first-child {
        page-break-before: auto;
        break-before: auto;
    }

    /* Remove card backgrounds and borders */
    .card, .card-header, .card-body {
        background: #fff !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Table adjustments for print readability */
    table, th, td {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #888 !important;
        font-size: 12pt !important;
    }
    th, td {
        padding: 4px 8px !important;
    }
    thead {
        background: #eee !important;
    }

    /* Font and spacing tweaks */
    h3, h4, h5, h6 {
        color: #000 !important;
        margin-top: 0.5em !important;
        margin-bottom: 0.5em !important;
    }
    .text-muted, .weekly-hours-highlight, .hours-breakdown {
        color: #333 !important;
    }
    .progress, .progress-bar {
        display: none !important;
    }
    .status-badge.active {
        color: #fff !important;
        background: #28a745 !important;
        border: none !important;
    }
    .status-badge.inactive {
        color: #fff !important;
        background: #dc3545 !important;
        border: none !important;
    }
    .component-badge {
        color: #fff !important;
        background: #007bff !important;
        border: none !important;
        font-size: 10pt !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
    }
    /* Hide print button itself */
    #printSchedule {
        display: none !important;
    }

    /* Simple calendar print styling - ensure all days show */
    #calendar, #calendar .fc, .fc {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        font-size: 10pt !important;
        /* Remove transform and complex width rules */
    }
    .fc .fc-scrollgrid, .fc .fc-daygrid-body, .fc .fc-timegrid-body {
        width: 100% !important;
        min-width: 0 !important;
    }
    .fc .fc-col-header-cell, .fc .fc-daygrid-day, .fc .fc-timegrid-slot, .fc .fc-timegrid-col {
        padding: 2px !important;
        font-size: 10pt !important;
        min-width: 0 !important;
    }
    .fc .fc-toolbar {
        font-size: 10pt !important;
        padding: 0 !important;
        margin-bottom: 0.5em !important;
    }
    /* Remove extra margin/padding from calendar card */
    #calendar {
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Force calendar to show all 5 days (Sun-Thu) in print */
    .fc-scrollgrid {
        table-layout: auto !important;
        width: 100% !important;
    }
    /* Let columns auto-size instead of fixed percentages */
    .fc-col-header-cell, .fc-timegrid-col {
        width: auto !important;
        min-width: 18% !important; /* Minimum width to ensure 5 columns fit */
    }

    /* Suggest landscape orientation for print */
    @page {
        size: landscape;
        margin: 0.5cm;
    }
    /* Hide FullCalendar navigation and view buttons in print */
    .fc-toolbar-chunk:first-child, /* prev/next/today */
    .fc-toolbar-chunk:last-child,  /* view switch buttons */
    .fc-button-group,
    .fc-button,
    .fc-toolbar-title:empty {
        display: none !important;
    }
    /* Only show the date range/title */
    .fc-toolbar-chunk {
        justify-content: center !important;
        width: 100% !important;
    }

    /* Force calendar to display exactly 5 days (Sun-Thu) */
    .fc-timegrid-axis,
    .fc-timegrid-slot-lane {
        display: table-cell !important;
    }
    /* Ensure Thursday column is visible */
    .fc-day-thu,
    .fc-col-header-cell[data-date*="thu"],
    .fc-timegrid-col[data-date*="thu"] {
        display: table-cell !important;
        visibility: visible !important;
    }
    /* Hide Friday and Saturday columns explicitly */
    .fc-day-fri,
    .fc-day-sat,
    .fc-col-header-cell[data-date*="fri"],
    .fc-col-header-cell[data-date*="sat"],
    .fc-timegrid-col[data-date*="fri"],
    .fc-timegrid-col[data-date*="sat"] {
        display: none !important;
    }
}

/* Context Menu Styling */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 200px;
    animation: contextMenuFadeIn 0.15s ease-out;
}

@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

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

.context-menu-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.context-menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.context-menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.context-menu-item i {
    color: #6c757d;
    width: 16px;
    text-align: center;
}

.context-menu-item:hover i {
    color: var(--primary-color);
}

.context-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.context-menu-item.disabled:hover {
    background-color: #f8f9fa;
    color: #6c757d;
}

.context-menu-item.disabled:hover i {
    color: #6c757d;
}

/* Make schedule items clickable */
.schedule-item-clickable {
    cursor: pointer;
}

.schedule-item-clickable:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

/* Calendar event styling for context menu */
.fc-event {
    cursor: pointer;
}

.fc-event:hover {
    opacity: 0.9;
}

/* Initial Loading Overlay for URL Parameter Loading */
.initial-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.initial-loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.initial-loading-content .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.initial-loading-content h4 {
    color: var(--primary-color);
    font-weight: 600;
}

.initial-loading-content p {
    font-size: 0.95rem;
    line-height: 1.5;
} 