/* ROZISOFT Floating Smart Chatbot Styles */
#scrollUp {
    left: 24px !important;
    right: auto !important;
}

.rz-chatbot-root {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.rz-chat-launcher {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #45108a 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(69, 16, 138, 0.38);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    outline: none !important;
}

.rz-chat-launcher:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 28px rgba(69, 16, 138, 0.48);
}

.rz-chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

.rz-chat-badge.d-none {
    display: none !important;
}

.rz-chat-window {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 510px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(17, 24, 39, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    pointer-events: none;
}

.rz-chatbot-root.is-open .rz-chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.rz-chat-header {
    background: linear-gradient(135deg, #45108a 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

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

.rz-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.rz-chat-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.rz-chat-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.86);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.rz-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    display: inline-block;
}

.rz-chat-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
}

.rz-chat-close:hover {
    color: #ffffff;
}

.rz-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rz-msg {
    max-width: 86%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.8px;
    line-height: 1.52;
    word-wrap: break-word;
}

.rz-msg-bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.rz-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.rz-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px 10px;
    background: #f8f9fc;
    border-top: 1px solid #eef0f6;
}

.rz-chips:empty {
    display: none;
}

.rz-chip {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.rz-chip:hover {
    background: #6d28d9;
    color: #ffffff;
    border-color: #6d28d9;
}

.rz-chat-form {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    gap: 8px;
    flex-shrink: 0;
}

.rz-chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13.5px;
    outline: none;
    color: #111827;
    background: #f9fafb;
}

.rz-chat-input:focus {
    border-color: #7c3aed;
    background: #ffffff;
}

.rz-chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #6d28d9;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    transition: background 0.15s ease;
}

.rz-chat-send:hover {
    background: #5b21b6;
}

.rz-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rz-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
}

.rz-typing span {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: rzBounce 1.2s infinite ease-in-out both;
}

.rz-typing span:nth-child(1) { animation-delay: -0.24s; }
.rz-typing span:nth-child(2) { animation-delay: -0.12s; }

@keyframes rzBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
    .rz-chatbot-root {
        right: 14px;
        bottom: 14px;
    }
    .rz-chat-window {
        width: calc(100vw - 28px);
        height: 72vh;
        bottom: 70px;
    }
}
