/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #d6e8ff 0%, #e8f0ff 100%) !important;
    color: #000000;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

html {
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: #262262;
    color: white;
    text-align: center;
    padding: 6rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(38, 34, 98, 0.3);
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.main-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-header i {
    margin-right: 0.5rem;
}

/* Chat Container */
.chat-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Chat Main Area */
.chat-main {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Chat Input */
.chat-input-container {
    padding: 1.5rem;
    border-bottom: 1px solid #e3f2fd;
}

.chat-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#chatInput {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e3f2fd;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#chatInput:focus {
    border-color: #262262;
    box-shadow: 0 0 0 3px rgba(38, 34, 98, 0.1);
    background: white;
}

.send-btn {
    position: absolute;
    right: 8px;
    background: #262262;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 140, 250, 0.4);
}

/* Chat Response */
.chat-response {
    padding: 1.5rem;
    min-height: 200px;
}

.welcome-message {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e3f2fd;
    border-left: 4px solid #262262;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.welcome-message p {
    margin: 0;
    font-size: 1.1rem;
    color: #555;
}

.bot-response {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e3f2fd;
    border-left: 4px solid #262262;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.bot-response strong {
    color: #262262;
    font-weight: 600;
}

.bot-response p {
    margin: 0.5rem 0;
}

.bot-response p:first-child {
    margin-top: 0;
}

.bot-response p:last-child {
    margin-bottom: 0;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.sidebar-section h3 {
    color: #262262;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-section i {
    margin-right: 0.5rem;
}

/* Expandable Sections */
.expandable-section {
    margin-bottom: 1rem;
}

.expand-btn {
    width: 100%;
    background: linear-gradient(135deg, #262262 0%, #262262 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.expand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 140, 250, 0.4);
}

.expand-icon {
    transition: transform 0.3s ease;
}

.expand-btn.active .expand-icon {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 1rem;
}

.expandable-content.active {
    max-height: 500px;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea, select {
    padding: 0.75rem 1rem;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    border-color: #262262;
    box-shadow: 0 0 0 3px rgba(56, 140, 250, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #262262 0%, #262262 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(56, 140, 250, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 140, 250, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #262262;
    color: #262262;
}

/* Quick Questions */
.quick-questions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-btn {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quick-btn:hover {
    background: #262262;
    color: white;
    border-color: #262262;
    transform: translateY(-1px);
}

/* Admin Login Link */
.admin-login {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 12px;
    color: #666;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.admin-login a {
    color: #666;
    text-decoration: none;
}

.admin-login:hover {
    opacity: 1;
}

.admin-login:hover a {
    color: #262262;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #262262;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

.message.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.message.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
    color: #c62828;
    border: 1px solid #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Admin Panel Styles */
.admin-container {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.admin-header {
    background: linear-gradient(135deg, #262262 0%, #262262 100%);
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(56, 140, 250, 0.3);
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.admin-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-form {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-form h2 {
    color: #262262;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 2rem;
}

.admin-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.admin-section h2 {
    color: #262262;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.faq-list, .requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item, .request-item {
    background: #f8f9fa;
    border: 1px solid #e3f2fd;
    border-left: 4px solid #262262;
    border-radius: 12px;
    padding: 1.5rem;
}

.faq-item h4, .request-item h4 {
    color: #262262;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.faq-item .category, .request-item .status {
    display: inline-block;
    background: #e3f2fd;
    color: #262262;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.request-item .status {
    background: #fff3e0;
    color: #f49d01;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar {
        order: -1;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .main-header p {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .admin-content {
        padding: 0 15px 2rem;
    }
    
    .login-form {
        margin: 0 20px;
        padding: 2rem;
    }
}


/* ============================================================================
   USER ONBOARDING STYLES
   ============================================================================ */

.onboarding-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.onboarding-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.onboarding-header {
    text-align: center;
    margin-bottom: 20px;
}

.onboarding-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
}

.onboarding-header p {
    color: #666;
    font-size: 1.1rem;
}

.onboarding-step {
    display: none;
    text-align: center;
}

.onboarding-step.active {
    display: block;
}

.step-icon {
    font-size: 2.5rem;
    color: #262262;
    margin-bottom: 12px;
}

.onboarding-step h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.onboarding-step p {
    color: #666;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    border-color: #262262;
}

.btn-primary, .btn-secondary, .btn-outline {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #262262, #262262);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-outline {
    background: transparent;
    color: #262262;
    border: 2px solid #262262;
}

.quick-questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.quick-question-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-question-card:hover {
    border-color: #262262;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quick-question-card.selected {
    border-color: #262262;
    background: #e3f2fd;
}

.question-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.question-text {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.business-hours-info:not(.header-bubble) {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.hours-display {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #262262;
}

.current-status {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
}

.status-online {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.status-offline {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.step-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.onboarding-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #f44336;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================================
   BLOCKED MESSAGE STYLES
   ============================================================================ */

.blocked-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #262262 0%, #262262 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.blocked-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.blocked-content i {
    font-size: 4rem;
    color: #f44336;
    margin-bottom: 20px;
}

.blocked-content h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 2rem;
}

.blocked-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.blocked-content .btn-primary {
    margin-top: 20px;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .onboarding-content {
        padding: 20px;
        margin: 20px;
    }
    
    .quick-questions-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .step-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .blocked-content {
        padding: 20px;
        margin: 20px;
    }
}


/* ============================================================================
   AGENT DASHBOARD CHAT MESSAGES
   ============================================================================ */
#chatMessages {
    max-height: 600px !important;
    overflow-y: auto !important;
}

/* ============================================================================
   BUSINESS HOURS NOTICE STYLES
   ============================================================================ */

#businessHoursNotice {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: 20px;
    contain: layout strict;
    isolation: isolate;
    transform: translateZ(0);
    display: none !important;
}

#businessHoursNotice .emoji {
    position: relative;
    z-index: 2;
    contain: layout strict;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

/* ============================================================================
   TESTING MODE STYLES
   ============================================================================ */

.testing-mode {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
    animation: testingPulse 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

@keyframes testingPulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.status-indicator.online {
    background: #4CAF50;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.status-indicator.offline {
    background: #f44336;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    z-index: 11;
    overflow: hidden;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-bubble,
.device-desktop .header-bubble {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap;
    min-width: 140px !important;
    text-align: center;
    display: inline-block;
}

.customer-name {
    color: #666;
    font-size: 0.9rem;
    margin-left: 10px;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ============================================================================
   AGENT MESSAGE STYLES
   ============================================================================ */

.message.agent-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    margin-left: 20px;
    margin-right: 0;
    border-radius: 20px 20px 5px 20px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    position: relative;
}

.message.agent-message::before {
    content: "👨‍💼";
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    background: #4CAF50;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.message.agent-message .message-content {
    padding: 12px 16px;
    font-weight: 500;
}

.message.agent-message .message-content strong {
    color: #E8F5E8;
    font-weight: 600;
}

/* Agent status indicator */
.agent-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(76, 175, 80, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #4CAF50;
    font-weight: 600;
}

.agent-status .status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: agentPulse 2s infinite;
}

@keyframes agentPulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}


/* ============================================================================
   QUICK QUESTIONS STYLES
   ============================================================================ */

.quick-questions {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.quick-questions h3 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.quick-btn:hover {
    background: #262262;
    color: white;
    border-color: #262262;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.quick-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .question-buttons {
        grid-template-columns: 1fr;
    }
    
    .quick-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}


/* ============================================================================
   OTHER QUESTION STYLES
   ============================================================================ */

.other-question {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.other-btn {
    background: linear-gradient(135deg, #262262, #262262);
    color: white;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

.other-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.other-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.other-btn i {
    font-size: 0.9rem;
}

/* Knowledge base question buttons */
.question-buttons .quick-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin: 2px;
}

.question-buttons .quick-btn:hover {
    background: #262262;
    color: white;
    border-color: #262262;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.question-buttons .quick-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}

/* Responsive grid for knowledge base questions */
.question-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 768px) {
    .question-buttons {
        grid-template-columns: 1fr;
    }
}


/* ============================================================================
   MOBILE-OPTIMIZED MESSAGE INPUT
   ============================================================================ */

.chat-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.input-container:focus-within {
    border-color: #262262;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#messageInput {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 8px 0;
    color: #333;
    font-family: inherit;
}

#messageInput::placeholder {
    color: #999;
    font-size: 16px; /* Prevents zoom on iOS */
}

.send-btn {
    background: #262262;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

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

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.input-hint {
    text-align: center;
    margin-top: 4px;
    color: #666;
}

.input-hint small {
    font-size: 12px;
}

/* ============================================================================
   CHAT INTERFACE LAYOUT - STICKY FOOTER PATTERN
   ============================================================================ */

/* Main chat container - uses flexbox for proper layout */
.chat-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

/* Chat messages area - takes available space and scrolls */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    padding-bottom: 80px; /* Space for input field */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    max-height: calc(100vh - 200px); /* Ensure proper height calculation */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push messages to bottom */
}

/* Mobile optimized chat messages - extra padding for fixed input */
.chat-messages.mobile-optimized {
    padding-bottom: 120px !important; /* Extra space for mobile fixed input */
    margin-bottom: 20px !important;
    min-height: calc(100vh - 300px) !important; /* Ensure adequate height */
}

/* Chat message spacing */
.chat-messages .message {
    margin-bottom: 12px;
}

/* Messages will be pushed to bottom with justify-content: flex-end */

/* Chat input area - stays at bottom */
.chat-input {
    flex-shrink: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 16px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Fixed positioning for mobile (when JS applies it) */
.chat-input[style*="position: fixed"] {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
}

/* ============================================================================
   RESPONSIVE CHAT LAYOUT ADJUSTMENTS
   ============================================================================ */

/* Mobile adjustments */
@media (max-width: 480px) {
    .chat-messages {
        padding: 12px;
        padding-bottom: 70px; /* Slightly less padding on mobile */
    }
    
    .chat-input {
        padding: 12px;
    }
}

/* Tablet adjustments */
@media (min-width: 481px) and (max-width: 768px) {
    .chat-messages {
        padding: 16px;
        padding-bottom: 80px;
    }
    
    .chat-input {
        padding: 16px;
    }
}

/* Desktop adjustments */
@media (min-width: 769px) {
    .chat-messages {
        padding: 20px;
        padding-bottom: 90px; /* More padding on desktop */
    }
    
    .chat-input {
        padding: 20px;
    }
}

/* Quick Questions Mobile Optimization */
.quick-questions {
    margin: 16px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.question-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.question-buttons .quick-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 44px; /* Minimum touch target */
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-buttons .quick-btn:hover {
    background: #262262;
    color: white;
    border-color: #262262;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.question-buttons .quick-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}

.other-question {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.other-btn {
    background: linear-gradient(135deg, #262262, #262262);
    color: white;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    min-height: 44px; /* Minimum touch target */
    transition: all 0.3s ease;
}

.other-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.other-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* Message Bubbles Mobile Optimization */
.message {
    margin: 8px 0;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.4;
}

.user-message {
    background: #f0f0f0;
    color: #333;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    margin-left: auto;
    margin-right: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.agent-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    margin-left: 0;
    margin-right: auto;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    position: relative;
}

.agent-message::before {
    content: "👨‍💼";
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    background: #4CAF50;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Header Mobile Optimization */
.header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
    background-clip: padding-box;
    -webkit-background-clip: padding-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: rgba(255, 255, 255, 0.95);
    z-index: 99;
}


.logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-main {
    font-size: 28px;
    font-weight: 700;
    color: #1a365d;
    font-family: 'Arial', 'Helvetica', sans-serif;
    line-height: 1;
    margin: 0;
}

.logo-sub {
    font-size: 9px;
    font-weight: 600;
    color: #1a365d;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: -2px;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

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

.status-indicator {
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    position: relative;
    z-index: 11;
    overflow: hidden;
}

.status-indicator.online {
    background: #4CAF50;
    color: white;
}

.testing-mode {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Chat Header Mobile Optimization */
.chat-header {
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.chat-header h2 {
    font-size: 20px;
    margin: 0 0 4px 0;
    color: #333;
}

.chat-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Responsive Breakpoints */
@media (max-width: 480px) {
    .question-buttons {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .question-buttons .quick-btn {
        padding: 14px 12px;
        font-size: 13px;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .message {
        max-width: 90%;
        font-size: 14px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .status {
        /* Mobile status rules moved to @media (max-width: 480px) block above */
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .question-buttons {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 769px) {
    .chat-input {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        border-top: 1px solid #e0e0e0;
        box-shadow: none;
    }
    
    .chat-container {
        padding-bottom: 0;
    }
    
    .chat-messages {
        padding: 20px;
    }
    
    .message {
        max-width: 70%;
    }
}

/* Touch-friendly improvements */
* {
    -webkit-tap-highlight-color: transparent;
}

button, .quick-btn {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Prevent zoom on input focus (iOS) */
input[type="text"], input[type="email"], input[type="tel"] {
    font-size: 16px;
}

/* Smooth scrolling - handled in main chat-messages rule above */

/* Loading states */
.send-btn.loading {
    background: #ccc;
    cursor: not-allowed;
}

.send-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* ============================================================================
   DEVICE-SPECIFIC OPTIMIZATIONS
   ============================================================================ */

/* Desktop Optimizations */
.device-desktop .chat-input {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    border-top: 1px solid #e0e0e0;
    box-shadow: none;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.device-desktop .input-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.device-desktop .input-container:focus-within {
    border-color: #262262;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 20px rgba(0, 0, 0, 0.15);
}

.device-desktop #messageInput {
    font-size: 16px;
    padding: 10px 0;
}

.device-desktop .send-btn {
    width: 45px;
    height: 45px;
    transition: all 0.3s ease;
}

.device-desktop .send-btn:hover {
    background: #5a6fd8;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.device-desktop .chat-container {
    padding-bottom: 0;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

/* Desktop chat messages - handled by main sticky footer pattern */

.device-desktop .message {
    max-width: 60%;
    margin: 12px 0;
}

.device-desktop .user-message {
    margin-left: auto;
    margin-right: 0;
    background: linear-gradient(135deg, #262262, #262262);
    color: white;
    padding: 15px 20px;
    border-radius: 20px 20px 5px 20px;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.3);
}

.device-desktop .agent-message {
    margin-left: 0;
    margin-right: auto;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 20px;
    border-radius: 20px 20px 20px 5px;
    box-shadow: 0 3px 15px rgba(76, 175, 80, 0.3);
    position: relative;
}

.device-desktop .agent-message::before {
    content: "👨‍💼";
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    background: #4CAF50;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* Desktop Quick Questions */
.device-desktop .quick-questions {
    margin: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
}

.device-desktop .question-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.device-desktop .question-buttons .quick-btn {
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.device-desktop .question-buttons .quick-btn:hover {
    background: linear-gradient(135deg, #262262, #262262);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.device-desktop .other-btn {
    padding: 15px 25px;
    font-size: 15px;
    border-radius: 10px;
    min-height: 50px;
}

.device-desktop .other-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

/* Desktop Header */
.device-desktop .header {
    padding: 20px 30px !important;
    background: linear-gradient(135deg, #262262, #262262) !important;
    color: white !important;
    border-bottom: none !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
    min-height: 80px !important;
}

.device-desktop .header-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    min-height: 40px !important;
}

.device-desktop .logo-main {
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.device-desktop .logo-sub {
    font-size: 10px;
}

.device-desktop .status {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-direction: row !important;
    margin-bottom: 0 !important;
}

.device-desktop .status-indicator {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.device-desktop .status-indicator.online {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

.device-desktop .testing-mode {
    background: rgba(255, 152, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.device-desktop .status-right {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

/* Desktop Chat Header */
.device-desktop .chat-header {
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
}

.device-desktop .chat-header h2 {
    font-size: 22px;
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
}

.device-desktop .chat-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Tablet Optimizations */
.device-tablet .chat-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
}

.device-tablet .input-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 10px 18px;
}

.device-tablet .question-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.device-tablet .question-buttons .quick-btn {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 48px;
}

.device-tablet .chat-container {
    padding-bottom: 90px;
}

.device-tablet .message {
    max-width: 75%;
}

/* Touch Device Optimizations */
.touch-device .quick-btn,
.touch-device .other-btn,
.touch-device .send-btn {
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.touch-device .question-buttons .quick-btn {
    padding: 14px 16px;
}

.touch-device .other-btn {
    padding: 14px 20px;
}

/* No Touch Device Optimizations */
.no-touch .quick-btn:hover,
.no-touch .other-btn:hover,
.no-touch .send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.no-touch .question-buttons .quick-btn:hover {
    background: #262262;
    color: white;
    border-color: #262262;
}

/* Landscape Orientation */
.landscape .chat-messages {
    max-height: 50vh;
}

.landscape .quick-questions {
    margin: 10px 20px;
    padding: 15px 20px;
}

.landscape .question-buttons {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* Portrait Orientation */
.portrait .question-buttons {
    grid-template-columns: repeat(2, 1fr);
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .device-desktop .agent-message::before {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
    
    .device-desktop .send-btn {
        width: 50px;
        height: 50px;
    }
}

/* Large Desktop Screens */
@media (min-width: 1400px) {
    .device-desktop .chat-container {
        max-width: 1400px;
    }
    
    .device-desktop .question-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .device-desktop .message {
        max-width: 50%;
    }
}

/* Ultra-wide Screens */
@media (min-width: 1920px) {
    .device-desktop .chat-container {
        max-width: 1600px;
    }
    
    .device-desktop .question-buttons {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Responsive Breakpoints for Device Detection */
@media (max-width: 480px) {
    .device-mobile .question-buttons {
        grid-template-columns: 1fr;
    }
    
    .device-mobile .question-buttons .quick-btn {
        padding: 16px 20px;
        font-size: 14px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .device-mobile .question-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .device-tablet .question-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Animation Enhancements for Desktop */
.device-desktop .message {
    animation: messageSlideIn 0.3s ease-out;
}

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

.device-desktop .quick-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-desktop .quick-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Focus States for Desktop */
.device-desktop #messageInput:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.device-desktop .send-btn:focus {
    outline: 2px solid #262262;
    outline-offset: 2px;
}

/* Loading States */
.device-desktop .send-btn.loading {
    background: #ccc;
    cursor: not-allowed;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* ============================================================================
   ENHANCED RESPONSIVE DESIGN - MOBILE, TABLET, DESKTOP OPTIMIZATION
   ============================================================================ */

/* Mobile-First Responsive Design */
@media (max-width: 480px) {
    /* Container and Layout */
    .container {
        padding: 0 10px;
        max-width: 100%;
    }
    
    /* Header Optimization - Clean Mobile Layout */
    .header {
        padding: 16px 20px !important;
        flex-direction: column !important;
        gap: 12px !important;
        min-height: auto !important;
        background: linear-gradient(135deg, #262262, #4a4a8a) !important;
        color: white !important;
        position: relative !important;
        z-index: 100 !important;
    }
    
    .header-content {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        justify-content: center !important;
        gap: 12px !important;
        width: 100% !important;
    }
    
    /* Hide status elements on mobile for cleaner look */
    .status {
        display: none !important;
    }
    
    .status-indicator {
        display: none !important;
    }
    
    .status-right {
        display: none !important;
    }
    
    /* Logo optimization */
    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .logo img {
        max-width: 200px !important;
        height: auto !important;
        min-width: 150px !important;
    }
    
    .logo-main {
        font-size: 28px !important;
        font-weight: 700 !important;
        color: white !important;
        margin: 0 !important;
    }
    
    .logo-sub {
        font-size: 10px !important;
        font-weight: 500 !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin-top: 2px !important;
    }
    
    /* Chat Container Mobile - Improved Scrolling */
    .chat-container {
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: calc(100vh - 80px) !important;
        max-height: calc(100vh - 80px) !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .chat-messages {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 16px !important;
        padding-bottom: 100px !important; /* Extra space for input */
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        max-height: calc(100vh - 200px) !important;
        min-height: calc(100vh - 300px) !important;
    }
    
    .chat-input {
        flex-shrink: 0 !important;
        background: white !important;
        border-top: 1px solid #e0e0e0 !important;
        padding: 16px !important;
        position: sticky !important;
        bottom: 0 !important;
        z-index: 10 !important;
        margin: 0 !important;
    }
    
    .chat-header {
        padding: 15px 10px;
        text-align: center;
    }
    
    .chat-header h2 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .chat-header p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    /* Quick Questions Mobile */
    .quick-questions {
        margin-bottom: 20px;
    }
    
    .quick-questions h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .question-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .quick-btn {
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 12px;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .quick-btn i {
        margin-right: 8px;
        font-size: 16px;
    }
    
    /* Chat Messages Mobile - handled by main sticky footer pattern */
    
    .message {
        margin: 8px 0;
        padding: 12px 16px;
        border-radius: 18px;
        max-width: 85%;
        font-size: 14px;
        line-height: 1.4;
    }
    
    .message.user {
        margin-left: auto;
        margin-right: 0;
    }
    
    .message.agent {
        margin-left: 0;
        margin-right: auto;
    }
    
    .message.system {
        margin: 15px auto;
        max-width: 90%;
        text-align: center;
        font-size: 13px;
        padding: 10px 15px;
    }
    
    /* Chat Input Mobile */
    .chat-input {
        padding: 10px;
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .input-container {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    
    #messageInput {
        flex: 1;
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 25px;
        border: 2px solid #e1e5e9;
        background: white;
    }
    
    .send-btn {
        padding: 12px;
        border-radius: 50%;
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .input-hint {
        text-align: center;
        margin-top: 8px;
        font-size: 12px;
        color: #666;
    }
    
    /* Onboarding Mobile */
    .onboarding-modal {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 20px;
    }
    
    .onboarding-content {
        padding: 15px 12px;
    }
    
    .onboarding-step h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .onboarding-step p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .onboarding-step input {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
        margin-bottom: 15px;
    }
    
    .onboarding-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .onboarding-buttons button {
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 12px;
        min-height: 50px;
    }
    
    /* Footer Mobile */
    footer {
        padding: 15px 10px;
        text-align: center;
        font-size: 12px;
    }
}

/* Tablet Optimization */
@media (min-width: 481px) and (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 20px;
        max-width: 100%;
    }
    
    /* Header Tablet */
    .header {
        padding: 20px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .logo-main {
        font-size: 28px;
    }
    
    .logo-sub {
        font-size: 9px;
    }
    
    .status {
        font-size: 1rem;
    }
    
    /* Chat Container Tablet */
    .chat-container {
        padding: 20px;
        margin: 20px 0;
        border-radius: 20px;
        max-width: 100%;
    }
    
    .chat-header h2 {
        font-size: 1.8rem;
    }
    
    .chat-header p {
        font-size: 1.1rem;
    }
    
    /* Quick Questions Tablet */
    .question-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .quick-btn {
        padding: 16px 20px;
        font-size: 15px;
        min-height: 55px;
    }
    
    /* Chat Messages Tablet - handled by main sticky footer pattern */
    
    .message {
        margin: 10px 0;
        padding: 14px 18px;
        font-size: 15px;
        max-width: 70%;
    }
    
    .message.user {
        margin-left: auto;
        margin-right: 0;
    }
    
    .message.agent {
        margin-left: 0;
        margin-right: auto;
    }
    
    /* Chat Input Tablet */
    .chat-input {
        padding: 15px;
    }
    
    #messageInput {
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 30px;
    }
    
    .send-btn {
        padding: 14px;
        min-width: 50px;
        min-height: 50px;
    }
    
    /* Onboarding Tablet */
    .onboarding-modal {
        margin: 20px;
        max-width: 500px;
        border-radius: 25px;
    }
    
    .onboarding-content {
        padding: 30px 25px;
    }
    
    .onboarding-step h3 {
        font-size: 1.5rem;
    }
    
    .onboarding-step p {
        font-size: 1.1rem;
    }
    
    .onboarding-step input {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 15px;
    }
    
    .onboarding-buttons {
        flex-direction: row;
        gap: 15px;
    }
    
    .onboarding-buttons button {
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 15px;
        min-height: 55px;
        flex: 1;
    }
}

/* Desktop Optimization */
@media (min-width: 769px) {
    /* Container */
    .container {
        max-width: 1200px;
        padding: 0 30px;
    }
    
    /* Header Desktop */
    .header {
        padding: 25px 30px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo-main {
        font-size: 30px;
    }
    
    .logo-sub {
        font-size: 10px;
    }
    
    .status {
        font-size: 1.1rem;
    }
    
    /* Chat Container Desktop */
    .chat-container {
        padding: 30px;
        margin: 30px 0;
        border-radius: 25px;
        max-width: 100%;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    }
    
    .chat-header h2 {
        font-size: 2rem;
    }
    
    .chat-header p {
        font-size: 1.2rem;
    }
    
    /* Quick Questions Desktop */
    .question-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .quick-btn {
        padding: 18px 24px;
        font-size: 16px;
        min-height: 60px;
        transition: all 0.3s ease;
    }
    
    .quick-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    }
    
    /* Chat Messages Desktop - handled by main sticky footer pattern */
    
    .message {
        margin: 12px 0;
        padding: 16px 20px;
        font-size: 16px;
        max-width: 60%;
        transition: all 0.3s ease;
    }
    
    .message.user {
        margin-left: auto;
        margin-right: 0;
    }
    
    .message.agent {
        margin-left: 0;
        margin-right: auto;
    }
    
    .message:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* Chat Input Desktop */
    .chat-input {
        padding: 20px;
    }
    
    #messageInput {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 35px;
        transition: all 0.3s ease;
    }
    
    #messageInput:focus {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
        border-color: #262262;
    }
    
    .send-btn {
        padding: 16px;
        min-width: 55px;
        min-height: 55px;
        transition: all 0.3s ease;
    }
    
    .send-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    
    /* Onboarding Desktop */
    .onboarding-modal {
        margin: 40px;
        max-width: 600px;
        border-radius: 30px;
    }
    
    .onboarding-content {
        padding: 40px 35px;
    }
    
    .onboarding-step h3 {
        font-size: 1.8rem;
    }
    
    .onboarding-step p {
        font-size: 1.2rem;
    }
    
    .onboarding-step input {
        padding: 18px 24px;
        font-size: 16px;
        border-radius: 20px;
        transition: all 0.3s ease;
    }
    
    .onboarding-step input:focus {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
        border-color: #262262;
    }
    
    .onboarding-buttons {
        flex-direction: row;
        gap: 20px;
    }
    
    .onboarding-buttons button {
        padding: 18px 28px;
        font-size: 16px;
        border-radius: 20px;
        min-height: 60px;
        flex: 1;
        transition: all 0.3s ease;
    }
    
    .onboarding-buttons button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    }
}

/* Large Desktop Optimization */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 0 40px;
    }
    
    .chat-container {
        padding: 40px;
        margin: 40px 0;
    }
    
    .question-buttons {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .message {
        max-width: 50%;
    }
}

/* Ultra-wide Desktop */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
        padding: 0 50px;
    }
    
    .chat-container {
        padding: 50px;
        margin: 50px 0;
    }
    
    .question-buttons {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .message {
        max-width: 45%;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .quick-btn {
        min-height: 50px;
        padding: 16px 20px;
    }
    
    .send-btn {
        min-width: 50px;
        min-height: 50px;
    }
    
    .onboarding-buttons button {
        min-height: 50px;
        padding: 16px 20px;
    }
    
    /* Remove hover effects on touch devices */
    .quick-btn:hover,
    .message:hover,
    .send-btn:hover,
    .onboarding-buttons button:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Add active states for touch feedback */
    .quick-btn:active,
    .send-btn:active,
    .onboarding-buttons button:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo i,
    .quick-btn i,
    .send-btn i {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .quick-btn,
    .message,
    .send-btn,
    .onboarding-buttons button {
        transition: none;
        animation: none;
    }
    
    .quick-btn:hover,
    .message:hover,
    .send-btn:hover,
    .onboarding-buttons button:hover {
        transform: none;
    }
}

/* Dark Mode Support - Removed per user request */
