/* Exness Live Chat */
.live-chat {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.chat-fab {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffcf00;
    border: none;
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(255, 207, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 28px rgba(255, 207, 0, 0.5);
}

.chat-fab.open {
    background: #1c1c1c;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.chat-fab svg {
    width: 26px;
    height: 26px;
}

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #111;
}

.chat-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #1c1c1c;
    border: 1px solid #2e2e2e;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideUp 0.25s ease;
}

@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #141414;
    border-bottom: 1px solid #2e2e2e;
    flex-shrink: 0;
}

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

.chat-status-dot {
    width: 10px;
    height: 10px;
    background: #26a69a;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(38, 166, 154, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.chat-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.chat-subtitle {
    font-size: 12px;
    color: #9a9a9a;
}

.chat-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #9a9a9a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.chat-close svg { width: 18px; height: 18px; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 2px; }

.chat-msg {
    max-width: 85%;
    animation: msgIn 0.2s ease;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg.agent { align-self: flex-start; display: flex; gap: 8px; align-items: flex-end; max-width: 90%; }
.chat-msg.user { align-self: flex-end; max-width: 85%; }

.chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffcf00, #e6ba00);
    color: #111;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-msg-body { flex: 1; min-width: 0; }

.chat-msg.user .chat-bubble {
    background: #ffcf00;
    color: #111;
    border-bottom-right-radius: 4px;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-msg.agent .chat-bubble {
    background: #2a2a2a;
    color: #e8eaed;
    border-bottom-left-radius: 4px;
}

.chat-time {
    font-size: 10px;
    color: #6b6b6b;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-msg.user .chat-time { text-align: right; }

.chat-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #2a2a2a;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    background: #9a9a9a;
    border-radius: 50%;
    animation: typing 1.2s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px 12px;
    border-top: 1px solid #2e2e2e;
    flex-shrink: 0;
}

.chat-quick-btn {
    padding: 6px 12px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 16px;
    font-size: 12px;
    color: #e8eaed;
    cursor: pointer;
    transition: all 0.15s;
}

.chat-quick-btn:hover {
    background: #333;
    border-color: #ffcf00;
    color: #ffcf00;
}

.chat-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #141414;
    border-top: 1px solid #2e2e2e;
    flex-shrink: 0;
}

.chat-input-wrap input {
    flex: 1;
    padding: 10px 14px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}

.chat-input-wrap input::placeholder { color: #6b6b6b; }
.chat-input-wrap input:focus { border-color: #ffcf00; }

.chat-send {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffcf00;
    border: none;
    border-radius: 50%;
    color: #111;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.chat-send:hover { opacity: 0.9; }
.chat-send svg { width: 18px; height: 18px; }

.hidden { display: none !important; }

@media (max-width: 480px) {
    .live-chat {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .chat-panel {
        width: 100%;
        right: 0;
        left: 0;
        bottom: 68px;
    }
}
