/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar Transitions */
.sidebar {
    width: 16rem;
}

.sidebar.collapsed {
    width: 5rem;
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    width: 0;
    display: none;
}

.sidebar.collapsed .sidebar-icon-open {
    display: block;
}

.sidebar.collapsed .sidebar-icon-closed {
    display: none;
}

/* Ensure smooth icon transitions */
.sidebar-icon-open,
.sidebar-icon-closed {
    transition: opacity 0.2s ease;
}

/* Time Slot Selection */
.time-slot {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.time-slot:hover:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.15);
}

.time-slot.selected {
    background: #0d948c;
    color: white;
    border-color: #0d948c;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.time-slot.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
}

/* Category Card Selection */
.category-card input:checked + div {
    border-color: #0d948c;
    background-color: #f0fdfa;
}

.category-card input:checked + div i {
    color: #0d948c;
}

.category-card input:checked + div span {
    color: #115e59;
}

/* Patient Card Selection */
.patient-card.selected {
    border-color: #0d948c;
    background-color: #f0fdfa;
}

.patient-card.selected i {
    opacity: 1;
}

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Date Input Customization */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

/* Animation for mobile menu */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 20;
    }
    
    .sidebar-overlay.open {
        display: block;
    }
}

/* Smooth transitions for all interactive elements */
button, 
input, 
select, 
textarea,
a {
    transition: all 0.2s ease;
}

/* Loading state for time slots */
.time-slot.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background: #f1f5f9;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}