/* ============================================================
   PREMIUM LUXURY MEDICAL UI (NAVY + GOLD)
   ============================================================ */

:root {
    --theme-color: #1B2850;
    --primary: #1B2850;
    --primary-dark: #141f3f;
    --primary-light: #e6e9f2;

    --accent: #C6A96B;
    --accent-soft: #f7f3ea;

    --text-main: #1f2937;
    --text-muted: #6b7280;

    --bg-main: #f9fafb;
    --bg-card: #ffffff;

    --border-light: #e5e7eb;
}

/* Body */
body {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
    color: var(--text-main);
}

/* ============================================================
   BUTTONS (Premium Navy Style)
   ============================================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    background: linear-gradient(135deg, #1B2850, #141f3f);
    color: white;
    font-weight: 600;
    border-radius: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(27, 40, 80, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(27, 40, 80, 0.45);
}

.btn-secondary {
    padding: 0.85rem 1.6rem;
    border-radius: 0.8rem;
    border: 1px solid var(--theme-color);
    color: var(--primary);
    background: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--accent-soft);
    transform: translateY(-1px);
}

/* ============================================================
   NAV (Premium)
   ============================================================ */

.nav-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 999px;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.nav-link:hover {
    background: rgba(27, 40, 80, 0.08);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ============================================================
   CARDS (Luxury depth)
   ============================================================ */

.card-base {
    background: var(--bg-card);
    border-radius: 1.2rem;
    border: 1px solid rgba(0,0,0,0.04);
    /*box-shadow:*/
    /*    0 6px 25px rgba(0,0,0,0.05),*/
    /*    0 20px 60px rgba(0,0,0,0.08);*/
    transition: all 0.3s ease;
}

.card-base:hover {
    /*transform: translateY(-5px);*/
    box-shadow:
        0 12px 40px rgba(0,0,0,0.08),
        0 30px 80px rgba(0,0,0,0.12);
}

/* ============================================================
   FORM INPUTS (Premium feel)
   ============================================================ */

.input-field {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--border-light);
    background: #ffffff;
    transition: all 0.25s ease;
    font-size: 0.9rem;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(27, 40, 80, 0.08);
    transform: scale(1.01);
}

.input-field.error {
    border-color: #ef4444;
}

/* ============================================================
   SELECT FIELD
   ============================================================ */

.select-field {
    border-radius: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-light);
}

/* ============================================================
   STEP INDICATOR (Luxury)
   ============================================================ */

.step-dot {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid var(--border-light);
    background: white;
    color: var(--text-muted);
}

.step-dot.active {
    background: linear-gradient(135deg, #1B2850, #141f3f);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(27, 40, 80, 0.35);
}

.step-dot.done {
    background: var(--accent-soft);
    color: var(--primary);
    border-color: var(--accent);
}

/* ============================================================
   SERVICE / DOCTOR CARDS
   ============================================================ */

.service-card-inner,
.doctor-card {
    border-radius: 1rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.service-card-inner:hover,
.doctor-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.selected-service {
    border: 2px solid var(--primary);
    background: var(--primary-light);
}

/* ============================================================
   TOAST
   ============================================================ */

#booking-toast {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* ============================================================
   SUCCESS / ERROR BOX
   ============================================================ */

.success-box {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.8rem;
}

.error-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.8rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeUp 0.6s ease-out;
}

/* ============================================================
   GLASS EFFECT
   ============================================================ */

.glass-card {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.4);
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 768px) {
    .btn-primary {
        width: 100%;
    }

    .card-base {
        border-radius: 0.8rem;
    }
}

.step-dot{
    width:34px;
    height:34px;
    border-radius:9999px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:700;
    background:#ecfeff;
    color:#94a3b8;
    border:1px solid #d1d5db;
    transition:all .2s ease;
}
.step-dot.active{
    background:var(--theme-color, #0f8b8d);
    color:#fff;
    border-color:var(--theme-color, #0f8b8d);
}
.step-dot.done{
    background:#dff7f5;
    color:var(--theme-color, #0f8b8d);
    border-color:#b6ece7;
}
.step-line{
    flex:1;
    height:2px;
    background:#e5e7eb;
}
.form-label{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    font-weight:600;
    color:#374151;
}
.form-input{
    width:100%;
    height:48px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:0 14px;
    background:#fff;
    color:#111827;
    outline:none;
    transition:.2s ease;
}
.form-input:focus{
    border-color:var(--theme-color, #0f8b8d);
    box-shadow:0 0 0 3px rgba(15,139,141,.08);
}
.service-card input:checked + .service-card-inner,
.doctor-card input:checked + .doctor-card-inner{
    border-color:var(--theme-color, #0f8b8d);
    background:#f3fbfb;
}
.date-card,
.slot-card{
    border:2px solid #e5e7eb;
    border-radius:14px;
    padding:14px 10px;
    text-align:center;
    cursor:pointer;
    transition:.2s ease;
    background:#fff;
}
.date-card.active,
.slot-card.active{
    border-color:var(--theme-color, #0f8b8d);
    background:#f3fbfb;
    color:#0f172a;
}
.field-error{
    border-color:#ef4444 !important;
    box-shadow:0 0 0 3px rgba(239,68,68,.08) !important;
}
.service-radio-hidden{
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.selected-service{
    border-color: var(--theme-color, #0f8b8d) !important;
    background: #f3fbfb !important;
}
.service-scroll-wrap{
    overscroll-behavior: contain;
}
.doctor-card.hidden{
    display:none !important;
}
.select2-container .select2-selection--single{
    height: 48px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    padding: 9px 14px !important;
    display: flex !important;
    align-items: center !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
    line-height: 28px !important;
    color: #111827 !important;
    padding-left: 0 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow{
    height: 46px !important;
    right: 10px !important;
}
.select2-dropdown{
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    overflow: hidden !important;
}
.flatpickr-calendar{
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.12) !important;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange{
    background: var(--theme-color, #0f8b8d) !important;
    border-color: var(--theme-color, #0f8b8d) !important;
}
.doctor-card.hidden{
    display:none !important;
}

.service-radio-hidden{
    position:absolute;
    opacity:0;
    pointer-events:none;
    width:0;
    height:0;
}

.selected-service{
    border-color:var(--theme-color, #0f8b8d) !important;
    background:#f3fbfb !important;
}

.service-scroll-wrap{
    overscroll-behavior:contain;
}

.select2-container .select2-selection--single{
    height:48px !important;
    border:1px solid #e5e7eb !important;
    border-radius:14px !important;
    display:flex !important;
    align-items:center !important;
    padding:0 8px !important;
    background:#fff !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
    line-height:46px !important;
    color:#111827 !important;
    padding-left:6px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow{
    height:46px !important;
}
.flatpickr-calendar{
    border-radius:18px !important;
    box-shadow:0 15px 40px rgba(0,0,0,.12) !important;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange{
    background:var(--theme-color, #0f8b8d) !important;
    border-color:var(--theme-color, #0f8b8d) !important;
}


.bg-primary-600 {
    --tw-bg-opacity: 1;
    background-color: var(--theme-color) !important;
}
.text-primary-500{
    color: var(--theme-color) !important;
}

.civil-loader {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-top-color: #1B2850;
    border-radius: 50%;
    display: inline-block;
    animation: civilSpin 0.7s linear infinite;
}

@keyframes civilSpin {
    to {
        transform: rotate(360deg);
    }
}


#civil-id-loader {
    transition: opacity 0.2s ease;
}
.to-primary-800{
    --tw-gradient-to: var(--theme-color) !important;
    background: var(--theme-color) !important;
}
.doctor-card-inner{
    min-height: 125px;
}
.text-primary-700{
    color:var(--theme-color) !important;
}

.border-primary-100{
    border-color:var(--theme-color) !important;
}
.bg-primary-50{
    background-color: #141f3f17 !important;
}



/* ============================================================
   HERO RESPONSIVE BUTTONS + QUICK BOOKING WIDGET
   ============================================================ */

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-action-btn {
    min-width: 190px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Desktop / laptop: show quick booking widget, hide hero consultation button */
@media (min-width: 1024px) {
    .hero-book-mobile {
        display: none !important;
    }

    .quick-booking-widget {
        display: block !important;
    }
}

/* Tablet and mobile: hide quick booking widget, show 3 buttons vertically */
@media (max-width: 1023px) {
    .quick-booking-widget {
        display: none !important;
    }

    .hero-actions {
        width: 100%;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: center !important;
        gap: 12px !important;
        padding: 0 20px;
        margin-top: 6px;
        overflow: visible !important;
    }

    .hero-action-btn {
        width: 100% !important;
        min-width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: normal !important;
    }

    .hero-book-mobile {
        display: flex !important;
    }
}

/* Small mobile: reduce button side padding and avoid horizontal scroll */
@media (max-width: 480px) {
    .hero-actions {
        padding: 0 6px;
    }

    .hero-action-btn {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

.consultation-select + .select2-container .select2-selection--single {
    height: 52px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 14px !important;
}

.consultation-select + .select2-container .select2-selection__rendered {
    color: #111827 !important;
    line-height: 52px !important;
    padding-left: 0 !important;
    padding-right: 28px !important;
    font-size: 15px;
    font-weight: 600;
}

.consultation-select + .select2-container .select2-selection__arrow {
    height: 52px !important;
    right: 12px !important;
}

.select2-dropdown {
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.select2-results__option {
    padding: 12px 14px !important;
    font-size: 14px !important;
}

.select2-results__option--highlighted {
    background: #1B2850 !important;
    color: #ffffff !important;
}
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

#physicianProfileModal {
    overflow-y: auto;
    padding: 16px;
}

#physicianProfileModal > div {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 640px) {
    #physicianProfileModal {
        align-items: flex-start !important;
        justify-content: center !important;
        padding: 12px;
    }

    #physicianProfileModal > div {
        width: 100%;
        max-width: 100%;
        margin-top: 12px;
        border-radius: 16px;
    }

    #physicianProfileModal .p-6 {
        padding: 18px !important;
    }
}

#doctor_time_slot_select + .select2 .select2-selection--single,
#doctor_time_slot_select + .select2-container .select2-selection--single {
    direction: ltr !important;
    text-align: left !important;
}

#doctor_time_slot_select + .select2-container .select2-selection__rendered, #doctor_time_slot_select + .select2-results__options {
    direction: ltr !important;
    text-align: left !important;
    padding-left: 12px !important;
    padding-right: 30px !important;
}

#doctor_time_slot_select + .select2-container .select2-selection__arrow {
    right: 8px !important;
    left: auto !important;
}

.sticky-booking-nav .flex.items-center.justify-between {
    gap: 10px;
}

.sticky-booking-nav #prevBtn,
.sticky-booking-nav #nextBtn,
.sticky-booking-nav #confirmBtn {
    white-space: nowrap;
    min-height: 52px;
}

@media (max-width: 480px) {
    .sticky-booking-nav > div {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .sticky-booking-nav #prevBtn {
        flex: 0 0 90px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .sticky-booking-nav .ms-auto {
        margin-inline-start: 0 !important;
        flex: 1;
        min-width: 0;
    }

    .sticky-booking-nav #nextBtn,
    .sticky-booking-nav #confirmBtn {
        width: 100%;
        justify-content: center;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 14px;
    }
}