* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: clamp(20px, 4vw, 28px);
    margin-bottom: 8px;
}

.header p {
    opacity: 0.9;
    font-size: clamp(14px, 2vw, 16px);
}

.chat-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
    min-height: 0;
}

.message {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

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

.bot-message {
    display: flex;
    align-items: flex-start;
}

.bot-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.bot-avatar::before {
    content: "🤖";
    font-size: 20px;
}

.user-message {
    display: flex;
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: #f1f3f5;
    color: #2d3748;
}

.user-message .message-content {
    background: #667eea;
    color: white;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-action {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #2d3748;
    font-family: inherit;
}

.quick-action:hover {
    background: #f7fafc;
    border-color: #667eea;
    transform: translateY(-1px);
}

.quick-action:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.vendor-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    transition: all 0.2s;
}

.vendor-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.vendor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.vendor-name {
    font-weight: 600;
    font-size: 16px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-supported {
    background: #d4f8e8;
    color: #065f46;
}

.status-approved {
    background: #dbeafe;
    color: #1e40af;
}

.status-not-approved {
    background: #fee2e2;
    color: #991b1b;
}

.vendor-details {
    font-size: 14px;
    color: #4b5563;
    margin-top: 8px;
}

.vendor-details p {
    margin: 4px 0;
}

.vendor-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.feature-tag {
    padding: 4px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 12px;
    color: #4b5563;
}

.input-container {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

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

#userInput {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.2s;
    font-family: inherit;
}

#userInput:focus {
    outline: none;
    border-color: #667eea;
}

#sendButton {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

#sendButton:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#sendButton:focus {
    outline: 2px solid #764ba2;
    outline-offset: 2px;
}

#sendButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.typing-indicator {
    display: none;
    align-items: center;
    padding: 10px 20px;
}

.typing-indicator.active {
    display: flex;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Download button styling */
.download-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .container {
        padding: 10px;
        height: 100vh;
    }

    .header {
        padding: 15px 20px;
        margin-bottom: 10px;
    }

    .messages {
        padding: 15px;
    }

    .message-content {
        max-width: 85%;
        font-size: 15px;
    }

    .input-wrapper {
        flex-wrap: nowrap;
        gap: 8px;
    }

    #userInput {
        padding: 10px 16px;
        font-size: 16px;
    }

    #sendButton {
        padding: 10px 20px;
        font-size: 15px;
    }

    .vendor-card {
        padding: 12px;
    }

    .quick-action {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-height: 600px) {
    .header {
        padding: 15px 20px;
    }

    .header h1 {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .header p {
        font-size: 14px;
    }
}

/* Print styles */
@media print {
    .input-container, .quick-actions {
        display: none;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a202c;
        color: #e2e8f0;
    }

    .chat-container {
        background: #2d3748;
    }

    .bot-message .message-content {
        background: #374151;
        color: #f3f4f6;
    }

    .vendor-card {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .vendor-details {
        color: #d1d5db;
    }

    .feature-tag {
        background: #4b5563;
        color: #e5e7eb;
    }

    .input-container {
        background: #374151;
        border-top-color: #4b5563;
    }

    #userInput {
        background: #2d3748;
        color: #f3f4f6;
        border-color: #4b5563;
    }

    .quick-action {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .quick-action:hover {
        background: #4b5563;
    }

    .error-message {
        background: #7f1d1d;
        color: #fecaca;
    }
}