/* Font Global */
:root {
    --fc-border-color: #e3e6f0;
    --fc-button-text-color: #fff;
    --fc-button-bg-color: #4e73df;
    --fc-button-border-color: #4e73df;
    --fc-button-hover-bg-color: #2e59d9;
    --fc-button-hover-border-color: #2653d4;
    --fc-button-active-bg-color: #2e59d9;
    --fc-button-active-border-color: #2653d4;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

body {
    background-color: #f3f4f6;
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
}

/* Glassmorphism Card */
.calendar-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 2rem;
    transition: transform 0.3s ease;
}

.calendar-card:hover {
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

/* Page Header */
.page-header-title {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-header-desc {
    color: rgba(255,255,255,0.8);
}

/* FullCalendar Customization */
.fc .fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4e73df;
    letter-spacing: -0.5px;
}

.fc .fc-button-primary {
    background: var(--fc-button-bg-color);
    border: none;
    border-radius: 12px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    text-transform: capitalize;
    box-shadow: 0 4px 6px -1px rgba(78, 115, 223, 0.4);
    transition: all 0.2s ease;
}

.fc .fc-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(78, 115, 223, 0.5);
    background-color: var(--fc-button-hover-bg-color);
}

.fc .fc-button-primary:not(:disabled).fc-button-active, 
.fc .fc-button-primary:not(:disabled):active {
    background-color: var(--fc-button-active-bg-color);
    border-color: transparent;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(0);
}

.fc .fc-col-header-cell-cushion {
    color: #5a5c69;
    font-weight: 600;
    text-decoration: none;
    padding-top: 10px;
    padding-bottom: 10px;
}

.fc-daygrid-day-number {
    color: #858796;
    font-weight: 500;
    text-decoration: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 4px;
    transition: background-color 0.2s;
}

.fc-daygrid-day-number:hover {
    background-color: #eaecf4;
    color: #4e73df;
}

.fc-day-today {
    background-color: rgba(78, 115, 223, 0.05) !important;
}

.fc-day-today .fc-daygrid-day-number {
    background-color: #4e73df;
    color: #fff;
    font-weight: bold;
}

/* Events Styling */
.fc-event {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    padding: 2px 4px; /* More compact */
    margin-bottom: 2px;
    font-size: 0.85rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Softer shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 5;
}

.fc-event-title {
    font-weight: 600;
}

.fc-daygrid-event-dot {
    border-color: #fff;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.modal-header {
    background: var(--primary-gradient);
    border-bottom: none;
    padding: 1.5rem;
    color: white;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 2rem;
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d3e2;
    background-color: #f8f9fc;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.25);
    border-color: #bac8f3;
    background-color: #fff;
}

.btn-lg {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(78, 115, 223, 0.3);
}

/* Legend Badge */
#roomLegend .badge {
    padding: 0.5em 1em;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

#roomLegend .badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Mobile Responsiveness */
@media (max-width: 767.98px) {
    .calendar-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .fc .fc-toolbar-title {
        font-size: 1.1rem;
    }

    .fc .fc-button-primary {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .page-header-title {
        font-size: 1.8rem;
    }

    .page-header-desc {
        font-size: 0.9rem;
    }

    /* Compact Month View on Mobile */
    .fc-daygrid-day-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
        margin: 2px;
    }

    .fc-col-header-cell-cushion {
        font-size: 0.8rem;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .fc-event {
        font-size: 0.7rem;
        padding: 1px 3px;
        margin-bottom: 2px;
    }
    
    /* Time visible again */

    /* Modal Mobile Adjustments */
    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    
    .modal-footer > * {
        width: 100%;
        margin: 0 !important;
    }
    
    .modal-footer button {
        width: 100%;
    }

    .modal-body {
        padding: 1rem;
    }
}
