/**
 * Customer Web App Styles - Modern Mobile-First Design
 * Tối ưu cho điện thoại, UI/UX chuẩn
 */

:root {
    --primary: #FF6B35;
    --primary-dark: #E85A2B;
    --primary-light: #FF8C5A;
    --secondary: #4ECDC4;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --dark: #1F2937;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 50%, #BAE6FD 100%);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    /* iOS Safari */
    color: var(--gray-800);
    padding-bottom: 100px;
    /* Space for fixed cart button */
    padding-bottom: env(safe-area-inset-bottom, 100px);
    /* Safe area for iPhone */
}

/* ========== NAVBAR ========== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white) !important;
    text-decoration: none;
    transition: all 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.navbar-brand i {
    font-size: 1.4rem;
}

.navbar-text {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95) !important;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.navbar-text i {
    font-size: 1rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 14px !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95) !important;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: var(--white) !important;
}

.nav-link i {
    font-size: 1rem;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 100%;
    padding: 16px;
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 24px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* ========== CARDS ========== */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: var(--white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-bottom: 16px;
}

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

.card-body {
    padding: 16px;
}

@media (min-width: 768px) {
    .card-body {
        padding: 24px;
    }
}

.card-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--gray-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 12px 20px;
    font-size: 0.9375rem;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    touch-action: manipulation;
    min-height: 44px;
    /* Touch target size for mobile */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #05C490 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(6, 214, 160, 0.3);
}

.btn-success:active {
    transform: scale(0.98);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #FFC947 100%);
    color: var(--dark);
    box-shadow: 0 4px 12px rgba(255, 209, 102, 0.3);
}

.btn-warning:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--gray-500);
    color: var(--white);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-link {
    padding: 4px 8px;
    min-height: auto;
}

/* ========== FORM CONTROLS ========== */
.form-control {
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-200);
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
    min-height: 44px;
    /* Touch target */
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    outline: none;
}

.input-group-text {
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 12px 16px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ========== MENU CARDS ========== */
.menu-card {
    border: none;
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    height: 100%;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.menu-card:active {
    transform: scale(0.98);
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.menu-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
    background: var(--gray-100);
}

@media (min-width: 768px) {
    .menu-card img {
        height: 220px;
    }
}

.menu-card:hover img {
    transform: scale(1.05);
}

.menu-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 8px;
}

.card-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ========== CATEGORY TABS ========== */
.category-tab {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 10px 20px;
    margin: 4px 6px 4px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-block;
    min-height: 40px;
    touch-action: manipulation;
}

.category-tab:active {
    transform: scale(0.95);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ========== CART ========== */
.offcanvas {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.offcanvas-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
    border-bottom: none;
}

.offcanvas-title {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.offcanvas-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 80px);
    overflow-y: auto;
}

.cart-total-wrapper {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 2px solid var(--primary);
}

.cart-total-amount {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

@media (max-width: 767px) {
    .cart-total-amount {
        font-size: 1.3rem !important;
    }
}

.cart-item {
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
}

.cart-item:last-child {
    border-bottom: none;
}

/* ========== CART ITEM CARD (NEW DESIGN) ========== */
.cart-item-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
    overflow: hidden;
}

.cart-item-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.cart-item-card .d-flex {
    flex-wrap: nowrap;
    gap: 12px;
}

.cart-item-card .text-end {
    flex-shrink: 0;
    min-width: fit-content;
}

.cart-item-card .text-end>div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quantity-control-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.quantity-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-300);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-700);
    touch-action: manipulation;
    flex-shrink: 0;
}

.quantity-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-btn-plus {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
    color: var(--white);
}

.quantity-btn-plus:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-color: var(--primary-dark);
    color: var(--white);
}

.quantity-btn-minus {
    background: var(--white);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.quantity-btn-minus:hover {
    background: var(--gray-100);
    border-color: var(--gray-500);
    color: var(--dark);
}

.quantity-btn-minus:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-input {
    width: 80px;
    text-align: center;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    min-height: 44px;
    background: var(--gray-50);
    color: var(--dark);
}

/* ========== FIXED CART BUTTON ========== */
.position-fixed.bottom-0.end-0 {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border: none;
    z-index: 1000;
    margin: 24px;
    margin-right: 24px;
    margin-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    /* Safe area for iPhone */
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.position-fixed.bottom-0.end-0:active {
    transform: scale(0.95);
}

#cart-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== CURRENT ORDER CARD ========== */
#current-order-card {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08) 0%, rgba(78, 205, 196, 0.08) 100%);
    border: 2px solid rgba(255, 107, 53, 0.2);
}

#current-order-card .card-body {
    background: transparent;
}

/* ========== LOADING OVERLAY ========== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 48px;
    height: 48px;
    border-width: 4px;
    border-color: var(--primary);
    border-right-color: transparent;
}

/* ========== ALERTS ========== */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid var(--primary);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--warning);
}

/* ========== BADGE ========== */
.badge {
    border-radius: 12px;
    padding: 4px 10px;
    font-weight: 600;
    font-size: 0.8125rem;
}

/* ========== LIST GROUP ========== */
.list-group-item {
    border: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: var(--gray-50);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.list-group-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ========== BUTTON OUTLINE ========== */
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:active {
    background: var(--primary);
    color: var(--white);
    transform: scale(0.95);
}

.btn-outline-danger {
    border: 2px solid var(--danger);
    color: var(--danger);
    background: transparent;
}

.btn-outline-danger:active {
    background: var(--danger);
    color: var(--white);
    transform: scale(0.95);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

/* ========== TEXT COLORS ========== */
.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-muted {
    color: var(--gray-500) !important;
}

/* ========== QR SCANNER ========== */
.qr-scanner-container {
    text-align: center;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

#qr-reader {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {

    /* Mobile optimizations */
    body {
        padding-bottom: 90px;
    }

    .container {
        padding: 12px;
    }

    .card-body {
        padding: 16px;
    }

    .menu-card img {
        height: 160px;
    }

    .menu-price {
        font-size: 1.125rem;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 0.8125rem;
        margin: 3px 4px 3px 0;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.875rem;
    }

    .navbar {
        padding: 12px 0;
    }

    .navbar-brand {
        font-size: 1.15rem;
    }

    .navbar-brand i {
        font-size: 1.2rem;
    }

    .navbar-text {
        font-size: 0.8rem;
        padding: 6px 10px;
        gap: 6px;
    }

    .navbar-text i {
        font-size: 0.9rem;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 8px 10px !important;
        gap: 6px;
    }

    .nav-link i {
        font-size: 0.9rem;
    }

    .navbar-nav {
        gap: 4px;
    }

    .position-fixed.bottom-0.end-0 {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
        margin: 20px;
        margin-right: 20px;
        margin-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    /* Stack buttons on mobile */
    .row .col-md-6 {
        margin-bottom: 8px;
    }

    .row .col-md-6:last-child {
        margin-bottom: 0;
    }

    /* Full width buttons on mobile */
    .btn {
        width: 100%;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 12px;
    }

    .d-flex.justify-content-between>* {
        width: 100%;
    }
}

@media (min-width: 768px) {

    /* Tablet and up */
    .row .col-md-6 .btn {
        width: auto;
    }

    .d-flex.justify-content-between {
        flex-direction: row;
    }
}

/* ========== SMOOTH SCROLLING ========== */
html {
    scroll-behavior: smooth;
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ========== UTILITIES ========== */
.bg-light {
    background-color: var(--gray-50) !important;
}

.border-top {
    border-top: 1px solid var(--gray-200) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* ========== ICON ANIMATIONS ========== */
i.fas,
i.far {
    transition: transform 0.2s ease;
}

.btn:active i.fas,
.btn:active i.far {
    transform: scale(1.1);
}

/* ========== POINTS PAGE ========== */
.points-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.points-value {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 16px 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -2px;
}

.points-label {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 500;
}

@media (min-width: 768px) {
    .points-card {
        padding: 48px 40px;
    }

    .points-value {
        font-size: 4.5rem;
    }

    .points-label {
        font-size: 1.5rem;
    }
}

/* ========== EMPTY STATE ========== */
.text-center.py-5 {
    padding: 48px 16px;
}

.text-center.py-5 i {
    color: var(--gray-400);
    margin-bottom: 16px;
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== CHATBOT WIDGET ========== */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transform: translateY(120%) scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.chatbot-container.chatbot-open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chatbot-info h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.75rem;
    opacity: 0.9;
}

.chatbot-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chatbot-welcome {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.chatbot-welcome-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
    color: var(--white);
}

.chatbot-welcome h6 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-800);
}

.chatbot-welcome p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.chatbot-welcome ul {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 280px;
    margin: 0 auto 16px;
}

.chatbot-welcome ul li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.chatbot-welcome-footer {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-style: italic;
}

.chatbot-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-out;
}

.chatbot-message-user {
    flex-direction: row-reverse;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    line-height: 1.5;
    word-wrap: break-word;
    font-size: 0.9rem;
}

.chatbot-message-user .chatbot-message-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chatbot-message-bot .chatbot-message-content {
    background: var(--gray-100);
    color: var(--gray-800);
    border-bottom-left-radius: 4px;
}

.chatbot-message.error .chatbot-message-content {
    background: #FEE2E2;
    color: #991B1B;
}

.menu-item-highlight {
    color: var(--primary);
    font-weight: 600;
}

.chatbot-avatar-small {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--white);
    flex-shrink: 0;
}

.chatbot-message-time {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 4px;
    align-self: flex-end;
}

.chatbot-message-user .chatbot-message-time {
    margin-right: auto;
    margin-left: 0;
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-400);
    animation: typing 1.4s infinite;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chatbot-input-container {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

.chatbot-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-height: 44px;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.chatbot-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chatbot-toggle-btn {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.chatbot-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.chatbot-toggle-btn.chatbot-active {
    background: linear-gradient(135deg, var(--gray-500) 0%, var(--gray-600) 100%);
    transform: scale(0.95);
}

.chatbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    border: 2px solid var(--white);
}

@media (max-width: 767px) {
    .chatbot-container {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 90px;
        height: calc(100vh - 120px);
        max-height: calc(100vh - 120px);
    }

    .chatbot-toggle-btn {
        bottom: 90px;
        right: 16px;
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }

    .chatbot-message-content {
        max-width: 85%;
    }

    .chatbot-messages {
        padding: 16px;
    }
}

/* ========== PRINT STYLES ========== */
@media print {

    .navbar,
    .position-fixed,
    .btn,
    .chatbot-container,
    .chatbot-toggle-btn {
        display: none !important;
    }
}