/* Widget Principal */
.agent-responder-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Posições */
.agent-responder-bottom-right {
    bottom: 20px;
    right: 20px;
}

.agent-responder-bottom-left {
    bottom: 20px;
    left: 20px;
}

.agent-responder-top-right {
    top: 20px;
    right: 20px;
}

.agent-responder-top-left {
    top: 20px;
    left: 20px;
}

/* Botão Toggle */
.agent-responder-toggle {
    width: 60px;
    height: 60px;
    background: /*#007cba*/#435aff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.agent-responder-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

.agent-responder-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
}

.agent-responder-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-responder-status {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.agent-responder-dot {
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
    margin-right: 2px;
}

.agent-responder-text {
    font-size: 8px;
    color: white;
    font-weight: 500;
}

/* Chatbox */
.agent-responder-chatbox {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.agent-responder-widget.active .agent-responder-chatbox {
    display: flex;
}

.agent-responder-header {
    background: /*#007cba*/#232ea5;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-responder-header-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.agent-responder-status-badge {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.agent-responder-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atendent{
    width: 60px;
    border-radius: 25px;
}

/* Área de Mensagens */
.agent-responder-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agent-responder-welcome {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.agent-responder-welcome p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.agent-responder-message {
    max-width: 80%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.agent-responder-message.user {
    align-self: flex-end;
    background: #007cba;
    color: white;
    border-bottom-right-radius: 4px;
}

.agent-responder-message.assistant {
    align-self: flex-start;
    background: #f1f3f4;
    color: #333;
    border-bottom-left-radius: 4px;
}

/* Input Area */
.agent-responder-input-area {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.agent-responder-input-area textarea {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 15px;
    resize: none;
    font-size: 14px;
    font-family: inherit;
    max-height: 100px;
    outline: none;
    transition: border-color 0.3s ease;
}

.agent-responder-input-area textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.agent-responder-send {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.agent-responder-send:hover {
    background: #005a87;
}

.agent-responder-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Typing Indicator */
.agent-responder-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 0;
}

.agent-responder-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.agent-responder-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.agent-responder-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; }
}

/* Melhorar acessibilidade */
.agent-responder-toggle:focus,
.agent-responder-send:focus,
.agent-responder-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Responsivo */
@media (max-width: 768px) {
    .agent-responder-chatbox {
        width: 90vw;
        height: 70vh;
        bottom: 80px;
        right: 5vw;
    }
    
    .agent-responder-message {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .agent-responder-chatbox {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .agent-responder-widget.bottom-right,
    .agent-responder-widget.bottom-left {
        bottom: 10px;
    }
    
    .agent-responder-widget.top-right,
    .agent-responder-widget.top-left {
        top: 10px;
    }
}