#bb-support-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

#bb-support-trigger {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s ease;
}

#bb-support-trigger:hover {
    transform: scale(1.1);
}

#bb-support-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
}

#bb-support-window.bb-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.bb-support-header {
    background: rgba(15, 23, 42, 0.9);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bb-support-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

#bb-support-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.5rem;
    cursor: pointer;
}

#bb-support-close:hover {
    color: #fff;
}

.bb-support-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom Scrollbar for messages */
.bb-support-messages::-webkit-scrollbar {
    width: 6px;
}
.bb-support-messages::-webkit-scrollbar-track {
    background: transparent;
}
.bb-support-messages::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.2);
    border-radius: 6px;
}

.bb-message {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.bb-bot {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.bb-user {
    background: var(--brand-primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    color: #fff;
}

.bb-support-input {
    padding: 15px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
}

#bb-support-text {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    color: #fff;
    font-family: inherit;
    outline: none;
}

#bb-support-text:focus {
    border-color: var(--brand-secondary);
}

#bb-support-send {
    background: var(--brand-primary);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#bb-support-send:hover {
    background: var(--brand-secondary);
}

/* Typing animation */
.bb-dot-typing {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 8px 0 0 0 #fff, 16px 0 0 0 #fff;
    animation: bb-typing 1.5s infinite linear;
    margin-left: 4px;
    margin-right: 20px;
}

@keyframes bb-typing {
    0% { box-shadow: 8px 0 0 0 rgba(255,255,255,0.2), 16px 0 0 0 rgba(255,255,255,0.2); }
    25% { box-shadow: 8px 0 0 0 #fff, 16px 0 0 0 rgba(255,255,255,0.2); }
    50% { box-shadow: 8px 0 0 0 rgba(255,255,255,0.2), 16px 0 0 0 #fff; }
    75% { box-shadow: 8px 0 0 0 rgba(255,255,255,0.2), 16px 0 0 0 rgba(255,255,255,0.2); }
    100% { box-shadow: 8px 0 0 0 rgba(255,255,255,0.2), 16px 0 0 0 rgba(255,255,255,0.2); }
}

@media (max-width: 480px) {
    #bb-support-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        position: fixed;
    }
    #bb-support-trigger {
        right: 20px;
        bottom: 20px;
    }
}

/* Light Theme Overrides */
[data-theme="light"] #bb-support-window {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .bb-support-header {
    background: rgba(241, 245, 249, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .bb-support-header h4 {
    color: #0f172a;
}

[data-theme="light"] #bb-support-close {
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] #bb-support-close:hover {
    color: #0f172a;
}

[data-theme="light"] .bb-message {
    color: #1e293b;
}

[data-theme="light"] .bb-bot {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .bb-user {
    color: #ffffff;
}

[data-theme="light"] .bb-support-input {
    background: rgba(241, 245, 249, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] #bb-support-text {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

[data-theme="light"] .bb-dot-typing {
    background-color: #0f172a;
    box-shadow: 8px 0 0 0 #0f172a, 16px 0 0 0 #0f172a;
    animation: bb-typing-light 1.5s infinite linear;
}

@keyframes bb-typing-light {
    0% { box-shadow: 8px 0 0 0 rgba(15,23,42,0.2), 16px 0 0 0 rgba(15,23,42,0.2); }
    25% { box-shadow: 8px 0 0 0 #0f172a, 16px 0 0 0 rgba(15,23,42,0.2); }
    50% { box-shadow: 8px 0 0 0 rgba(15,23,42,0.2), 16px 0 0 0 #0f172a; }
    75% { box-shadow: 8px 0 0 0 rgba(15,23,42,0.2), 16px 0 0 0 rgba(15,23,42,0.2); }
    100% { box-shadow: 8px 0 0 0 rgba(15,23,42,0.2), 16px 0 0 0 rgba(15,23,42,0.2); }
}
