.standalone-chat-container {
    max-width: 800px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.standalone-chat-container[data-theme="dark"] {
    background: #1a1a1a;
    border-color: #333;
    color: #fff;
}

.standalone-chat-container[data-theme="blue"] {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

.chat-header {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.standalone-chat-container[data-theme="dark"] .chat-header {
    background: linear-gradient(135deg, #2d3748, #1a202c);
}

.standalone-chat-container[data-theme="blue"] .chat-header {
    background: linear-gradient(135deg, #0073aa, #004466);
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc3545;
}

.status-dot.online {
    background: #28a745;
    animation: pulse 2s infinite;
}

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

.chat-messages {
    padding: 20px;
    height: 500px;
    overflow-y: auto;
    background: #f8f9fa;
}

.standalone-chat-container[data-theme="dark"] .chat-messages {
    background: #2d3748;
}

.standalone-chat-container[data-theme="blue"] .chat-messages {
    background: #f0f8ff;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    order: 2;
    margin-left: 12px;
    margin-right: 0;
}

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

.bot-message .message-content {
    background: white;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    border-bottom-right-radius: 4px;
}

.standalone-chat-container[data-theme="dark"] .bot-message .message-content {
    background: #4a5568;
    border-color: #2d3748;
}

.standalone-chat-container[data-theme="blue"] .bot-message .message-content {
    background: white;
    border-color: #0073aa;
}

.message-content p {
    margin: 0 0 8px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

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

.quick-action {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
}

.quick-action:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.standalone-chat-container[data-theme="dark"] .quick-action {
    background: #4a5568;
    border-color: #2d3748;
    color: #e2e8f0;
}

.standalone-chat-container[data-theme="dark"] .quick-action:hover {
    background: #2d3748;
}

.standalone-chat-container[data-theme="blue"] .quick-action {
    background: #e3f2fd;
    border-color: #0073aa;
    color: #0073aa;
}

.standalone-chat-container[data-theme="blue"] .quick-action:hover {
    background: #bbdefb;
}

.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.standalone-chat-container[data-theme="dark"] .chat-input-container {
    background: #1a202c;
    border-color: #2d3748;
}

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

#chat-input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.standalone-chat-container[data-theme="dark"] #chat-input {
    background: #2d3748;
    border-color: #4a5568;
    color: #fff;
}

#chat-input:focus {
    outline: none;
    border-color: #0073aa;
}

.standalone-chat-container[data-theme="blue"] #chat-input:focus {
    border-color: #0073aa;
}

.send-button {
    background: linear-gradient(135deg, #0073aa, #005a87);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

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

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    margin-top: 8px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typing 1.4s infinite ease-in-out;
}

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

.typing-indicator 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;
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.standalone-chat-container[data-theme="dark"] .chat-messages::-webkit-scrollbar-thumb {
    background: #4a5568;
}

.standalone-chat-container[data-theme="dark"] .chat-messages::-webkit-scrollbar-thumb:hover {
    background: #2d3748;
}

/* Responsive design */
@media (max-width: 768px) {
    .standalone-chat-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .chat-header h3 {
        font-size: 16px;
    }
    
    .chat-messages {
        padding: 15px;
        height: 400px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-input-container {
        padding: 15px;
    }
    
    .quick-actions {
        gap: 6px;
    }
    
    .quick-action {
        font-size: 11px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .message-content {
        max-width: 90%;
    }
    
    .chat-status {
        flex-direction: column;
        gap: 4px;
        font-size: 12px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-action {
        text-align: center;
    }
}