/* v12/agente-modular/agente-styles.css - Estilos Core do Agente de Voz */

/* ======= Avatar Container Styles ======= */
.voice-agent-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 140px;
    height: 140px;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    border-radius: 50%;
    /* Subtle background circle */
    background: radial-gradient(circle, rgba(239, 162, 134, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
}

.voice-agent-container:hover {
    transform: translateY(-5px) scale(1.05);
}

.voice-agent-container svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

/* Estados da UI */
.voice-agent-container.active {
    filter: drop-shadow(0 0 15px rgba(255, 51, 102, 0.6));
}

.voice-agent-container.speaking {
    filter: drop-shadow(0 0 25px rgba(106, 13, 173, 0.8));
}

.status-indicator {
    position: absolute;
    bottom: 10px;
    right: 15px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #666;
    border: 2px solid #0f1015;
    transition: background-color 0.3s;
}

.voice-agent-container.active .status-indicator {
    background-color: #00F2FE;
    box-shadow: 0 0 10px #00F2FE;
}

.voice-agent-container.speaking .status-indicator {
    background-color: #FF3366;
    box-shadow: 0 0 10px #FF3366;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.inactive-message {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 46, 0.9);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(217, 39, 110, 0.5);
    font-weight: 500;
}

.voice-agent-container.idle .inactive-message {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.voice-agent-container:not(.idle) .inactive-message {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
}

/* ======= Overlays e Loaders de Sistema (RAG/Brain/Login) ======= */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 16, 21, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    animation: fadeIn 0.4s ease forwards;
}

.box {
    background: #1a1a2e;
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(106, 13, 173, 0.3);
}

.box h2 {
    color: #fff;
    margin-top: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.box p {
    color: #b0b0c0;
    font-size: 1rem;
}

.loader {
    border: 6px solid #2a1538;
    border-top: 6px solid #00F2FE;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px auto;
}

.loader-brain {
    border-top: 6px solid #D9276E;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Modal de Identificação do Usuário (Plug-and-play) */
.agent-login-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 16, 21, 0.96); display: flex; justify-content: center; align-items: center; z-index: 100001;
    backdrop-filter: blur(8px); animation: fadeIn 0.4s ease forwards;
}
.agent-login-box {
    background: #1a1a2e; padding: 2.5rem; border-radius: 24px; text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7); max-width: 420px; width: 90%;
    border: 1px solid rgba(106, 13, 173, 0.3); transform: scale(0.9); animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.agent-login-box h2 {
    color: #fff; margin-bottom: 2rem; font-size: 1.8rem; font-family: 'Inter', sans-serif; font-weight: 700;
}
.agent-login-input {
    padding: 18px; font-size: 1.1rem; border-radius: 12px; border: 2px solid rgba(106, 13, 173, 0.5);
    background: #0f1015; margin-bottom: 1.5rem; width: 100%; color: white; outline: none; transition: all 0.3s; box-sizing: border-box;
}
.agent-login-input:focus { border-color: #D9276E; box-shadow: 0 0 15px rgba(217, 39, 110, 0.3); }
.agent-login-button {
    background: linear-gradient(90deg, #6A0DAD 0%, #D9276E 100%); border: none;
    padding: 18px; font-size: 1.1rem; border-radius: 12px; width: 100%; color: white;
    cursor: pointer; font-weight: 700; transition: transform 0.2s, box-shadow 0.2s;
}
.agent-login-button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(217, 39, 110, 0.4); }
.agent-login-button:active { transform: translateY(0); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ======= Popups de Utilidade (Mapa e WhatsApp) ======= */
.agent-util-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 16, 21, 0.9); display: flex; justify-content: center; align-items: center; z-index: 100005;
    backdrop-filter: blur(5px); animation: fadeIn 0.4s ease forwards;
    color: #fff;
}

.agent-util-box {
    background: #1a1a2e; padding: 2rem; border-radius: 24px; text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7); max-width: 600px; width: 90%;
    border: 1px solid rgba(13, 242, 254, 0.3); position: relative;
    animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    color: #fff;
}

.close-util {
    position: absolute; top: 15px; right: 15px; background: none; border: none;
    color: #fff; font-size: 1.5rem; cursor: pointer; opacity: 0.6; transition: 0.2s;
}
.close-util:hover { opacity: 1; }

.map-iframe {
    width: 100%; height: 350px; border-radius: 12px; border: none; margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.whatsapp-box { padding: 1rem; }
.whatsapp-box h3 { color: #fff; margin-bottom: 1.5rem; font-size: 1.5rem; }

.whatsapp-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: #25D366; color: white; padding: 15px 30px; border-radius: 50px;
    text-decoration: none; font-weight: 700; font-size: 1.2rem; transition: transform 0.2s, box-shadow 0.2s;
    gap: 12px; border: none; cursor: pointer;
}
.whatsapp-btn:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(37, 211, 102, 0.4); }
.whatsapp-btn svg { width: 24px; height: 24px; fill: currentColor; }
