/* ════════════════════════════════════════
   EVAQURE AI CHATBOT  |  chatbot.css
════════════════════════════════════════ */
:root {
    --ec-black:   #0A0A0A;
    --ec-gold:    #B88B5E;
    --ec-gold-lt: #D4A97A;
    --ec-gold-bg: #FBF6F1;
    --ec-white:   #FFFFFF;
    --ec-off:     #F5F3F0;
    --ec-pale:    #E8E4DF;
    --ec-smoke:   #6B6B6B;
    --ec-mid:     #9A9A9A;
    --ec-green:   #2E9E6A;
    --ec-r:       14px;
    --ec-shadow:  0 8px 40px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);
    --ec-head:    'Logam', Georgia, serif;
    --ec-body:    'Lato', -apple-system, sans-serif;
}

.evq-chat-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    font-family: var(--ec-body);
    -webkit-font-smoothing: antialiased;
}

/* ── BUBBLE ── */
.evq-chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ec-black);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    position: relative;
    margin-left: auto;
    color: var(--ec-white);
}
.evq-chat-bubble:hover { transform: scale(1.08); background: #1a1a1a; }
.evq-chat-bubble:active { transform: scale(0.96); }

.evq-bubble-ping {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: var(--ec-gold);
    border-radius: 50%;
    border: 2px solid var(--ec-white);
    animation: evqPing 2s ease-in-out infinite;
}
@keyframes evqPing {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.3); opacity: 0.7; }
}

/* ── CHAT WINDOW ── */
.evq-chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 360px;
    max-height: 560px;
    background: var(--ec-white);
    border-radius: var(--ec-r);
    box-shadow: var(--ec-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: evqSlideUp 0.25s cubic-bezier(0.34,1.56,0.64,1);
    border: 1px solid var(--ec-pale);
}
@keyframes evqSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── HEADER ── */
.evq-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--ec-black);
    color: var(--ec-white);
    flex-shrink: 0;
}
.evq-chat-header__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ec-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-family: var(--ec-head);
    color: var(--ec-white);
    flex-shrink: 0;
}
.evq-chat-header__info { flex: 1; min-width: 0; }
.evq-chat-header__name {
    font-family: var(--ec-head);
    font-size: 14px;
    letter-spacing: 0.06em;
    color: var(--ec-white);
    line-height: 1.2;
}
.evq-chat-header__status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    margin-top: 2px;
}
.evq-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    animation: evqPulse 2s ease-in-out infinite;
}
@keyframes evqPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}
.evq-chat-wa {
    color: #4ade80;
    display: flex;
    padding: 4px;
    transition: transform 0.2s;
}
.evq-chat-wa:hover { transform: scale(1.15); }
.evq-chat-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color 0.2s;
}
.evq-chat-close:hover { color: var(--ec-white); }

/* ── MESSAGES ── */
.evq-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--ec-off);
    scroll-behavior: smooth;
}
.evq-chat-messages::-webkit-scrollbar { width: 4px; }
.evq-chat-messages::-webkit-scrollbar-track { background: transparent; }
.evq-chat-messages::-webkit-scrollbar-thumb { background: var(--ec-pale); border-radius: 4px; }

/* Message bubbles */
.evq-msg {
    display: flex;
    flex-direction: column;
    max-width: 82%;
    animation: evqFadeIn 0.2s ease;
}
@keyframes evqFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.evq-msg--bot  { align-self: flex-start; }
.evq-msg--user { align-self: flex-end; }

.evq-msg__bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-word;
}
.evq-msg--bot .evq-msg__bubble {
    background: var(--ec-white);
    color: var(--ec-black);
    border-bottom-left-radius: 3px;
    border: 1px solid var(--ec-pale);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.evq-msg--user .evq-msg__bubble {
    background: var(--ec-black);
    color: var(--ec-white);
    border-bottom-right-radius: 3px;
}
/* Links in bot messages */
.evq-msg--bot .evq-msg__bubble a {
    color: var(--ec-gold);
    text-decoration: underline;
    word-break: break-all;
}

/* Typing indicator */
.evq-typing .evq-msg__bubble {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 16px;
}
.evq-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ec-mid);
    animation: evqTyping 1.2s ease-in-out infinite;
}
.evq-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.evq-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes evqTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── QUICK REPLIES ── */
.evq-chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: var(--ec-off);
    border-top: 1px solid var(--ec-pale);
    flex-shrink: 0;
}
.evq-quick-btn {
    background: var(--ec-white);
    border: 1px solid var(--ec-pale);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-family: var(--ec-body);
    color: var(--ec-smoke);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
}
.evq-quick-btn:hover {
    border-color: var(--ec-gold);
    background: var(--ec-gold-bg);
    color: var(--ec-gold);
}

/* ── INPUT ── */
.evq-chat-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--ec-white);
    border-top: 1px solid var(--ec-pale);
    flex-shrink: 0;
}
.evq-chat-input {
    flex: 1;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--ec-pale);
    border-radius: 20px;
    font-size: 13px;
    font-family: var(--ec-body);
    color: var(--ec-black);
    background: var(--ec-off);
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}
.evq-chat-input:focus { border-color: var(--ec-gold); background: var(--ec-white); }
.evq-chat-input::placeholder { color: var(--ec-mid); }
.evq-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ec-gold);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ec-white);
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}
.evq-chat-send:hover  { background: var(--ec-gold-lt); }
.evq-chat-send:active { transform: scale(0.93); }
.evq-chat-send:disabled { background: var(--ec-pale); cursor: not-allowed; }

/* ── MOBILE ── */
@media (max-width: 480px) {
    .evq-chat-widget { bottom: 16px; right: 16px; }
    .evq-chat-window {
        width: calc(100vw - 32px);
        right: 0;
        max-height: 70vh;
    }
}
