/* ============================================= */
/* 📅 APPOINTMENTS CALENDAR STYLES */
/* ============================================= */

/* Calendar Container */
.calendar-view-container {
    transition: opacity 0.3s ease-out;
}

/* Week View Grid */
.week-grid {
    position: relative;
}

.week-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

.week-day-header {
    transition: background-color 0.2s ease;
}

.week-day-header:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

.time-slot-row {
    transition: background-color 0.15s ease;
}

.time-slot-row:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

/* Time Labels */
.time-label {
    font-family: monospace;
    user-select: none;
}

/* Time Slots */
.time-slot {
    position: relative;
    min-height: 50px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.time-slot:hover {
    background-color: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.2);
}

.current-time-slot {
    background-color: rgba(16, 185, 129, 0.05);
    position: relative;
}

.current-time-slot::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    animation: pulse 2s ease-in-out infinite;
}

/* Drag and Drop Zones */
.drop-zone-active {
    background-color: rgba(6, 182, 212, 0.15) !important;
    border: 2px dashed rgba(6, 182, 212, 0.5) !important;
    transform: scale(1.02);
}

.drop-zone-conflict {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 2px dashed rgba(239, 68, 68, 0.6) !important;
}

/* Calendar Appointment Card */
.calendar-appointment-card {
    position: relative;
    transition: all 0.2s ease;
    z-index: 1;
}

.calendar-appointment-card:hover {
    transform: translateY(-2px);
    z-index: 2;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.calendar-appointment-card.opacity-50 {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Month View */
.month-day-cell {
    position: relative;
    overflow: hidden;
    transition: all 0.15s ease;
}

.month-day-cell:hover {
    background-color: rgba(30, 41, 59, 0.7);
    border-color: rgba(6, 182, 212, 0.4);
}

/* Appointment Sidebar */
#appointmentSidebar {
    backdrop-filter: blur(10px);
    will-change: transform;
}

#appointmentSidebar.show {
    transform: translateX(0) !important;
}

/* Type Filter Buttons */
.calendar-type-filter {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.calendar-type-filter.active {
    background-color: rgba(99, 102, 241, 0.3) !important;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.calendar-type-filter:hover:not(.active) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Loading Overlay */
#calendarLoading {
    backdrop-filter: blur(5px);
    z-index: 50;
}

/* Mobile View Buttons */
.mobile-view-btn {
    transition: all 0.2s ease;
}

.mobile-view-btn.active {
    background-color: rgba(6, 182, 212, 0.3);
    border-color: rgba(6, 182, 212, 0.5);
}

/* Appointment Type Colors - Scoped to Calendar */
.calendar-appointment-card.bg-cyan-600\/30 {
    background-color: rgba(8, 145, 178, 0.3);
}

.calendar-appointment-card.bg-purple-600\/30 {
    background-color: rgba(147, 51, 234, 0.3);
}

.calendar-appointment-card.bg-amber-600\/30 {
    background-color: rgba(217, 119, 6, 0.3);
}

.calendar-appointment-card.bg-red-600\/30 {
    background-color: rgba(220, 38, 38, 0.3);
}

/* ============================================= */
/* RESPONSIVE STYLES */
/* ============================================= */
@media (max-width: 768px) {
    .week-header {
        font-size: 0.65rem;
    }

    .time-slot {
        min-height: 40px;
    }

    .month-day-cell {
        min-height: 60px;
    }

    #appointmentSidebar {
        width: 100% !important;
    }

    /* Disable horizontal scroll on mobile */
    .calendar-view-container {
        overflow-x: hidden;
    }

    .calendar-view-container .glass {
        min-width: unset;
    }

    /* Narrow time label on mobile */
    .time-label {
        width: 35px !important;
        min-width: 35px !important;
        font-size: 0.55rem !important;
        padding: 2px !important;
    }

    /* Override grid template on mobile to use narrower time column */
    .week-header,
    .time-slot-row {
        grid-template-columns: 35px repeat(7, 1fr) !important;
    }

    /* Compact appointment cards on mobile */
    .calendar-appointment-card {
        padding: 2px 4px !important;
        font-size: 0.65rem !important;
    }
}

/* ============================================= */
/* END CALENDAR STYLES */
/* ============================================= */