/* =============================================
   SAMAH LASER CENTER - Booking Stylesheet v2
   ============================================= */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fdf4ff;
    --bg-card: #ffffff;
    --text-primary: #2e1065;
    --text-secondary: #6b7280;
    --border-color: rgba(217,70,239,0.1);
    --input-bg: #f9fafb;
}
.dark {
    --bg-primary: #0f0a1a;
    --bg-secondary: #1a1028;
    --bg-card: #1f1535;
    --text-primary: #f3e8ff;
    --text-secondary: #c4b5d4;
    --border-color: rgba(217,70,239,0.15);
    --input-bg: rgba(255,255,255,0.05);
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
}

.bg-gradient-primary { background: linear-gradient(135deg, #d946ef, #8b5cf6); }

/* --- Form Inputs --- */
.form-input:focus {
    border-color: #d946ef;
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.15);
}
.form-input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }

/* --- Time Slots --- */
.time-slot { transition: all 0.2s ease; user-select: none; }
.time-slot:hover { border-color: #d946ef; background: #fdf4ff; transform: translateY(-1px); }
.time-slot.selected { border-color: #d946ef; background: #fdf4ff; box-shadow: 0 0 0 2px rgba(217,70,239,0.3); color: #d946ef; font-weight: 700; }
.time-slot:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}
.success-pop { animation: successPop 0.5s ease-out forwards; }

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-content { animation: fadeInUp 0.4s ease-out; }

/* --- Toast --- */
.toast-container {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    animation: toastIn 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
    min-width: 260px;
    backdrop-filter: blur(8px);
}
.toast.success { background: rgba(34,197,94,0.95); color: white; }
.toast.error { background: rgba(239,68,68,0.95); color: white; }
.toast.info { background: rgba(59,130,246,0.95); color: white; }
.toast.warning { background: rgba(234,179,8,0.95); color: #1e293b; }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast.closing { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* --- Button Loading --- */
.btn-loading { position: relative; pointer-events: none; opacity: 0.8; }
.btn-loading .btn-text { visibility: hidden; }
.btn-loading .btn-spinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.btn-spinner::after {
    content: '';
    width: 1.25rem;
    height: 1.25rem;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Error --- */
.error-message { color: #ef4444; font-size: 0.8rem; margin-top: 4px; display: none; }
.error-message.show { display: block; }

/* --- Service Pills --- */
.service-pill { transition: all 0.2s ease; cursor: pointer; user-select: none; }
.service-pill:hover { border-color: #d946ef; background: #fdf4ff; transform: translateY(-2px); }
.service-pill.selected { border-color: #d946ef; background: #fdf4ff; box-shadow: 0 0 0 2px rgba(217,70,239,0.3); font-weight: 700; }

/* --- Coupon --- */
.coupon-applied { border-color: #22c55e !important; background: #f0fdf4 !important; }
.dark .coupon-applied { background: rgba(34,197,94,0.1) !important; }

/* --- Dark mode overrides --- */
.dark .bg-white, .dark .bg-gray-50 { background: var(--bg-card) !important; }
.dark .bg-secondary { background: var(--bg-secondary) !important; }
.dark .text-dark { color: var(--text-primary) !important; }
.dark .text-gray-700, .dark .text-gray-600, .dark .text-gray-500, .dark .text-gray-400 { color: var(--text-secondary) !important; }
.dark .border-gray-200, .dark .border-pink-50 { border-color: var(--border-color) !important; }
.dark .hover\:bg-pink-50:hover { background: rgba(217,70,239,0.1) !important; }
.dark .bg-gray-50 { background: var(--input-bg) !important; }
.dark .form-input { background: var(--input-bg); color: var(--text-primary); }
.dark .form-input:focus { background: var(--bg-card); }
.dark .service-pill { background: var(--bg-card); }
.dark .service-pill:hover { background: rgba(217,70,239,0.1); }
.dark .service-pill.selected { background: rgba(217,70,239,0.15); }
.dark .shadow-xl, .dark .shadow-lg, .dark .shadow-md { box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important; }
.dark select { background: var(--input-bg); color: var(--text-primary); }
.dark input, .dark textarea { background: var(--input-bg); color: var(--text-primary); }
.dark .bg-pink-50 { background: rgba(217,70,239,0.1) !important; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .modal-content { animation: none; }
    .success-pop { animation: none; }
    .toast { animation: none; }
    .btn-spinner::after { animation: none; }
    .service-pill, .time-slot { transition: none; }
}