/* Chat de suporte online — mesmo padrão Saas_NFce (HostGator) */
#widget-suporte-flutuante {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 56px;
    height: 56px;
}

#widget-suporte-flutuante .suporte-avatar {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #d8e0e4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

#widget-suporte-flutuante .suporte-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#widget-suporte-flutuante .suporte-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#widget-suporte-flutuante .suporte-avatar.ativo {
    border-color: #198754;
    background: #fff;
}

#widget-suporte-flutuante .suporte-avatar.ativo::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #198754;
    border: 2px solid #fff;
}

#widget-suporte-flutuante .suporte-avatar.inativo {
    border-color: #adb5bd;
    background: #e9ecef;
    cursor: default;
    box-shadow: none;
}

#widget-suporte-flutuante .suporte-avatar.inativo img {
    filter: grayscale(0.85);
    opacity: 0.72;
}

#chat-suporte-painel {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 380px;
    max-width: 100vw;
    height: 480px;
    max-height: 70vh;
    background: #fff;
    border: 1px solid #d8e0e4;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    flex-direction: column;
    font-size: 0.95rem;
}

#chat-suporte-painel.aberto {
    display: flex;
}

#chat-suporte-painel .chat-header {
    padding: 12px 16px;
    background: #198754;
    color: #fff;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#chat-suporte-painel .chat-header h6 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#chat-suporte-painel .chat-header .chat-suporte-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
}

#chat-suporte-painel .chat-header .btn-close-chat {
    background: transparent;
    border: none;
    color: #fff;
    opacity: 0.9;
    padding: 4px;
    cursor: pointer;
    font-size: 1.1rem;
}

#chat-suporte-painel .chat-visitante-nome {
    padding: 10px 12px;
    border-bottom: 1px solid #e8ecef;
    flex-shrink: 0;
    background: #f8fafb;
}

#chat-suporte-painel .chat-visitante-nome label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    color: #5a6a72;
}

#chat-suporte-painel .chat-visitante-nome input {
    width: 100%;
    border: 1px solid #d8e0e4;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.95rem;
}

#chat-suporte-painel .chat-mensagens {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#chat-suporte-painel .chat-msg {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    word-wrap: break-word;
}

#chat-suporte-painel .chat-msg.cliente {
    align-self: flex-end;
    background: rgba(25, 135, 84, 0.2);
    color: #1a2b32;
}

#chat-suporte-painel .chat-msg.suporte {
    align-self: flex-start;
    background: #f0f4f5;
    color: #1a2b32;
}

#chat-suporte-painel .chat-msg .hora {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 2px;
}

#chat-suporte-painel .chat-form {
    padding: 12px;
    border-top: 1px solid #e8ecef;
    flex-shrink: 0;
}

#chat-suporte-painel .chat-form .input-group {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d8e0e4;
}

#chat-suporte-painel .chat-form input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-size: 0.95rem;
    outline: none;
}

#chat-suporte-painel .chat-form .btn-enviar-chat {
    background: #198754;
    color: #fff;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
}

#chat-suporte-painel .chat-form .btn-enviar-chat:hover {
    background: #157347;
}

#chat-suporte-painel .chat-form .btn-enviar-chat:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
