/**
 * Chatbot Styles - Imóveis - Premium UI
 */

:root {
    --chat-bg: rgba(255, 255, 255, 0.95);
    --chat-primary: #1a73e8;
    --chat-primary-dark: #1557b0;
    --chat-secondary: #e8f0fe;
    --chat-text: #2d3436;
    --chat-accent: #25d366;
    --chat-radius: 24px;
    --chat-shadow: 0 15px 35px rgba(0,0,0,0.15);
    --chat-glass: rgba(255, 255, 255, 0.8);
}

.mystic-chat-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Movido para a esquerda */
    right: auto !important; /* Força a remoção de qualquer posicionamento à direita */
    z-index: 9999999 !important;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.mystic-chat-trigger {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: var(--chat-primary);
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.4);
    padding: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.mystic-chat-trigger::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 15px rgba(255,255,255,0.3);
}

.mystic-chat-trigger:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 30px rgba(26, 115, 232, 0.5);
}

.mystic-chat-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mystic-chat-window {
    position: absolute;
    bottom: 85px;
    left: 0; /* Alinhado à esquerda com o botão */
    width: 380px;
    height: 600px;
    background: var(--chat-bg);
    border-radius: var(--chat-radius);
    display: flex;
    flex-direction: column;
    box-shadow: var(--chat-shadow);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.4);
    overflow: hidden;
    animation: mysticFadeIn 0.4s ease-out;
}

@keyframes mysticFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-primary-dark));
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-info img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.chat-header-info span {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

#close-chat {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#close-chat:hover {
    background: rgba(255,255,255,0.2);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: radial-gradient(circle at top right, rgba(232, 240, 254, 0.4), transparent);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(26, 115, 232, 0.2);
    border-radius: 10px;
}

.msg {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.bot-msg {
    align-self: flex-start;
    background: #fff;
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(26, 115, 232, 0.05);
}

.user-msg {
    align-self: flex-end;
    background: var(--chat-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.chat-input-area {
    padding: 15px 20px;
    display: flex;
    gap: 12px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.05);
    align-items: center;
}

#chat-user-input {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 0.92rem;
    outline: none;
    background: #fcfcfc;
    transition: border-color 0.3s;
}

#chat-user-input:focus {
    border-color: var(--chat-primary);
}

#chat-send-btn {
    background: var(--chat-primary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.3s;
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.3);
}

#chat-send-btn:hover {
    transform: scale(1.05);
    background: var(--chat-primary-dark);
}

.chat-footer-actions {
    padding: 10px 20px 20px;
    background: #fff;
    display: flex;
    justify-content: center;
}

.suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    padding-bottom: 5px;
}

.suggested-q-btn {
    background: rgba(26, 115, 232, 0.05);
    border: 1px solid rgba(26, 115, 232, 0.1);
    color: var(--chat-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.suggested-q-btn:hover {
    background: var(--chat-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.2);
}

.chat-wa-btn {
    background: var(--chat-accent);
    color: #fff;
    text-decoration: none !important;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chat-wa-btn:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

.chat-wa-direct {
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-primary-dark));
    font-size: 0.82rem;
    padding: 8px 18px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.chat-wa-direct:hover {
    background: var(--chat-primary-dark);
    box-shadow: 0 6px 15px rgba(26, 115, 232, 0.4);
}

/* Open Buttons Styling */
.mystic-chat-btn-open, .mystic-oracle-btn {
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-primary-dark));
    color: #fff !important;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.3);
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.mystic-chat-btn-open:hover, .mystic-oracle-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(26, 115, 232, 0.4);
}

@media (max-width: 480px) {
    .mystic-chat-window {
        width: calc(100vw - 40px);
        height: 80vh;
        left: 0;
        bottom: 80px;
    }
    .mystic-chat-wrapper {
        left: 20px;
        bottom: 20px;
    }
}
