﻿:root {
    --chat-accent: #7c6ff7;
    --chat-accent-dark: #5b4fcf;
    --chat-accent-glow: rgba(124, 111, 247, .35);
    --chat-glass-bg: rgba(255, 255, 255, .04);
    --chat-glass-border: rgba(255, 255, 255, .09);
    --chat-surface: #13131f;
    --chat-surface-hover: #1a1a2e;
    --chat-text: #f0efff;
    --chat-text-muted: #7b7a99;
    --chat-red: #ff6b6b;
    --chat-green: #56cfb2;
}

/* ── TRIGGER BUTTON ── */
.chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 0 var(--chat-accent-glow), 0 8px 32px rgba(0, 0, 0, .4);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
    z-index: 999;
    animation: chatPulse 3s ease-in-out infinite;
}

    .chat-button:hover {
        transform: scale(1.04);
        box-shadow: 0 0 0 10px rgba(124, 111, 247, .12), 0 12px 40px rgba(0, 0, 0, .5);
        animation: none;
    }

    .chat-button svg {
        width: 22px;
        height: 22px;
        fill: #fff;
        transition: transform .3s ease;
    }

    .chat-button:hover svg {
        transform: rotate(-15deg);
    }

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--chat-red);
    border: 2px solid #0d0d14;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
}

@keyframes chatPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--chat-accent-glow), 0 8px 32px rgba(0, 0, 0, .4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(124, 111, 247, 0), 0 8px 32px rgba(0, 0, 0, .4);
    }
}

/* ── OVERLAY ── */
.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 1000;
}

    .chat-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

/* ── PANEL ── */
.chat-modal {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 340px;
    background: var(--chat-surface);
    border: 1px solid var(--chat-glass-border);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .03);
    overflow: hidden;
    z-index: 1001;
    transform: translateY(20px) scale(.96);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s cubic-bezier(.34, 1.2, .64, 1), opacity .3s ease;
    font-family: 'Sora', sans-serif;
}

    .chat-modal.open {
        transform: translateY(0) scale(1);
        opacity: 1;
        pointer-events: all;
    }

/* ── HEADER ── */
.chat-panel-header {
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, rgba(124, 111, 247, .15), rgba(79, 209, 197, .08));
    border-bottom: 1px solid var(--chat-glass-border);
    position: relative;
}

.chat-panel-header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .chat-header-icon svg {
        width: 18px;
        height: 18px;
        fill: #fff;
    }

.chat-header-text h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--chat-text);
}

.chat-header-text p {
    font-size: 11px;
    color: var(--chat-text-muted);
    margin-top: 2px;
}

.chat-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--chat-green);
    border-radius: 50%;
    margin-right: 5px;
    animation: chatBlink 2s ease infinite;
}

@keyframes chatBlink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .3;
    }
}

/* ── CLOSE BUTTON ── */
.close-modal {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--chat-text-muted);
    transition: background .2s, color .2s;
}

    .close-modal:hover {
        background: rgba(255, 255, 255, .12);
        color: var(--chat-text);
    }

    .close-modal svg {
        width: 14px;
        height: 14px;
    }

/* ── CARDS ── */
.chat-cards {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--chat-glass-bg);
    border: 1px solid var(--chat-glass-border);
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s cubic-bezier(.34, 1.56, .64, 1);
    position: relative;
    overflow: hidden;
}

    .chat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 60%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .03), transparent);
        transition: left .4s ease;
    }

    .chat-card:hover::before {
        left: 140%;
    }

    .chat-card:hover {
        background: var(--chat-surface-hover);
        border-color: rgba(124, 111, 247, .3);
        transform: translateX(3px);
    }

.chat-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .chat-card-icon svg {
        width: 18px;
        height: 18px;
    }

    .chat-card-icon.purple {
        background: rgba(124, 111, 247, .15);
    }

        .chat-card-icon.purple svg {
            fill: #a89cf7;
        }

    .chat-card-icon.teal {
        background: rgba(79, 209, 197, .12);
    }

        .chat-card-icon.teal svg {
            fill: #4fd1c5;
        }

    .chat-card-icon.orange {
        background: rgba(255, 165, 89, .12);
    }

        .chat-card-icon.orange svg {
            fill: #ffb347;
        }

    .chat-card-icon.blue {
        background: rgba(42, 171, 238, .12);
    }

        .chat-card-icon.blue svg {
            fill: #2aabee;
        }

.chat-card-text {
    flex: 1;
}

    .chat-card-text strong {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--chat-text);
    }

    .chat-card-text span {
        font-size: 11px;
        color: var(--chat-text-muted);
        margin-top: 2px;
        display: block;
        line-height: 1.4;
    }

.chat-card-arrow {
    color: var(--chat-text-muted);
    flex-shrink: 0;
    transition: transform .2s ease;
}

.chat-card:hover .chat-card-arrow {
    transform: translateX(3px);
    color: var(--chat-accent);
}

.chat-card-arrow svg {
    width: 14px;
    height: 14px;
}

.chat-ticket-count {
    background: linear-gradient(135deg, var(--chat-accent), #a89cf7);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: auto;
    margin-right: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Sora', sans-serif;
}

/* ── FOOTER ── */
.chat-panel-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid var(--chat-glass-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

    .chat-panel-footer span {
        font-size: 10px;
        color: var(--chat-text-muted);
    }

    .chat-panel-footer a {
        font-size: 10px;
        color: var(--chat-accent);
        text-decoration: none;
    }

        .chat-panel-footer a:hover {
            text-decoration: underline;
        }

.chat-footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--chat-text-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    .chat-modal {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 80px;
    }

    .chat-button {
        bottom: 16px;
        right: 16px;
    }
}
