/* ============================================
   usCafe — Smart Café Virtual Barista
   VisionOS / Liquid Glass Style
   ============================================ */

/* Font Face Definitions - Dana (Persian/Geometric) */
@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-extralight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-demibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-extrabold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Dana';
    src: url('fonts/fonnts.com-dana-black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* CSS Custom Properties */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f5f5f7;
        --text-secondary: #86868b;
        --text-on-dark: #000000;

        /* High Contrast User Bubble */
        --bubble-user: #ffffff;
        --bubble-user-text: #000000;

        /* Dark Glass Bot Bubble */
        --bubble-bot: rgba(40, 40, 40, 0.6);
        --bubble-bot-text: #ffffff;

        /* Midnight Glass Tokens */
        --glass-header: rgba(0, 0, 0, 0.01);
        /* Kept transparent as requested */
        --glass-input: rgba(22, 22, 22, 0.85);
        /* Dark frosted bar */
        --glass-card: rgba(30, 30, 30, 0.6);
        --glass-border: rgba(255, 255, 255, 0.12);
        --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
}

:root {
    /* Color Palette - Warm & Modern */
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-on-dark: #ffffff;

    --accent: #9e7f38;
    /* Sophisticated gold/brown */
    --accent-glow: rgba(158, 127, 56, 0.4);

    --bubble-user: #1d1d1f;
    --bubble-user-text: #ffffff;
    --bubble-bot: rgba(255, 255, 255, 0.65);
    --bubble-bot-text: #000000;

    /* Glass Tokens */
    --glass-header: rgba(245, 245, 247, 0.65);
    --glass-input: rgba(245, 245, 247, 0.75);
    --glass-card: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.04);

    /* Blur Strengths */
    --blur-xl: 30px;
    --blur-lg: 20px;
    --blur-md: 12px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 14px;
    --space-lg: 20px;

    /* Animation */
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.1);
    --ease-smooth: cubic-bezier(0.33, 1, 0.68, 1);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    /* Updated Font Stack */
    font-family: 'Dana', 'SF Pro Display', 'Inter', -apple-system, sans-serif;
    background: #fbfbfd;
    color: var(--text-primary);
}

/* ============================================
   AMBIENT BACKGROUND
   ============================================ */
.chat-screen {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ambient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #f5f2ed 0%, #fff 100%);
    overflow: hidden;
    pointer-events: none;
    filter: blur(60px);
    /* Soften everything */
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: orbFloat 10s ease-in-out infinite alternate;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(212, 168, 85, 0.15);
    top: -50px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(180, 150, 100, 0.1);
    bottom: -100px;
    left: -150px;
    animation-delay: -2s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(255, 200, 100, 0.08);
    top: 40%;
    left: 40%;
    animation-duration: 15s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

/* ============================================
   GLASS HEADER - Glassmorphism Style
   ============================================ */
.glass-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: auto;
    padding: max(10px, env(safe-area-inset-top)) var(--space-lg) var(--space-sm);

    background: transparent;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    /* 🔥 Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header-inner:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.cafe-avatar {
    width: 36px;
    height: 36px;
    /* 🔥 Glass Avatar */
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cafe-identity {
    display: flex;
    flex-direction: column;
}

.cafe-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
}

.cafe-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-dot {
    width: 5px;
    height: 5px;
    background: #34c759;
    border-radius: 50%;
    box-shadow: 0 0 6px #34c759;
}

/* ============================================
   CHAT AREA
   ============================================ */
.chat-area {
    position: relative;
    flex: 1;
    z-index: 10;
    padding: 70px var(--space-lg) 100px;
    /* Reduced top padding */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hides scrollbar but allows scroll */
.chat-area::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.message {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    animation: messagePop 0.4s var(--ease-spring) forwards;
    transform-origin: bottom center;
}

@keyframes messagePop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.user {
    align-self: flex-end;
    align-items: flex-end;
}

.message.bot {
    align-self: flex-start;
    align-items: flex-start;
}

.message-text {
    padding: 8px 12px;
    /* Reduced padding */
    font-size: 14px;
    /* Reduced font size */
    line-height: 1.5;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: none;
}

.message.user .message-text {
    background: var(--bubble-user);
    color: var(--bubble-user-text);
    /* RTL: User is on Left (flex-end), so sharp corner at Bottom-Left */
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.message.bot .message-text {
    background: var(--bubble-bot);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--bubble-bot-text);
    /* RTL: Bot is on Right (flex-start), so sharp corner at Bottom-Right */
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Menu Button under bot messages */
.menu-button {
    margin-top: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #9e7f38 0%, #b8935d 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(158, 127, 56, 0.3);
}

.menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(158, 127, 56, 0.4);
    background: linear-gradient(135deg, #b8935d 0%, #9e7f38 100%);
}

.menu-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(158, 127, 56, 0.3);
}

body.dark-mode .menu-button {
    background: linear-gradient(135deg, #7a6330 0%, #9e7f38 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

body.dark-mode .menu-button:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #9e7f38 0%, #7a6330 100%);
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.95) 0%, rgba(211, 47, 47, 0.95) 100%);
    color: white;
}

.notification.info {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.95) 0%, rgba(25, 118, 210, 0.95) 100%);
    color: white;
}

body.dark-mode .notification {
    background: rgba(30, 30, 30, 0.95);
    color: white;
}

.message-time {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.3);
    margin-top: 4px;
    padding: 0 4px;
}

.system-message {
    align-self: center;
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 20px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
}

/* ============================================
   GLASS QUICK REPLIES
   ============================================ */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.glass-btn {
    background: var(--glass-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    padding: 6px 14px;
    /* Reduced padding */
    border-radius: 14px;
    font-size: 12px;
    /* Reduced font size */
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: none;
}

.glass-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.7);
}

/* ============================================
   GLASS INPUT BAR
   ============================================ */
.glass-input-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-sm) var(--space-lg) max(var(--space-lg), env(safe-area-inset-bottom));
    background: transparent;
    /* Transparent like header */
    /* Removed blur and border to float the input */
}

.input-wrapper {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 4px 16px 4px 6px;
    /* RTL Padding */
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    border: none;
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

#chatInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    /* Prevents iOS zoom */
    color: var(--text-primary);
    padding: 10px 0;
    outline: none;
    resize: none;
    /* Prevent manual resize */
    overflow-y: auto;
    /* Allow scrolling if needed */
    max-height: 120px;
    /* Limit height to ~5 lines */
    min-height: 20px;
    line-height: 1.4;
    font-family: inherit;
}

#chatInput::placeholder {
    color: #a0a0a0;
}

.send-button {
    width: 36px;
    height: 36px;
    background: var(--text-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.send-button:active {
    transform: scale(0.9);
}

/* ============================================
   TYPING INDICATOR
   ============================================ */
.typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bubble-bot);
    backdrop-filter: blur(10px);
    border-radius: 18px 18px 18px 4px;
    width: fit-content;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.dot {
    width: 6px;
    height: 6px;
    background: #8e8e93;
    border-radius: 50%;
    opacity: 0.5;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* ============================================
   PREMIUM DARK MODE ("Midnight Glass")
   ============================================ */

/* Header Actions Container */
.header-actions {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    z-index: 200;
}

/* Dark Mode Toggle - Glassmorphism */
.theme-toggle,
.notification-toggle {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    /* 🔥 Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover,
.notification-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.theme-toggle:active,
.notification-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg,
.notification-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}


/* Dark Mode Variables & Styles (Class Support) */
body.dark-mode {
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-on-dark: #000000;
    --bubble-user: #ffffff;
    --bubble-user-text: #000000;
    --bubble-bot: rgba(40, 40, 40, 0.6);
    --bubble-bot-text: #ffffff;
    --glass-header: rgba(0, 0, 0, 0.01);
    --glass-input: rgba(22, 22, 22, 0.85);
    --glass-card: rgba(30, 30, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    background: #000000;
    color: var(--text-primary);
}

body.dark-mode .ambient-bg {
    background: radial-gradient(circle at 50% 0%, #1c1c1e 0%, #000000 100%);
}

/* Adjust Orbs for Dark Mode - Subtle Gold Glows */
body.dark-mode .orb-1 {
    background: rgba(212, 168, 85, 0.08);
    filter: blur(100px);
}

body.dark-mode .orb-2 {
    background: rgba(255, 255, 255, 0.03);
    filter: blur(120px);
}

body.dark-mode .orb-3 {
    background: rgba(158, 127, 56, 0.06);
}

/* Header Capsule in Dark Mode - Frosted Dark Glass */
body.dark-mode .header-inner {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

body.dark-mode .header-inner:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body.dark-mode .cafe-avatar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-mode .theme-toggle,
body.dark-mode .notification-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-mode .theme-toggle:hover,
body.dark-mode .notification-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body.dark-mode .cafe-name {
    color: #ffffff;
}

/* Input Bar Dark optimization */
body.dark-mode .input-wrapper {
    background: rgba(40, 40, 40, 0.5);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}

body.dark-mode .input-wrapper:focus-within {
    background: rgba(60, 60, 60, 0.8);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9);
}

body.dark-mode .send-button {
    background: #ffffff;
    color: #000000;
}

/* System Messages */
body.dark-mode .system-message {
    background: rgba(30, 30, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: #a1a1a6;
}

/* ============================================
   DYNAMIC COMPONENTS (Drink Cards & Badges)
   ============================================ */
/* Product Card (Universal for drinks, food, desserts, etc.) */
.product-card {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 18px;
    width: 100%;
    min-width: 200px;
    animation: messagePop 0.4s var(--ease-spring) forwards;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    border: none;
}

.product-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.product-icon {
    font-size: 20px;
}

.product-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.product-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

.tag.temp {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
    border-color: rgba(231, 76, 60, 0.2);
}

.tag.sweet {
    background: rgba(243, 156, 18, 0.15);
    color: #d35400;
    border-color: rgba(243, 156, 18, 0.2);
}

.tag.caffeine {
    background: rgba(155, 89, 182, 0.15);
    color: #8e44ad;
    border-color: rgba(155, 89, 182, 0.2);
}

.alternatives {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 11px;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.alt-product {
    display: inline-block;
    background: rgba(0, 0, 0, 0.03);
    padding: 2px 8px;
    border-radius: 8px;
    margin: 2px;
    white-space: normal;
    word-break: keep-all;
}

/* Legacy drink card support */
.drink-card {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 18px;
    width: 100%;
    min-width: 200px;
    animation: messagePop 0.4s var(--ease-spring) forwards;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    border: none;
}

.drink-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.drink-icon {
    font-size: 20px;
}

.drink-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drink-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.drink-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.alt-drink {
    display: inline-block;
    background: rgba(0, 0, 0, 0.03);
    padding: 2px 8px;
    border-radius: 8px;
    margin: 2px;
}

/* Environment Badge */
.env-badge {
    margin-top: 6px;
    display: inline-flex;
    gap: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 10px;
    color: var(--text-secondary);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

/* Dark Mode Overrides for Components */
body.dark-mode .message-text {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.8);
}

body.dark-mode .message.user .message-text {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.9);
}

body.dark-mode .message.bot .message-text {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.7);
}

body.dark-mode .product-card,
body.dark-mode .drink-card {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}

body.dark-mode .glass-btn {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}

body.dark-mode .system-message {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

body.dark-mode .tag {
    background: rgba(255, 255, 255, 0.08);
    color: #eee;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

body.dark-mode .product-name,
body.dark-mode .drink-name {
    color: #fff;
}

body.dark-mode .product-price {
    color: #b8935d;
}

body.dark-mode .tag.temp {
    background: rgba(231, 76, 60, 0.25);
    color: #ffadad;
}

body.dark-mode .tag.sweet {
    background: rgba(243, 156, 18, 0.25);
    color: #ffd6a5;
}

body.dark-mode .tag.caffeine {
    background: rgba(155, 89, 182, 0.25);
    color: #e0b0ff;
}

body.dark-mode .alternatives {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .alt-drink {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .env-badge {
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

body.dark-mode .typing {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.7);
}


/* ============================================
   TYPING INDICATOR ANIMATION
   ============================================ */

.typing-message {
    animation: fadeIn 0.3s ease-in-out !important;
}

.typing-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.typing-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.typing-bubble {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 20px;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.typing-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.typing-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.typing-dots .dot {
    width: 7px;
    height: 7px;
    background: var(--primary-gradient-start);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================
   CART BUTTON & MODAL
   ============================================ */
.header-cart {
    position: absolute;
    right: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
}

.cart-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-toggle:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.cart-toggle svg {
    width: 20px;
    height: 20px;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.cart-badge:empty {
    display: none;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background: var(--bg-primary);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
}

.cart-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.cart-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-size: 14px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 14px;
}

.cart-item-price {
    color: var(--text-secondary);
    font-size: 13px;
}

.cart-item-remove {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-weight: 500;
}

.cart-item-remove:hover {
    background: #cc0000;
    transform: scale(1.05);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0 0 20px 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.cart-clear {
    width: 100%;
    padding: 12px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    margin-top: 10px;
}

.cart-clear:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

.cart-note {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* Dark mode specific fixes */
body.dark-mode .cart-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .cart-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .cart-item {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .cart-footer {
    background: #2a2a2a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .cart-note {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2c3e50;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Dark mode toast */
body.dark-mode .toast {
    background: #ecf0f1;
    color: #2c3e50;
}


/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}


/* Products Container - Horizontal Scroll */
.products-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 10px;
    padding: 5px;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
}

.products-container::-webkit-scrollbar {
    height: 6px;
}

.products-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.products-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.products-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.product-card-mini {
    background: var(--glass-card);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 15px;
    min-width: 45%;
    max-width: 45%;
    width: 45%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    scroll-snap-align: start;
    box-sizing: border-box;
}

.product-card-mini.main {
    border: 2px solid var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-card-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-mini-icon {
    font-size: 32px;
}

.product-mini-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}

.product-mini-price {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.product-mini-btn {
    width: 100%;
    padding: 8px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-mini-btn:hover {
    transform: scale(1.05);
    background: #333333;
}

.product-mini-btn:active {
    transform: scale(0.98);
}

/* Dark mode - lighter button */
body.dark-mode .product-mini-btn {
    background: #f5f5f5;
    color: #1a1a1a;
}

body.dark-mode .product-mini-btn:hover {
    background: #e0e0e0;
}


.cart-note {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}


/* Light mode cart fixes */
body:not(.dark-mode) .cart-content {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .cart-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .cart-header h2 {
    color: #2c3e50;
}

body:not(.dark-mode) .cart-close {
    color: #7f8c8d;
}

body:not(.dark-mode) .cart-close:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

body:not(.dark-mode) .cart-items {
    background: #f8f9fa;
}

body:not(.dark-mode) .cart-empty {
    color: #7f8c8d;
}

body:not(.dark-mode) .cart-item {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .cart-item-name {
    color: #2c3e50;
}

body:not(.dark-mode) .cart-item-price {
    color: #7f8c8d;
}

body:not(.dark-mode) .cart-footer {
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .cart-total {
    color: #2c3e50;
}

body:not(.dark-mode) .cart-note {
    background: #e8f4f8;
    border: 1px solid #b8dce8;
    color: #7f8c8d;
}
