.swisslab-ai-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #d62828 0%, #b91c1c 100%);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(214, 40, 40, 0.4);
    transition: transform 0.3s ease;
}
.chat-toggle-btn:hover {
    transform: scale(1.05) translateY(-5px);
}
.chat-toggle-btn svg {
    width: 32px;
    height: 32px;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    background: linear-gradient(135deg, #7a2222 0%, #d62828 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-admin-btn {
    background: #25d366 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.chat-admin-btn:hover {
    background: #1ebc57 !important;
    transform: scale(1.04) !important;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    color: white !important;
}
.chat-header button {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer;
    line-height: 1;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Mode Selector Tabs */
.chat-mode-tabs {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.chat-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-tab.active {
    background: #ffffff;
    color: #d62828;
    border-bottom: 2px solid #d62828;
}

.switch-to-live-btn {
    background: #d62828 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 14px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin-top: 8px !important;
    display: inline-block !important;
    transition: transform 0.2s ease !important;
}

.switch-to-live-btn:hover {
    transform: scale(1.03) !important;
}

.admin-msg-message {
    align-self: flex-start;
    background: #7a2222 !important;
    color: #ffffff !important;
    border-radius: 18px 18px 18px 4px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    padding: 12px 16px !important;
    box-shadow: 0 4px 12px rgba(122, 34, 34, 0.2) !important;
}


.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.chat-message a {
    color: #d62828;
    text-decoration: underline;
    font-weight: 600;
}
.bot-message {
    align-self: flex-start;
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 4px;
}
.user-message {
    align-self: flex-end;
    background: #d62828;
    color: white;
    border-bottom-right-radius: 4px;
}
.user-message a { color: white; }

.chat-footer {
    padding: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    gap: 10px;
    background: white;
}
.chat-footer input {
    flex: 1;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.chat-footer input:focus {
    border-color: #d62828;
}
.chat-footer button {
    background: #111827 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: transform 0.2s;
}
.chat-footer button:hover {
    transform: scale(1.1);
}
.chat-footer button svg {
    width: 18px;
    height: 18px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
