/* Calendar Management Modal */
.calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.calendar-modal.active {
    display: flex;
}

.calendar-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.calendar-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.close-calendar {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-calendar:hover {
    color: #333;
}

.calendar-body {
    padding: 24px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    background: #f5f5f5;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

.calendar-nav-btn:hover {
    background: #e0e0e0;
}

.calendar-month-year {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    padding: 12px 0;
    font-weight: 600;
    font-size: 14px;
    color: #666;
}

.calendar-day {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:hover:not(.calendar-day-disabled):not(.calendar-day-other-month) {
    border-color: var(--primary-500, #4a90e2);
    background: var(--primary-50, #e3f2fd);
}

.calendar-day-other-month {
    color: #ccc;
    cursor: default;
}

.calendar-day-disabled {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day-today {
    border-color: var(--primary-500, #4a90e2);
    font-weight: 600;
}

.calendar-day-blocked {
    background: #ffebee;
    border-color: #ef5350;
    color: #c62828;
}

.calendar-day-blocked:hover {
    background: #ffcdd2;
    border-color: #e53935;
}

.calendar-day-blocked::after {
    content: '🚫';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

.calendar-legend {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.calendar-legend-box {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid;
}

.calendar-legend-box.available {
    border-color: #e0e0e0;
    background: white;
}

.calendar-legend-box.blocked {
    border-color: #ef5350;
    background: #ffebee;
}

.calendar-legend-box.today {
    border-color: var(--primary-500, #4a90e2);
    background: white;
}

.calendar-instructions {
    margin-top: 16px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 600px) {
    .calendar-container {
        width: 95%;
        max-height: 95vh;
    }

    .calendar-header {
        padding: 16px;
    }

    .calendar-body {
        padding: 16px;
    }

    .calendar-day {
        font-size: 12px;
    }

    .calendar-day-header {
        font-size: 12px;
        padding: 8px 0;
    }
}