/**
 * Time Slot Picker Styles
 * Matches Rushdania color scheme
 */

.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.time-slot-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.time-slot-btn:hover:not(:disabled) {
    border-color: var(--rushdania-teal, #1a5f5a);
    background: rgba(26, 95, 90, 0.05);
    color: var(--rushdania-teal, #1a5f5a);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 95, 90, 0.15);
}

.time-slot-btn.active {
    background: linear-gradient(135deg, var(--rushdania-teal, #1a5f5a) 0%, var(--rushdania-teal-dark, #134a46) 100%);
    border-color: var(--rushdania-teal, #1a5f5a);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(26, 95, 90, 0.3);
    transform: scale(1.02);
}

/* Immediate feedback on click */
.time-slot-btn:active {
    transform: scale(0.98);
    transition: transform 0.05s ease;
}

.time-slot-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f3f4f6;
    color: #9ca3af;
}

.time-slot-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.time-slot-loading {
    text-align: center;
    padding: 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.time-slot-empty {
    text-align: center;
    padding: 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

.time-slot-error {
    text-align: center;
    padding: 1rem;
    color: #dc2626;
    font-size: 0.875rem;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* Dark mode support */
.dark .time-slot-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .time-slot-btn:hover:not(:disabled) {
    border-color: var(--rushdania-teal, #1a5f5a);
    background: rgba(26, 95, 90, 0.2);
    color: #ffffff;
}

.dark .time-slot-btn.active {
    background: linear-gradient(135deg, var(--rushdania-teal, #1a5f5a) 0%, var(--rushdania-teal-dark, #134a46) 100%);
    border-color: var(--rushdania-teal, #1a5f5a);
    color: #ffffff;
}

.dark .time-slot-btn:disabled {
    background: #1f2937;
    color: #6b7280;
}

.dark .time-slot-empty {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

.dark .time-slot-error {
    background: #7f1d1d;
    border-color: #991b1b;
    color: #fca5a5;
}

/* Error state for time slot section */
#timeSlotSection.error-state {
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.05);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.dark #timeSlotSection.error-state {
    background: rgba(239, 68, 68, 0.1);
    border-color: #dc2626;
}

/* Responsive */
@media (max-width: 640px) {
    .time-slots-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .time-slot-btn {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
        min-height: 40px;
    }
}

