/* ==========================================================
   MindCare Psychological & Autism Center - Master Stylesheet
   Calm, Therapeutic, Crystal-Clear Healthcare Aesthetic
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #0e7490;
    --primary-hover: #0891b2;
    --primary-light: #e0f2fe;
    --secondary-color: #059669;
    --secondary-light: #d1fae5;
    --accent-autism: #f59e0b;
    --accent-autism-light: #fef3c7;
    --accent-indigo: #4f46e5;
    --accent-indigo-light: #e0e7ff;
    --dark-slate: #0f172a;
    --body-text: #334155;
    --muted-text: #64748b;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-soft: 0 10px 25px -5px rgba(14, 116, 144, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 30px -10px rgba(14, 116, 144, 0.12), 0 10px 12px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--body-text);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================
   Typography & Utilities
   ========================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-slate);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-primary-custom { color: var(--primary-color) !important; }
.text-secondary-custom { color: var(--secondary-color) !important; }
.bg-primary-custom { background-color: var(--primary-color) !important; }
.bg-primary-light { background-color: var(--primary-light) !important; }
.bg-secondary-light { background-color: var(--secondary-light) !important; }
.bg-autism-light { background-color: var(--accent-autism-light) !important; }

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(14, 116, 144, 0.3);
}

.btn-outline-custom {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 9px 22px;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-secondary-custom {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #ffffff;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.btn-secondary-custom:hover {
    background-color: #047857;
    border-color: #047857;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(5, 150, 105, 0.3);
}

/* ==========================================================
   Header & Navigation
   ========================================================== */
.emergency-top-bar {
    background: linear-gradient(90deg, #991b1b 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 6px 0;
    letter-spacing: 0.01em;
}

.pulse-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: #ffffff;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.navbar-main {
    background: #ffffff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid #f1f5f9;
    padding: 6px 0;
    transition: all 0.25s ease;
}

.navbar-brand-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap !important;
}

.brand-logo-img {
    max-height: 34px;
    max-width: 120px;
    object-fit: contain;
}

.brand-tagline {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
    max-width: 220px;
}

.nav-link-custom {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155 !important;
    padding: 5px 8px !important;
    border-radius: 7px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap !important;
}

.nav-link-custom i {
    font-size: 0.8rem;
    margin-right: 3px !important;
}

.nav-link-custom:hover {
    color: var(--primary-color) !important;
    background-color: #f0f9ff;
}

.nav-link-custom.active {
    color: var(--primary-color) !important;
    background-color: #f0f9ff;
    font-weight: 700;
}

.nav-action-btns .btn {
    white-space: nowrap !important;
    font-size: 0.82rem;
    padding: 5px 11px !important;
}

@media (min-width: 1400px) {
    .navbar-main {
        padding: 8px 0;
    }
    .navbar-brand-text {
        font-size: 1.18rem;
        gap: 10px;
    }
    .brand-logo-img {
        max-height: 38px;
        max-width: 140px;
    }
    .brand-tagline {
        font-size: 0.62rem;
        max-width: 280px;
    }
    .nav-link-custom {
        font-size: 0.875rem;
        padding: 6px 10px !important;
    }
    .nav-link-custom i {
        font-size: 0.85rem;
        margin-right: 4px !important;
    }
    .nav-action-btns .btn {
        font-size: 0.85rem;
        padding: 6px 14px !important;
    }
}

.navbar-toggler {
    border: 1px solid #e2e8f0 !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.navbar-toggler:hover, .navbar-toggler:focus {
    background: #f1f5f9;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

/* ==========================================================
   Hero Section
   ========================================================== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 50%, #f8fafc 100%);
    padding: 90px 0 80px;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--dark-slate);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--muted-text);
    margin-bottom: 35px;
    max-width: 600px;
}

.hero-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 35px;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.stat-pill {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 15px 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ==========================================================
   Cards & Service Showcases
   ========================================================== */
.clinic-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-soft);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.clinic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.icon-bubble {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.icon-bubble-teal { background: var(--primary-light); color: var(--primary-color); }
.icon-bubble-green { background: var(--secondary-light); color: var(--secondary-color); }
.icon-bubble-amber { background: var(--accent-autism-light); color: #d97706; }
.icon-bubble-indigo { background: var(--accent-indigo-light); color: var(--accent-indigo); }

.tag-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tag-badge-child { background: var(--accent-autism-light); color: #b45309; }
.tag-badge-adult { background: var(--primary-light); color: var(--primary-color); }
.tag-badge-diagnostic { background: var(--secondary-light); color: var(--secondary-color); }

/* ==========================================================
   Doctor Directory Cards
   ========================================================== */
.doctor-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.doctor-avatar-wrap {
    height: 220px;
    background: linear-gradient(135deg, #e0f2fe 0%, #ccfbf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.doctor-avatar-wrap img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.consultation-mode-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ==========================================================
   Booking Stepper Navigation Styles
   ========================================================== */
.booking-stepper .nav-link {
    background-color: #f1f5f9;
    color: var(--dark-slate);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
}

.booking-stepper .nav-link:hover {
    background-color: #e2e8f0;
}

.booking-stepper .nav-link.active {
    background-color: #ffffff !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.12);
}

/* ==========================================================
   Assessment Quiz Engine UI
   ========================================================== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: var(--shadow-hover);
}

.question-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 22px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.question-card:focus-within, .question-card.active {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.08);
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
}

.option-label:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

input[type="radio"]:checked + .option-label {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 700;
}

/* ==========================================================
   Dashboard Master Layout (Admin / Doctor / Patient)
   ========================================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f1f5f9;
}

.dashboard-sidebar {
    width: 210px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: #0f172a;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1030;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Thin Scrollbar for Sidebar */
.dashboard-sidebar::-webkit-scrollbar {
    width: 4px;
}
.dashboard-sidebar::-webkit-scrollbar-track {
    background: #0f172a;
}
.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.sidebar-brand {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 800;
    position: sticky;
    top: 0;
    background: #0f172a;
    z-index: 10;
}

.sidebar-menu {
    padding: 10px 6px;
    flex-grow: 1;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.81rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-item i {
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-item:hover, .sidebar-item.active {
    color: #ffffff;
    background: rgba(14, 116, 144, 0.25);
    border-left: 3px solid var(--primary-hover);
}

.dashboard-main {
    margin-left: 210px;
    width: calc(100% - 210px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f1f5f9;
}

.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: #ffffff;
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dashboard-content {
    padding: 18px 20px;
    flex-grow: 1;
}

/* Compact Table Formatting to Prevent Horizontal Scroll */
.table-compact {
    font-size: 0.875rem;
    width: 100%;
}
.table-compact th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    padding: 12px 14px;
    white-space: nowrap;
}
.table-compact td {
    padding: 12px 14px;
    vertical-align: middle;
}

.metric-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    min-height: 85px;
    transition: all 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.metric-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* ==========================================================
   Printable Prescription & A4 Case File PDF Stylesheet
   ========================================================== */
@page {
    size: A4 portrait;
    margin: 8mm 10mm;
}

@media print {
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 10.5pt !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        display: block !important;
        overflow: visible !important;
    }

    /* Hide unneeded layout chrome */
    .emergency-top-bar,
    .navbar-main,
    .dashboard-sidebar,
    .dashboard-topbar,
    .no-print,
    .btn,
    .navbar,
    footer,
    .alert,
    #slotsLoading {
        display: none !important;
    }

    /* Reset layout containers for natural paper flow */
    .dashboard-wrapper,
    .dashboard-main,
    .dashboard-content,
    main,
    .bg-light,
    .container,
    .container-fluid {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .printable-record,
    .printable-case-file,
    .printable-slip,
    .print-card {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        page-break-before: avoid !important;
        page-break-inside: auto !important;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
        margin-bottom: 12px !important;
        background: #ffffff !important;
        page-break-inside: auto !important;
    }

    .bg-light {
        background-color: #f8fafc !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .table {
        border-color: #cbd5e1 !important;
    }

    .badge {
        border: 1px solid #cbd5e1 !important;
        color: #000000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .text-primary, .text-primary-custom {
        color: #0284c7 !important;
    }

    .text-success {
        color: #16a34a !important;
    }

    .text-warning {
        color: #d97706 !important;
    }
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================
   Responsive Breakpoints
   ========================================================== */
@media (max-width: 991px) {
    .hero-title { font-size: 2.3rem; }
    
    .dashboard-wrapper {
        display: block !important;
        width: 100% !important;
        overflow-x: hidden;
    }

    .dashboard-sidebar {
        width: 260px !important;
        height: 100vh !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
        box-shadow: 6px 0 25px rgba(0, 0, 0, 0.5);
    }

    .dashboard-sidebar.show-mobile {
        transform: translateX(0) !important;
    }

    .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        overflow-x: hidden;
    }

    .dashboard-topbar {
        padding: 0 16px;
        height: 60px;
    }

    .dashboard-content {
        padding: 16px 12px;
    }

    /* Public Website Responsive Navbar & Drawer */
    .navbar-main {
        padding: 8px 0;
    }

    .navbar-collapse {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 16px;
        margin-top: 10px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    }

    .navbar-nav {
        gap: 2px;
        margin-bottom: 12px !important;
    }

    .nav-link-custom {
        width: 100%;
        padding: 10px 14px !important;
        font-size: 0.95rem;
    }

    .navbar-main .dropdown-menu {
        border: 1px solid #f1f5f9 !important;
        box-shadow: none !important;
        background: #f8fafc !important;
        padding: 10px !important;
        border-radius: 8px !important;
        min-width: 100% !important;
    }

    .nav-action-btns {
        border-top: 1px solid #f1f5f9;
        padding-top: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .nav-action-btns .btn {
        width: 100%;
        justify-content: center;
        padding: 9px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 767px) {
    .emergency-top-bar {
        font-size: 0.75rem;
        padding: 5px 0;
        text-align: center;
    }

    .hero-section {
        padding: 40px 0 50px !important;
    }

    .hero-title {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }

    .hero-subtitle {
        font-size: 0.98rem !important;
        margin-bottom: 24px !important;
    }

    .hero-card {
        padding: 22px 18px !important;
        margin-top: 20px;
    }

    .stat-pill {
        padding: 12px 14px !important;
    }
}

/* ==========================================================
   FLOATING ACTION BUTTONS (WHATSAPP & SCROLL TO TOP)
   ========================================================== */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1045;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: #ffffff !important;
    padding: 11px 18px;
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: whatsapp-pulse 2.5s infinite;
}

.floating-whatsapp-btn i {
    font-size: 1.45rem;
}

.floating-whatsapp-btn:hover {
    background-color: #20ba5a;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* 2. Floating Scroll To Top Button (Bottom Right) */
.floating-scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1045;
    width: 48px;
    height: 48px;
    background: #0e7490;
    color: #ffffff !important;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 15px rgba(14, 116, 144, 0.35);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-scroll-top-btn.show-scroll {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-scroll-top-btn:hover {
    background: #08566d;
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 22px rgba(14, 116, 144, 0.5);
}

@media (max-width: 576px) {
    .floating-whatsapp-btn {
        bottom: 20px;
        left: 16px;
        padding: 12px;
        width: 48px;
        height: 48px;
        justify-content: center;
        border-radius: 50%;
    }
    .floating-whatsapp-btn span {
        display: none;
    }
    .floating-scroll-top-btn {
        bottom: 20px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

/* ==========================================================
   APP-STYLE MOBILE BOTTOM NAVIGATION BAR & LIVE CHAT WIDGET
   ========================================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1040;
    padding: 0 2px;
}

.mobile-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none !important;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 2px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.mobile-nav-item i {
    font-size: 1.05rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.mobile-nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    font-size: 0.63rem;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: #0e7490 !important;
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
    color: #0e7490 !important;
}

/* Prominent Floating Center Action Button (Book Appointment) */
.mobile-nav-item.center-action {
    position: relative;
    top: -10px;
}

.mobile-nav-center-circle {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 14px rgba(14, 116, 144, 0.4);
    border: 3px solid #ffffff;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.mobile-nav-item.center-action:active .mobile-nav-center-circle {
    transform: scale(0.92);
}

/* ==========================================================
   IN-WEBSITE REAL-TIME LIVE CHAT WIDGET
   ========================================================== */
.floating-livechat-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1045;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 50px;
    border: none;
    box-shadow: 0 5px 20px rgba(14, 116, 144, 0.45);
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: livechat-pulse 2.5s infinite;
}

.floating-livechat-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(14, 116, 144, 0.6);
}

.livechat-btn-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.livechat-online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    background-color: #22c55e;
    border: 2px solid #0e7490;
    border-radius: 50%;
}

@keyframes livechat-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 116, 144, 0.6);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(14, 116, 144, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(14, 116, 144, 0);
    }
}

/* Live Chat Widget Box */
.livechat-widget-popup {
    position: fixed;
    bottom: 84px;
    left: 24px;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    z-index: 1046;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.livechat-widget-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.livechat-header {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.livechat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: #0e7490;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.livechat-body {
    flex-grow: 1;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}

.livechat-onboarding {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    justify-content: center;
}

.livechat-messages-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.livechat-msg {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.45;
    word-break: break-word;
    display: flex;
    flex-direction: column;
}

.livechat-msg-agent {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.livechat-msg-visitor {
    background: #0e7490;
    color: #ffffff;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
    box-shadow: 0 1px 3px rgba(14, 116, 144, 0.2);
}

.livechat-msg-meta {
    font-size: 0.68rem;
    margin-top: 3px;
}

.livechat-quick-pills {
    padding: 6px 12px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    flex-shrink: 0;
}
.livechat-quick-pills::-webkit-scrollbar {
    display: none;
}

.livechat-quick-pill {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #0e7490;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.livechat-quick-pill:hover {
    background: #0e7490;
    color: #ffffff;
    border-color: #0e7490;
}

.livechat-footer {
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Interactive WhatsApp Live Chat Popup Box */
.whatsapp-chat-popup {
    position: fixed;
    bottom: 82px;
    left: 24px;
    width: 320px;
    max-width: calc(100vw - 48px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    z-index: 1046;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-chat-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.whatsapp-chat-header {
    background: #075E54;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whatsapp-chat-body {
    padding: 12px;
    background: #ECE5DD;
    background-image: radial-gradient(#d1c7bc 1px, transparent 1px);
    background-size: 12px 12px;
}

.whatsapp-msg-bubble {
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 12px 12px 12px 2px;
    font-size: 0.83rem;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
    line-height: 1.4;
}

.whatsapp-quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.whatsapp-quick-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 3px 9px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #0e7490;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.whatsapp-quick-pill:hover {
    background: #0e7490;
    color: #ffffff;
    border-color: #0e7490;
}

.whatsapp-chat-footer {
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 991px) {
    .mobile-bottom-nav {
        display: block !important;
    }

    body {
        padding-bottom: 64px !important;
    }

    /* Floating WhatsApp Button on Mobile - Compact Circle above Bottom Bar */
    .floating-whatsapp-btn {
        display: flex !important;
        bottom: 70px !important;
        right: 14px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 1.4rem !important;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.45) !important;
    }

    /* Floating Live Chat Button on Mobile - Compact Circle above Bottom Bar */
    .floating-livechat-btn {
        display: flex !important;
        bottom: 70px !important;
        left: 14px !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
        align-items: center !important;
        box-shadow: 0 4px 15px rgba(14, 116, 144, 0.45) !important;
    }

    .floating-livechat-btn span:not(.livechat-online-dot):not(.badge) {
        display: none !important;
    }

    .floating-livechat-btn .badge {
        position: absolute !important;
        top: -3px !important;
        right: -3px !important;
        padding: 3px 6px !important;
        font-size: 0.65rem !important;
    }

    .livechat-widget-popup {
        bottom: 72px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important;
        height: calc(100vh - 140px) !important;
    }

    .floating-scroll-top-btn {
        bottom: 122px !important;
        right: 14px !important;
        width: 38px !important;
        height: 38px !important;
    }
}

@media print {
    .floating-livechat-btn,
    .floating-whatsapp-btn,
    .floating-scroll-top-btn,
    .mobile-bottom-nav,
    .livechat-widget-popup,
    .whatsapp-chat-popup {
        display: none !important;
    }
}
