/**
 * Multi-Chat QR Code - Estilos Frontend - multichat.css
 * Versão: 1.0.0
 */

:root {
    --multichat-primary: #25D366;
    --multichat-primary-hover: #128C7E;
    --multichat-secondary: #34495e;
    --multichat-success: #27ae60;
    --multichat-warning: #f39c12;
    --multichat-error: #e74c3c;
    --multichat-dark: #2c3e50;
    --multichat-light: #ecf0f1;
    --multichat-gray-100: #f8f9fa;
    --multichat-gray-200: #e9ecef;
    --multichat-gray-300: #dee2e6;
    --multichat-gray-400: #ced4da;
    --multichat-gray-500: #6c757d;
    --multichat-gray-600: #495057;
    --multichat-gray-700: #343a40;
    --multichat-gray-800: #212529;
    --multichat-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --multichat-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
    --multichat-border-radius: 12px;
    --multichat-border-radius-sm: 8px;
    --multichat-animation-duration: 0.3s;
    --multichat-z-index: 999999;
}


#multichat-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: var(--multichat-gray-700);
    z-index: var(--multichat-z-index);
    position: relative;
    box-sizing: border-box;
    margin: 0;
    padding: 2px;
}

/* Botão flutuante */
.multichat-toggle {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--multichat-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--multichat-shadow);
    transition: all var(--multichat-animation-duration) ease;
    z-index: var(--multichat-z-index);
    outline: none;
}

.multichat-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--multichat-shadow-lg);
    background: var(--multichat-primary-hover);
}

.multichat-toggle:active {
    transform: scale(0.95);
}

/* Posicionamento do botão */
.multichat-bottom-right {
    bottom: 20px;
    right: 20px;
}

.multichat-bottom-left {
    bottom: 20px;
    left: 20px;
}

.multichat-middle-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.multichat-middle-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.multichat-top-right {
    top: 20px;
    right: 20px;
}

.multichat-top-left {
    top: 20px;
    left: 20px;
}

.multichat-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.multichat-center:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.multichat-middle-right:hover,
.multichat-middle-left:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Badge de notificação */
.multichat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--multichat-error);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Janela do chat */
.multichat-window {
    position: fixed;
    width: 380px;
    max-height: 600px;
    background: white;
    border-radius: var(--multichat-border-radius);
    box-shadow: var(--multichat-shadow-lg);
    z-index: var(--multichat-z-index);
    overflow: hidden;
    display: none; /* ← ADICIONE ESTA LINHA */
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all var(--multichat-animation-duration) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.multichat-window.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Posicionamento da janela */
.multichat-window-bottom-right {
    bottom: 70px;
    right: 20px;
    top: 5px;
}

.multichat-window-bottom-left {
    bottom: 90px;
    left: 20px;
}

.multichat-window-middle-right {
    top: 50%;
    right: 90px;
    transform: translateY(-50%) scale(0.8);
}

.multichat-window-middle-left {
    top: 50%;
    left: 90px;
    transform: translateY(-50%) scale(0.8);
}

.multichat-window-top-right {
    top: 90px;
    right: 20px;
}

.multichat-window-top-left {
    top: 90px;
    left: 20px;
}

.multichat-window-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
}

.multichat-window-middle-right.show {
    transform: translateY(-50%) scale(1);
}

.multichat-window-middle-left.show {
    transform: translateY(-50%) scale(1);
}

.multichat-window-center.show {
    transform: translate(-50%, -50%) scale(1);
}

/* Header do chat */
.multichat-header {
    background: var(--multichat-primary);
    color: white;
    padding: 6px 3px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 5px;
}

.multichat-header-info {
    flex: 1;
}

.multichat-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.multichat-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.multichat-controls {
    display: flex;
    gap: 8px;
}

.multichat-control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: background var(--multichat-animation-duration);
}

.multichat-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Seção de conexão */
.multichat-connection {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.multichat-qr-header h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--multichat-dark);
}

.multichat-qr-header p {
    font-size: 14px;
    color: var(--multichat-gray-600);
    margin-bottom: 20px;
}

.multichat-qrcode-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.multichat-qrcode-container img {
    max-width: 200px;
    height: auto;
    border-radius: var(--multichat-border-radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.multichat-connection-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

/* Seção do chat */
.multichat-chat {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.multichat-messages {
    flex: 1;
    padding: 5px;
    overflow-y: auto;
    background: var(--multichat-gray-100);
    min-height: 300px;
    border-radius: 10px;
    border: 3px solid #eaffeb;
    margin: 2px;
}

.multichat-messages::-webkit-scrollbar {
    width: 4px;
}

.multichat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.multichat-messages::-webkit-scrollbar-thumb {
    background: var(--multichat-gray-400);
    border-radius: 2px;
}

/* Mensagens */
.multichat-message {
    margin-bottom: 16px;
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.multichat-message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
}

.multichat-message-time {
    font-size: 11px;
    color: var(--multichat-gray-500);
    margin-top: 4px;
    text-align: right;
}

/* Mensagens do cliente */
.message-client {
    margin-left: auto;
    text-align: right;
}

.message-client .multichat-message-content {
    background: var(--multichat-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-client .multichat-message-time {
    text-align: right;
    color: var(--multichat-gray-500);
}

/* Mensagens do sistema/bot */
.message-bot,
.message-system {
    margin-right: auto;
}

.message-bot .multichat-message-content,
.message-system .multichat-message-content {
    background: white;
    color: var(--multichat-gray-700);
    border: 1px solid var(--multichat-gray-300);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Mensagens do atendente */
.message-attendant {
    margin-right: auto;
}

.message-attendant .multichat-message-content {
    background: var(--multichat-success);
    color: white;
    border-bottom-left-radius: 4px;
}

/* Indicador de digitação */
.multichat-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--multichat-gray-600);
    padding: 8px 16px;
    background: white;
    border-radius: 18px;
    margin: 8px 0;
    max-width: fit-content;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.multichat-typing-dots {
    display: flex;
    gap: 2px;
}

.multichat-typing-dots span {
    width: 4px;
    height: 4px;
    background: var(--multichat-gray-500);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.multichat-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.multichat-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Respostas rápidas */
.multichat-quick-replies {
    padding: 12px 16px;
    background: var(--multichat-gray-50);
    border-top: 1px solid var(--multichat-gray-200);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-height: 80px;
    overflow-y: auto;
}

.multichat-quick-reply {
    background: white;
    border: 1px solid var(--multichat-gray-300);
    color: var(--multichat-gray-700);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--multichat-animation-duration);
    white-space: nowrap;
}

.multichat-quick-reply:hover {
    background: var(--multichat-primary);
    color: white;
    border-color: var(--multichat-primary);
    transform: translateY(-1px);
}

/* Área de input */
.multichat-input-area {
    background: white;
    border-top: 1px solid var(--multichat-gray-200);
    padding: 16px;
}

.multichat-input-container {
    display: flex;
    gap: 12px;
    align-items: end;
}

#multichat-input {
    flex: 1;
    border: 1px solid var(--multichat-gray-300);
    border-radius: 10px;
    padding: 5px 7px;
    font-size: 14px !important;
    resize: none;
    outline: none;
    min-height: 80px;
    max-height: 120px;
    font-family: inherit !important;
    transition: border-color var(--multichat-animation-duration);
}

#multichat-input:focus {
    border-color: var(--multichat-primary);
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.multichat-send-btn {
    background: var(--multichat-primary);
    color: white;
    border: none;
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    transition: all var(--multichat-animation-duration);
    flex-shrink: 0;
    margin: auto;
}

.multichat-send-btn:hover {
    background: var(--multichat-primary-hover);
    transform: scale(1.05);
}

.multichat-send-btn:active {
    transform: scale(0.95);
}

.multichat-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.multichat-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.multichat-character-count {
    font-size: 11px;
    color: var(--multichat-gray-500);
}

/* Status do atendente */
.multichat-status {
    background: var(--multichat-gray-50);
    border-top: 1px solid var(--multichat-gray-200);
    padding: 8px 16px;
}

.multichat-status-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multichat-attendant-name {
    font-size: 12px;
    color: var(--multichat-gray-600);
    font-weight: 500;
}

/* Botões */
.multichat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 7px !important;
    border-radius: 8px;
    font-size: 14px !important;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--multichat-animation-duration);
    line-height: 1.4;
    margin-bottom: 5px;
}

.multichat-btn-primary {
    background: var(--multichat-primary);
    color: white;
}

.multichat-btn-primary:hover {
    background: var(--multichat-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.multichat-btn-secondary {
    background: var(--multichat-gray-600);
    color: white;
}

.multichat-btn-secondary:hover {
    background: var(--multichat-gray-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.multichat-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Animações de entrada */
.multichat-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.multichat-slide-in-up {
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner */
.multichat-loading {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mensagem de erro */
.multichat-error-message {
    background: var(--multichat-error);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 8px 16px;
    font-size: 12px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

/* Avatares do plugin login-registration-personal */
.multichat-user-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsividade */
@media (max-width: 768px) {
    .multichat-window {
        width: calc(100vw - 40px);
        max-width: 380px;
        max-height: 70vh;
    }

    .multichat-window-bottom-right,
    .multichat-window-bottom-left {
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: calc(100vw - 40px);
    }

    .multichat-window-middle-right,
    .multichat-window-middle-left,
    .multichat-window-center {
        top: 15vh;
        left: 20px;
        right: 20px;
        width: calc(100vw - 40px);
        transform: none;
    }

    .multichat-window-middle-right.show,
    .multichat-window-middle-left.show,
    .multichat-window-center.show {
        transform: none;
    }

    .multichat-toggle {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .multichat-bottom-right,
    .multichat-top-right {
        right: 15px;
    }

    .multichat-bottom-left,
    .multichat-top-left {
        left: 15px;
    }

    .multichat-bottom-right,
    .multichat-bottom-left {
        bottom: 15px;
    }

    .multichat-top-right,
    .multichat-top-left {
        top: 15px;
    }
}

@media (max-width: 480px) {
    .multichat-window {
        width: calc(100vw - 20px);
        max-height: 80vh;
    }

    .multichat-window-bottom-right,
    .multichat-window-bottom-left {
        left: 10px;
        right: 10px;
        width: calc(100vw - 20px);
    }

    .multichat-chat {
        height: auto;
        max-height: calc(80vh - 120px);
    }

    .multichat-messages {
        min-height: 200px;
        max-height: 300px;
    }

    .multichat-header {
        padding: 12px 16px;
    }

    .multichat-title {
        font-size: 14px;
    }

    .multichat-subtitle {
        font-size: 11px;
    }
}

/* Modo escuro */
@media (prefers-color-scheme: dark) {
    .multichat-window {
        background: #1a1a1a;
        color: #ffffff;
    }

    .multichat-messages {
        background: #2a2a2a;
    }

    .message-bot .multichat-message-content,
    .message-system .multichat-message-content {
        background: #3a3a3a;
        color: #ffffff;
        border-color: #555555;
    }

    .multichat-quick-reply {
        background: #3a3a3a;
        color: #ffffff;
        border-color: #555555;
    }

    #multichat-input {
        background: #3a3a3a;
        color: #ffffff;
        border-color: #555555;
    }

    .multichat-status,
    .multichat-quick-replies {
        background: #2a2a2a;
        border-color: #555555;
    }

    .multichat-input-area {
        background: #1a1a1a;
        border-color: #555555;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estados de foco para acessibilidade */
.multichat-toggle:focus,
.multichat-control-btn:focus,
.multichat-send-btn:focus,
.multichat-btn:focus,
#multichat-input:focus {
    outline: 2px solid var(--multichat-primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .multichat-window {
        border: 2px solid;
    }
    
    .multichat-btn {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {
    #multichat-widget {
        display: none !important;
    }
}

/* Emoji Picker Styles */
.multichat-emoji-picker {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    z-index: 1000;
    overflow: hidden;
}
.emoji-picker-tabs {
    display: flex;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    background: #f5f5f5;
}
.emoji-tab {
    padding: 6px 12px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    transition: all 0.2s;
}
.emoji-tab:hover {
    background: var(--multichat-primary);
    color: white;
}
.emoji-tab.active {
    background: var(--multichat-primary);
    color: white;
    font-weight: 600;
}
.emoji-picker-content {
    padding: 12px;
    max-height: 320px;
    overflow-y: auto;
}
.emoji-category {
    display: none;
}
.emoji-category.active {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.emoji-item {
    padding: 8px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}
.emoji-item:hover {
    background: #f0f0f0;
    transform: scale(1.2);
}
.emoji-item:active {
    transform: scale(1.1);
}
/* Botão de emoji */
.multichat-emoji-btn {
    background: none;
    border: none;
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}
.multichat-emoji-btn:hover {
    background: #f0f0f0;
}

/* Chatbot Styles */
.chatbot-menu {
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    margin: 8px 0;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.menu-option-btn {
    padding: 14px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    color: #1f2937;
}

.menu-option-btn:hover:not(:disabled) {
    background: var(--multichat-primary);
    border-color: var(--multichat-primary);
    color: white;
    transform: translateX(4px);
}

.menu-option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Product Cards */
.product-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 12px 0;
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.product-card h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.product-card .price {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626; /* Exemplo: vermelho para preço */
}

/* Order Check Styles */
.order-check-menu {
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}
.order-details {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}
.order-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
}
.order-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}
.order-info {
    margin: 16px 0;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}
.info-row strong {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}
.info-row span {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}
.order-total {
    font-size: 18px !important;
    color: #059669 !important;
}
.order-address {
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    margin: 16px 0;
}
.order-address h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #374151;
}
.order-address p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}
.order-tracking {
    background: #dbeafe;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    text-align: center;
}
.tracking-code {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    margin-top: 8px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}
.order-items {
    margin: 16px 0;
}
.order-items h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #374151;
}
.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
}
.order-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}
.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.item-info strong {
    font-size: 14px;
    color: #1f2937;
}
.item-info span {
    font-size: 12px;
    color: #6b7280;
}
.item-price {
    font-weight: 600 !important;
    color: #059669 !important;
}
.order-actions {
    margin: 16px 0;
    text-align: center;
}
.order-actions .multichat-btn {
    width: 100%;
}
/* Responsividade */
@media (max-width: 480px) {
.order-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.info-row span {
    text-align: left;
 }
}

/* Seleção de Canal */
.channel-selection {
    padding: 10px;
    text-align: center;
}

.selection-header h3 {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.selection-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
}

.channel-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.channel-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.channel-option-btn:hover:not(:disabled) {
    border-color: var(--multichat-primary);
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.channel-option-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.channel-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.channel-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.channel-desc {
    font-size: 13px;
    color: #6b7280;
}

/* WhatsApp QR Section */
.whatsapp-qr-section {
    padding: 20px;
    text-align: center;
}

.whatsapp-qr-section h4 {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.whatsapp-qr-section p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px 0;
}

.qr-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.qr-container img {
    max-width: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Estilos para avatares */
.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 8px;
}

.client-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bot-avatar {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    font-size: 18px;
}

.attendant-avatar {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

/* Layout de mensagens com avatar */
.multichat-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    animation: slideUp 0.3s ease;
}

.message-client {
    flex-direction: row-reverse;
}

.message-client .message-avatar {
    margin-right: 0;
    margin-left: 8px;
}

.message-bubble {
    max-width: 70%;
    background: white;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.message-client .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-content {
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
}

.message-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
}

/* Canal de seleção melhorado */
.channel-selection {
    padding: 16px;
}

.selection-header h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #333;
}

.selection-header p {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
}

.channel-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.channel-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.channel-option-btn:hover {
    border-color: #25D366;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.channel-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.channel-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.channel-desc {
    font-size: 13px;
    color: #666;
}

/* Menu de opções */
.chatbot-menu {
    padding: 12px;
}

.menu-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.menu-option-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    text-align: left;
}

.menu-option-btn:hover {
    background: #f8f9fa;
    border-color: #25D366;
    transform: translateX(4px);
}

.menu-option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Animações */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Produtos e categorias */
.product-list {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.product-card h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #333;
}

.product-card .price {
    color: #25D366;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.product-link {
    display: inline-block;
    padding: 8px 16px;
    background: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s;
}

.product-link:hover {
    background: #128C7E;
    transform: scale(1.02);
}

/* Detalhes do pedido */
.order-details {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.order-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.order-info {
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-row strong {
    color: #666;
    font-size: 13px;
}

.info-row span {
    color: #333;
    font-size: 13px;
    text-align: right;
}

.order-total {
    color: #25D366 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.order-address {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.order-address h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #333;
}

.order-address p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.order-items {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.order-items h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #333;
}

.order-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-info strong {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
}

.item-info span {
    font-size: 12px;
    color: #666;
}

.item-price {
    color: #25D366 !important;
    font-weight: 600 !important;
}

.tracking-code {
    display: inline-block;
    background: #fff3cd;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    color: #856404;
    margin-left: 8px;
}

.order-actions {
    margin-top: 16px;
}

/* WhatsApp QR */
.whatsapp-qr-section {
    padding: 16px;
    text-align: center;
}

.whatsapp-qr-section h4 {
    margin: 0 0 12px;
    color: #333;
}

#multichat-qrcode-inline {
    margin: 16px 0;
    display: flex;
    justify-content: center;
}

#multichat-qrcode-inline img {
    border: 4px solid #25D366;
    border-radius: 8px;
    padding: 8px;
    background: white;
}

/* Emoji Picker */
.multichat-emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 280px;
    max-height: 250px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
}

.emoji-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px;
    gap: 4px;
}

.emoji-tab {
    padding: 6px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
    transition: background 0.2s;
}

.emoji-tab:hover,
.emoji-tab.active {
    background: #f0f0f0;
}

.emoji-content {
    padding: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.emoji-category {
    display: none;
}

.emoji-category.active {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.emoji-item {
    padding: 8px;
    font-size: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.emoji-item:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

/* Responsividade */
@media (max-width: 480px) {
    .multichat-window {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        border-radius: 0 !important;
        bottom: 0 !important;
        right: 0 !important;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .product-card img {
        height: 150px;
    }
    
    .channel-options {
        gap: 10px;
    }
    
    .menu-options {
        gap: 8px;
    }
}

/* ========== AVATARES ========== */
/* Estilos gerais para avatares de mensagem */
.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;  /* Fonte moderna para iniciais */
}

/* Avatar do atendente (Gravatar ou fallback com iniciais) */
.attendant-avatar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);  /* Sombra sutil */
    transition: transform 0.2s ease;  /* Animação no hover */
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: 2px solid #fff;
}

.attendant-avatar:hover {
    transform: scale(1.05);  /* Zoom leve no hover */
}

/* Avatar do cliente */
.client-avatar {
    font-size: 20px;  /* Tamanho do emoji */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid #fff;
}

/* Avatar do bot (animado - integra com SVG anterior) */
.bot-avatar {
    position: relative;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);  /* Gradiente roxo/azul */
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    animation: botFloat 3s ease-in-out infinite;
    overflow: hidden;
    color: white;
    border: 2px solid #fff;
}

.bot-avatar .bot-icon {
    width: 24px;
    height: 24px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Animações para bot (piscar e flutuar) */
@keyframes botFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

.bot-eye-left, .bot-eye-right {
    animation: blink 4s infinite;
}

@keyframes blink {
    0%, 90% { transform: scaleY(1); opacity: 1; }
    95% { transform: scaleY(0.1); opacity: 0.3; }
    100% { transform: scaleY(1); opacity: 1; }
}

/* Responsivo */
@media (max-width: 480px) {
    .message-avatar {
        width: 28px;
        height: 28px;
    }
    .attendant-avatar img {  /* Para Gravatars em mobile */
        width: 28px !important;
        height: 28px !important;
    }
}

.multichat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Mensagens do cliente (direita) */
.message-client {
    flex-direction: row-reverse;
}

.message-client .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
}

/* Mensagens do bot/atendente (esquerda) */
.message-bot .message-bubble,
.message-attendant .message-bubble,
.message-system .message-bubble {
    background: #f3f4f6;
    color: #1f2937;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.message-content {
    line-height: 1.5;
    font-size: 14px;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 11px;
    opacity: 0.7;
}

.message-time {
    font-size: 11px;
}

/* ========== EMOJIS ========== */
.message-content img.emoji {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin: 0 2px;
}

/* Emojis maiores quando sozinhos */
.message-content img.emoji {
    width: 24px; /* Tamanho padrão */
    height: 24px; /* Tamanho padrão */
}

/* Classe para emojis que são o único filho */
.message-content .emoji-alone {
    width: 32px; /* Tamanho maior para emojis sozinhos */
    height: 32px; /* Tamanho maior para emojis sozinhos */
}

/* Picker de Emojis */
.multichat-emoji-picker {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-height: 400px;
    overflow: hidden;
    z-index: 1000;
    margin-bottom: 10px;
}

.emoji-picker-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    overflow-x: auto;
}

.emoji-tab {
    padding: 10px 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.2s;
}

.emoji-tab:hover {
    background: #e5e7eb;
}

.emoji-tab.active {
    background: white;
    border-bottom: 2px solid #667eea;
    font-weight: 600;
}

.emoji-picker-content {
    padding: 10px;
    max-height: 350px;
    overflow-y: auto;
}

.emoji-category {
    display: none;
}

.emoji-category.active {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.emoji-item {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item:hover {
    background: #f3f4f6;
    transform: scale(1.2);
}

.emoji-item:active {
    transform: scale(1);
}

/* Botão de Emoji */
.multichat-emoji-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.multichat-emoji-btn:hover {
    background: #f3f4f6;
}

/* ========== GRAVATAR STYLES ========== */
.gravatar-avatar {
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.gravatar-avatar img {
    border-radius: 50%;
}

/* ========== TOOLTIPS ========== */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 5px;
}

.message-avatar:hover .tooltip {
    opacity: 1;
}

/* ========== LOADING STATES ========== */
.message-loading {
    display: flex;
    gap: 5px;
    padding: 10px;
}

.message-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: bounce 1.4s infinite ease-in-out;
}

.message-loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.message-loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    .message-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .message-bubble {
        max-width: 85%;
        padding: 8px 12px;
    }
    
    .message-content {
        font-size: 13px;
    }
    
    .multichat-emoji-picker {
        width: 280px;
    }
    
    .emoji-category.active {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ========== ANIMAÇÕES ========== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.multichat-message {
    animation: slideInUp 0.3s ease-out;
}

/* ========== ACESSIBILIDADE ========== */
.message-avatar:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.emoji-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 1px;
}

/* ========== DARK MODE (Opcional) ========== */
@media (prefers-color-scheme: dark) {
    .message-bot .message-bubble,
    .message-attendant .message-bubble,
    .message-system .message-bubble {
        background: #374151;
        color: #f9fafb;
    }
    
    .multichat-emoji-picker {
        background: #1f2937;
        border-color: #374151;
    }
    
    .emoji-picker-tabs {
        background: #111827;
        border-color: #374151;
    }
    
    .emoji-tab:hover {
        background: #374151;
    }
    
    .emoji-tab.active {
        background: #1f2937;
    }
    
    .emoji-item:hover {
        background: #374151;
    }
}

/* Atendente entrou na conversa */
.attendant-joined {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    margin: 12px 0;
}

.attendant-joined .attendant-avatar {
    border-radius: 50%;
    border: 3px solid #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.attendant-joined .attendant-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attendant-joined .attendant-info strong {
    font-size: 16px;
    color: #1e40af;
}

.attendant-joined .status-online {
    font-size: 13px;
    color: #10b981;
    font-weight: 600;
}

.attendant-joined .status-online::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}