/* ===== CHAT LAUNCHER ===== */
/* .chat-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    z-index: 1000;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
} */

.chat-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #000000 0%, #433f3f 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    background: linear-gradient(135deg, #000000 0%, #433f3f 100%);
    z-index: 1000;
    border: none;

}

.chat-launcher:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.5);
}

.chat-launcher:active {
    transform: scale(0.95);
}

.notification-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: #f43f5e;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ===== CHAT WINDOW ===== */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 320px;
    max-width: calc(100vw - 32px);
    height: 420px;
    max-height: calc(100vh - 140px);
    /* background: #ffffff; */
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-window.is-hidden {
    display: none;
}

.chat-window a {
    color: #667eea !important;
    font-weight: 600;
    text-decoration: none;
    /*border-bottom: 1px solid rgba(102, 126, 234, 0.3);*/
    transition: border-color 0.3s;
}

.chat-window a:hover {
    border-bottom-color: #764ba2;
}

/* ===== CHAT HEADER ===== */
.chat-header {
    background: linear-gradient(135deg, #000000 0%, #433f3f 100%);
        color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chat-avatar svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
}

.chat-header-info h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-close {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.chat-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* ===== CHAT BODY ===== */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    background: #f8fafc;
    scroll-behavior: smooth;
}

.chat-body::-webkit-scrollbar {
    width: 4px;
}

.chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== BUBBLES ===== */
.bubble {
    max-width: 82%;
    padding: 10px 16px;
    border-radius: 14px;
    margin-bottom: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bubble-time {
    display: block;
    font-size: 0.6rem;
    opacity: 0.6;
    margin-bottom: 4px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.bubble.user {
    background: linear-gradient(135deg, #000000 0%, #433f3f 100%);

    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bubble.user .bubble-time {
    color: rgb(255 255 255);
    text-align: right;
        margin-bottom: -5px;
}

.bubble.bot {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bubble.bot .bubble-time {
    color: #94a3b8;
}

/* ===== TYPING INDICATOR ===== */
.bubble.typing {
    padding: 12px 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) {
    animation-delay: 0s;
}
.typing-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* ===== CHAT FOOTER ===== */
.chat-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.chat-input-wrapper:focus-within {
    border-color: #000000;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    outline: none;
    color: #1e293b;
    font-family: inherit;
}

.chat-input::placeholder {
    color: #94a3b8;
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: none;
 background: linear-gradient(135deg, #000000 0%, #433f3f 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    padding: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-send-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .chat-window {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        bottom: 0;
        right: 0;
    }

    .chat-launcher {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .chat-body {
        padding: 12px 16px;
    }

    .bubble {
        max-width: 88%;
        font-size: 0.85rem;
    }

    .chat-header {
        padding: 14px 16px;
    }
}

@media (max-width: 400px) {
    .chat-window {
        max-height: 100vh;
    }

    .bubble {
        max-width: 92%;
        padding: 8px 12px;
    }
}

/* ===== SMOOTH SCROLLBAR FOR FIREFOX ===== */
.chat-body {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}