/* Calendar Navigation Header */
.calendar-navigation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: var(--primary-color, #0056b3);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.calendar-navigation-header h2 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    font-family: var(--heading-font, 'Montserrat', sans-serif);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Calendar View Container */
#calendarView {
    position: relative;
    z-index: 1;
    background: white;
    padding: 20px 0;
}

/* Calendar Grid Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    background: var(--light-bg-color, #f8f9fa);
    padding: 15px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calendar-header {
    background: var(--dark-bg-color, #212529);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    border-radius: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--heading-font, 'Montserrat', sans-serif);
}

.calendar-day {
    background: white;
    min-height: 110px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #dee2e6);
    position: relative;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    border-color: var(--secondary-color, #007bff);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.calendar-date {
    display: block;
    text-align: right;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--heading-color, #212529);
    font-size: 16px;
    font-family: var(--heading-font, 'Montserrat', sans-serif);
}

.calendar-event {
    font-size: 0.8em;
    padding: 5px 8px;
    margin-bottom: 3px;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.calendar-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.event-morning {
    background: var(--accent-color, #28a745);
}

.event-evening {
    background: var(--primary-color, #0056b3);
}

/* Event Modal Styles */
.event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.event-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33, 37, 41, 0.85);
    backdrop-filter: blur(3px);
}

.event-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #333;
    z-index: 10;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-header {
    background: var(--primary-color, #0056b3);
    padding: 35px 30px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    color: white;
}

.modal-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: white;
    font-family: var(--heading-font, 'Montserrat', sans-serif);
}

.modal-body {
    padding: 30px;
}

.detail-item {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.detail-item i {
    color: var(--secondary-color, #007bff);
    font-size: 18px;
    width: 22px;
    text-align: center;
    margin-top: 2px;
}

.detail-item div {
    flex: 1;
}

.detail-item label {
    display: block;
    font-size: 11px;
    color: var(--text-color, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
    font-family: var(--heading-font, 'Montserrat', sans-serif);
}

.detail-item span {
    display: block;
    font-size: 15px;
    color: var(--heading-color, #212529);
    font-weight: 500;
    line-height: 1.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive adjustments */
/* Responsive adjustments */
@media (max-width: 768px) {
    .calendar-navigation-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .calendar-navigation-header h2 {
        font-size: 20px;
        order: -1;
        /* Title on top */
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* Transform Grid to List */
    .calendar-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

    .calendar-header {
        display: none;
        /* Hide day names (Mon, Tue, etc.) */
    }

    .calendar-day.empty {
        display: none;
        /* Hide empty padding days */
    }

    .calendar-day {
        min-height: auto;
        border: none;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        background: white;
    }

    /* Hide days without events on mobile */
    .calendar-day:not(.has-events) {
        display: none;
    }

    .calendar-date {
        text-align: left;
        font-size: 18px;
        color: var(--primary-color, #0056b3);
        border-bottom: 1px solid #eee;
        padding-bottom: 8px;
        margin-bottom: 5px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Add day name to date */
    .calendar-date::after {
        content: attr(data-day-name);
        font-size: 14px;
        color: #999;
        font-weight: 500;
    }

    .calendar-event {
        font-size: 14px;
        padding: 10px 12px;
        margin-bottom: 8px;
        white-space: normal;
        /* Allow text wrap */
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Make event look more like a card/button */
    .calendar-event::after {
        content: '\f054';
        /* Chevron right */
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        margin-left: auto;
        opacity: 0.5;
    }
}