/* Global Styles */
:root {
    --primary-green: #28a745;
    --primary-blue: #007bff;
    --primary-red: #dc3545;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --orange: #fd7e14;
    --genetix-purple: #4a32a0;
    --genetix-light-purple: #6a4cff;
    --chat-bg: #f8f9fa;
    --message-border: #e0e0e8;
    --shadow-light: rgba(60, 60, 120, 0.08);
    --shadow-medium: rgba(60, 60, 120, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e9eaf3 0%, #f8f9fa 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Header Styles - KEEPING UNTOUCHED */
.nav-section {
    background-color: #F3F3F3;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-section {
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0.5rem 0;
    position: relative;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
}

.logo-image {
    width: 120px;
    height: auto;
    object-fit: contain;
    border-radius: 50%;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-red);
    margin: 0;
    line-height: 1;
}

.tagline {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin: 0;
    line-height: 1;
}

.dmit-badge {
    background-color: var(--primary-green);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-top: 2px;
    display: inline-block;
}

/* Navigation Styles */
.navbar-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    font-size: 14px;
    margin: 0 0.75rem;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.navbar-nav .nav-link:hover {
    color: #f5b590 !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 14px;
    color: #333;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-green);
}

/* Button Styles */
.appointment-btn {
    background-color: var(--primary-green);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.appointment-btn:hover {
    background-color: #218838;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-elementary {
    border-radius: 0;
    font-size: 15px;
    margin-left: 20px;
    color: black;
    border: 1px solid #f5b590;
}

.btn-elementary:hover {
    background: black;
    color: white;
    border: none;
}

.btn-link {
    text-decoration: none;
    padding: 0.5rem;
}

.btn-link:hover {
    color: var(--primary-green) !important;
}

/* IMPROVED CHAT INTERFACE STYLES */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.chat-header {
    margin-bottom: 2rem;
    text-align: center;
}

.chat-title {
    color: var(--genetix-purple);
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(74, 50, 160, 0.1);
}

.chat-subtitle {
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: 400;
}

/* Enhanced Chat Container */
.chat-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 88vh; /* more space for messages */
    min-height: 600px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 
        0 20px 60px rgba(60, 60, 120, 0.15),
        0 8px 32px rgba(60, 60, 120, 0.1),
        0 4px 16px rgba(60, 60, 120, 0.08);
    display: flex;
    /* Important for nested flex children to scroll properly */
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Two-Pane Layout */
.chat-messages-pane {
    flex: 1 1 auto; /* grow and shrink */
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    /* Revert: allow pane to size naturally so suggestions don't get clipped */
    min-height: 0;
}

.suggestions-pane {
    width: 360px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.suggestions-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.8);
}

.suggestions-header h4 {
    margin: 0;
    color: var(--genetix-purple);
    font-weight: 600;
    font-size: 1.1rem;
}

.suggestions-content {
    flex: 1;
    padding: 1rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.suggestions-content::-webkit-scrollbar {
    width: 6px;
}

.suggestions-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.suggestions-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--genetix-purple), var(--genetix-light-purple));
    border-radius: 10px;
}

/* Professional Chat Messages Area */
.chat-messages {
    flex: 1 1 auto;
    padding: 1.5rem;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    position: relative;
    /* Smooth native scrolling on mobile */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    /* Ensure scroll area can shrink inside flex parents */
    min-height: 0;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--genetix-purple), var(--genetix-light-purple));
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2d1e6b, #4a32a0);
}

/* Enhanced Message Styles */
.message {
    display: flex;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.4s ease;
    position: relative;
}

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

.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid #fff;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, var(--genetix-purple), var(--genetix-light-purple));
    color: white;
    font-size: 1.2rem;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: white;
    font-size: 1.1rem;
}

.message-content {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    max-width: 75%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--genetix-purple), var(--genetix-light-purple));
    color: white;
    box-shadow: 
        0 6px 25px rgba(74, 50, 160, 0.25),
        0 3px 12px rgba(74, 50, 160, 0.15);
}

.message-content p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Remove duplicate styling since we now have ai-text-content */
.message-content.ai-text-content p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.message-time {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.75rem;
    margin-bottom: 0;
    padding: 0;
    opacity: 0.7;
}

.user-message .message-time {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
}

.ai-message .message-time {
    text-align: left;
    color: #888;
}

/* Language Selector */
.language-selector-container {
    padding: 1rem 1.5rem 0.5rem 1.5rem;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Compact toggle button */
.language-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4);
    border: 2px solid rgba(74, 50, 160, 0.15);
    color: var(--genetix-purple);
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.language-toggle-btn:hover {
    border-color: var(--genetix-purple);
    background: #fff;
}

.language-toggle-btn .caret {
    margin-left: 0.25rem;
    font-size: 0.8rem;
}

.language-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.language-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.language-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--genetix-purple);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.language-label i {
    color: var(--genetix-light-purple);
    font-size: 1rem;
}

.language-select {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
}

.language-select {
    border: 2px solid rgba(74, 50, 160, 0.15);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--genetix-purple);
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.language-select:focus {
    outline: none;
    border-color: var(--genetix-purple);
    box-shadow: 0 4px 15px rgba(74, 50, 160, 0.15);
    background: white;
}

.custom-language-input {
    animation: slideDown 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.custom-language-input input {
    border: 2px solid rgba(74, 50, 160, 0.15);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--genetix-purple);
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.custom-language-input input:focus {
    outline: none;
    border-color: var(--genetix-purple);
    box-shadow: 0 4px 15px rgba(74, 50, 160, 0.15);
    background: white;
}

.current-language-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(74, 50, 160, 0.1), rgba(106, 76, 255, 0.1));
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--genetix-purple);
    border: 1px solid rgba(74, 50, 160, 0.15);
    flex-shrink: 0;
    min-width: 200px;
    justify-content: center;
}

.current-language-indicator i {
    color: var(--primary-green);
    font-size: 0.9rem;
}

.current-language-indicator span {
    font-weight: 500;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Chat Input */
.chat-input-container {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Disclaimer below input */
.ai-disclaimer {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #6c757d;
}
.ai-disclaimer a { color: var(--genetix-purple); text-decoration: underline; }
.ai-disclaimer a:hover { color: #2d1e6b; }

.input-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    box-shadow: 
        0 8px 32px rgba(60, 60, 120, 0.1),
        0 4px 16px rgba(60, 60, 120, 0.08);
    border-radius: 25px;
    overflow: hidden;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control {
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: transparent;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    line-height: 1.4;
    flex: 1;
}

.form-control:focus {
    box-shadow: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--genetix-purple), var(--genetix-light-purple));
    border: none;
    padding: 1rem 1.8rem;
    border-radius: 0 25px 25px 0;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 15px rgba(74, 50, 160, 0.3);
    min-width: 60px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 50, 160, 0.4);
    background: linear-gradient(135deg, #2d1e6b, #4a32a0);
}

/* Enhanced Suggestion Chips */
.suggestion-chip {
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4);
    border: 2px solid rgba(74, 50, 160, 0.1);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--genetix-purple);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: visible;
    text-align: center;
    user-select: none;
    min-width: 200px;
    max-width: 280px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
}

.suggestion-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.suggestion-chip:hover {
    background: linear-gradient(135deg, var(--genetix-purple), var(--genetix-light-purple));
    border-color: var(--genetix-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 50, 160, 0.25);
}

.suggestion-chip:hover::before {
    left: 100%;
}

.suggestion-chip:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* Message Suggestions */
.message-suggestions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    padding: 0;
}

.suggestion {
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(74, 50, 160, 0.1);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--genetix-purple);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.suggestion:hover {
    background: linear-gradient(135deg, var(--genetix-purple), var(--genetix-light-purple));
    color: white;
    border-color: var(--genetix-purple);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 50, 160, 0.2);
}

/* Copy Button */
.copy-btn {
    background: linear-gradient(135deg, var(--genetix-purple), var(--genetix-light-purple));
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 50, 160, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
    align-self: flex-start;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 50, 160, 0.3);
    background: linear-gradient(135deg, #2d1e6b, #4a32a0);
}

/* AI Status */
.ai-status {
    display: block;
    font-size: 0.9rem;
    color: var(--genetix-purple);
    font-weight: 600;
    margin-bottom: 0.75rem;
    opacity: 0.8;
    font-style: italic;
}

/* AI Text Content */
.ai-text-content {
    margin-bottom: 0.75rem;
}

.ai-text-content p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Typing Indicator */
.typing-indicator {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--genetix-purple);
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.typing-text {
    color: var(--genetix-purple);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Streaming Animation */
.message-content.streaming .ai-text-content::after {
    content: '▋';
    display: inline-block;
    vertical-align: middle;
    animation: blink 1s steps(1) infinite;
    color: var(--genetix-purple);
    margin-left: 4px;
    font-weight: bold;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Styles */
.site-footer { background: #fff; margin-top: 2rem; }
.footer-top-divider { height: 1px; width: 100%; background: rgba(0,0,0,0.06); margin: 0 0 1.25rem; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1rem 0; }
.footer-grid { display: grid; grid-template-columns: 220px 1fr 1fr 260px; gap: 1rem; align-items: start; }
.footer-brand { display: flex; align-items: center; }
.footer-logo { width: 140px; height: auto; object-fit: contain; }
.footer-heading { color: #f5b590; font-weight: 800; margin: 0 0 .75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-links a { color: #333; text-decoration: none; }
.footer-links a:hover { color: var(--genetix-purple); text-decoration: underline; }
.footer-cta { display: flex; justify-content: end; align-items: start; }
.footer-appointment { border: 1px solid #f5b590; color: #333; border-radius: 0; padding: .75rem 1rem; font-weight: 600; }
.footer-appointment:hover { background: #000; color: #fff; border-color: #000; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; gap: 1rem; }
.footer-social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.1); border-radius: 6px; color: #333; margin-right: .5rem; }
.footer-social a:hover { color: #fff; background: var(--genetix-purple); border-color: var(--genetix-purple); }
.footer-store-btn { display: inline-block; background: #111; color: #fff; padding: .5rem .9rem; border-radius: 6px; text-decoration: none; }
.footer-copyright { background: #101010; color: #fff; text-align: center; padding: .75rem 1rem; font-size: .9rem; }

/* Responsive Design - Desktops */
@media (max-width: 1024px) and (min-width: 768px) {
    .navbar-brand {
        width: 14%;
    }
    .navbar-expand-lg .navbar-collapse {
        width: 59%;
    }
    
    /* Language selector tablet styles */
    .language-row {
        gap: 0.75rem;
    }
    
    .language-select,
    .custom-language-input,
    .current-language-indicator {
        min-width: 180px;
    }
}

/* Responsive Design - Mobile First Approach */
@media only screen and (max-width: 770px) {
    /* Footer responsive */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-cta { grid-column: 1 / -1; justify-content: start; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    /* Mobile Header Layout - KEEPING UNTOUCHED */
    .header-section {
        padding: 0;
    }
    
    .navbar {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar-brand {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .logo-container {
        flex-direction: column;
        text-align: center;
        margin: 0;
    }
    
    .logo-image {
        width: 100px;
        height: auto;
        margin: 0 0 1rem 0;
    }
    
    .brand-text {
        text-align: center;
        align-items: center;
    }
    
    .brand-name {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .dmit-badge {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
    
    /* Mobile Header Actions - Keep Fixed in Top */
    .header-actions {
        position: absolute;
        top: 1rem;
        right: 1rem;
        transform: none;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .header-actions .btn-outline-warning {
        font-size: 10px;
        padding: 0.4rem 0.8rem;
        margin: 0;
    }
    
    .header-actions .btn-link {
        padding: 0.4rem;
        font-size: 14px;
    }
    
    /* Mobile Navigation */
    .navbar-toggler-div {
        max-width: 18%;
    }

    .navbar-toggler {
        border: none;
        background: black;
        color: white;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    }
    
    .navbar-collapse {
        width: 100%;
        background: white;
        margin-top: 1rem;
        padding: 1rem;
        position: absolute;
        z-index: 9;
        top: 210px;
        left: 0px;
        right: 0px;
    }
    
    .navbar-nav {
        width: 100%;
        text-align: left;
        margin: 0;
        padding: 0;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem 0;
        margin: 0;
        font-size: 14px;
        font-weight: 500;
        color: #333 !important;
        border-radius: 8px;
        transition: all 0.3s ease;
        text-align: center;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: var(--light-gray);
        padding-left: 1rem;
    }
    
    /* Mobile Dropdown */
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        color: #6c757d;
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
    }
    
    .dropdown-item:hover {
        background-color: var(--light-gray);
        color: var(--primary-green);
        border-left-color: var(--primary-green);
    }
    
    /* Mobile Right Side Actions */
    .navbar-nav.ms-auto {
        width: 66%;
        padding: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-nav.ms-auto.cart {
        width: 16%;
        padding: 0;
        flex-direction: column;
        align-items: stretch;
    }
    
    .appointment-btn {
        width: 100%;
        margin: 0;
        padding: 1rem;
        font-size: 16px;
        text-align: center;
        border-radius: 25px;
    }
    
    /* Tighten overall vertical rhythm for phones */
    .main-content { padding: 1rem 0 0; }
    .chat-header { margin: 0 0 0.75rem; }
    .chat-title { font-size: 1.7rem; }
    .chat-subtitle { font-size: 0.95rem; line-height: 1.35; max-width: 92%; margin: 0.25rem auto 0; }

    /* Mobile Chat Container */
    .chat-container {
        height: 105vh; /* requested for tablets to small devices */
        margin: 0 0.5rem;
        border-radius: 16px;
        flex-direction: column;
        min-height: 0;
    }
    
    .suggestions-pane {
        width: 100%;
        height: auto;
        max-height: 140px;
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .suggestions-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .suggestion-chip {
        padding: 0.45rem 0.85rem;
        font-size: 0.85rem;
        min-width: 160px;
        max-width: 240px;
        text-align: center;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.3;
    }
    
    .chat-messages {
        padding: 0.75rem;
        padding-bottom: 96px;
        min-height: 0;
    }
    
    .message-content {
        max-width: 94%;
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }

    /* Language selector mobile styles */
    .language-selector-container {
        padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    }
    
    .language-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .language-label {
        font-size: 0.9rem;
        justify-content: center;
    }
    
    .language-select,
    .custom-language-input input {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        min-width: 100%;
    }
    
    .custom-language-input,
    .current-language-indicator {
        min-width: 100%;
    }
    
    .current-language-indicator {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        justify-content: center;
        order: 3;
    }
    
    .language-select {
        order: 2;
    }
    
    .language-label {
        order: 1;
    }
    
    /* Make input sticky and compact */
    .chat-input-container {
        position: sticky;
        bottom: 0; left: 0; right: 0;
        padding: 0.75rem;
        background: #fff;
        box-shadow: 0 -8px 18px rgba(0,0,0,0.06);
        border-top: 1px solid rgba(0,0,0,0.06);
    }
    .input-group { border-radius: 16px; box-shadow: 0 6px 16px rgba(60,60,120,0.08); }
    .form-control { min-height: 44px; padding: 0.75rem 1rem; font-size: 0.95rem; }
    .btn-primary { padding: 0.75rem 1rem; border-radius: 0 16px 16px 0; min-width: 52px; }
    
    .suggestion-chips {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-chip {
        width: 100%;
        max-width: 300px;
        margin: 0.25rem 0;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.3;
    }
    
    .chat-title {
        font-size: 2rem;
    }
    
    .chat-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.75rem;
    }
    
    .logo-image {
        width: 80px;
        height: auto;
    }
    
    .brand-name {
        font-size: 1.8rem;
    }
    
    .chat-container {
        height: 105vh; /* keep consistent with tablet height */
        margin: 0 0.5rem;
        border-radius: 12px;
    }
    
    .message-content {
        max-width: 90%;
        padding: 0.875rem 1rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 14px;
        padding: 0.875rem 0;
    }
    
    .header-actions .btn-outline-warning {
        font-size: 9px;
        padding: 0.3rem 0.6rem;
    }
    
    .chat-title {
        font-size: 1.8rem;
    }
    
    .chat-subtitle {
        font-size: 0.9rem;
    }
    /* Footer responsive small */
    .footer-grid { grid-template-columns: 1fr; }
    .footer-cta { justify-content: start; }
} 