/* Chatbot UI - Smart Vision Theme */
:root {
    --chat-primary: #F15A24;
    /* Smart Vision Orange */
    --chat-secondary: #00ADEF;
    /* Smart Vision Blue */
    --chat-gradient: linear-gradient(135deg, #F15A24 0%, #B84D2E 50%, #00ADEF 100%);
    --chat-bg: #f5f7fb;
    --msg-user: #F15A24;
    --msg-bot: #ffffff;
    --chat-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --chat-overlay: rgba(0, 0, 0, 0.7);
}

#chatbot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--chat-overlay);
    z-index: 9999990;
    display: none;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

#chatbot-bubble {
    position: fixed;
    bottom: 65px;
    left: 10px;
    width: 50px;
    height: 50px;
    background: #F15A24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 25px;
    cursor: pointer;
    z-index: 10000000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: ripple 2s infinite;
}


#chatbot-bubble:hover {
    transform: scale(1.1) rotate(10deg);
}

#chatbot-window {
    position: fixed;
    bottom: 110px;
    left: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--chat-shadow);
    z-index: 9999995;
    display: none;
    flex-direction: row; /* Changed to row to support sidebar */
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom left;
}

#chatbot-window.expanded {
    width: 80vw;
    height: 80vh;
    bottom: 10vh;
    left: 10vw;
    z-index: 9999996;
}

/* Sidebar Styling */
#chatbot-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #eee;
    display: none;
    flex-direction: column;
}

#chatbot-window.expanded #chatbot-sidebar {
    display: flex;
}

#chatbot-window.expanded.sidebar-collapsed #chatbot-sidebar {
    width: 0;
    border-right: none;
    overflow: hidden;
}

#chatbot-window.expanded #chatbot-sidebar-toggle {
    display: inline-block !important;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

#chatbot-new-chat-btn {
    width: 100%;
    padding: 10px;
    background: var(--chat-bg);
    border: 1px solid #ddd;
    border-radius: 10px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#chatbot-new-chat-btn:hover {
    background: #eef1f5;
    border-color: #ccc;
}

.sidebar-history {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #F15A24 transparent;
    /* Firefox */
}

/* Chrome, Safari, and Edge scrollbar styling */
.sidebar-history::-webkit-scrollbar {
    width: 6px;
}

.sidebar-history::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-history::-webkit-scrollbar-thumb {
    background: #F15A24;
    border-radius: 10px;
}

.sidebar-history::-webkit-scrollbar-thumb:hover {
    background: #B84D2E;
}

.history-item {
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.history-item-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.history-item-content span {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    flex: 1;
    min-width: 0;
}

.history-item i.ri-message-3-line {
    color: var(--chat-secondary);
}

.delete-chat-btn {
    color: #ff4d4f;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 14px;
}

.history-item:hover .delete-chat-btn {
    opacity: 1;
}

.delete-chat-btn:hover {
    color: #cf1322;
    transform: scale(1.1);
}

.history-item:hover {
    background: #f5f7fb;
}

.history-item.active {
    background: #e6f7ff;
    color: var(--chat-secondary);
    font-weight: 600;
    border-left: 3px solid var(--chat-secondary);
}

/* Main Content Wrapper */
#chatbot-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative; /* Anchor for floating elements */
}

#chatbot-header {
    background: linear-gradient(135deg, #00ADEF 0%, #0077A5 100%);
    /* Smart Vision Blue Gradient */
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

#chatbot-header .info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#chatbot-header .info img {
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    padding: 3px;
}

#chatbot-header .controls {
    display: flex;
    gap: 15px;
    font-size: 20px;
}

#chatbot-header .controls i {
    cursor: pointer;
    transition: opacity 0.2s;
}

#chatbot-header .controls i:hover {
    opacity: 0.7;
}

#chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--chat-bg);
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #F15A24 transparent;
    /* Firefox */
}

/* Chrome, Safari, and Edge scrollbar styling */
#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: #F15A24;
    border-radius: 10px;
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #B84D2E;
}

.msg {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    animation: fadeIn 0.3s ease;
    white-space: pre-wrap;
    /* Supports new lines */
    word-wrap: break-word;
}

.msg strong {
    color: var(--chat-primary);
    font-weight: 700;
}

.msg-bot {
    align-self: flex-end;
    /* Left side in RTL */
    background: var(--msg-bot);
    color: #333;
    border-bottom-left-radius: 4px;
    /* Corrected to left corner for left-aligned bubble */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.msg-user {
    align-self: flex-start;
    /* Right side in RTL */
    background: var(--msg-user);
    color: white;
    border-bottom-right-radius: 4px;
    /* Corrected to right corner for right-aligned bubble */
    box-shadow: 0 4px 10px rgba(241, 90, 36, 0.2);
}

.msg-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-file-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.chatbot-file-badge:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: scale(1.1);
    color: white;
}

.chatbot-file-badge i {
    font-size: 18px;
}

#chatbot-input-container {
    padding: 12px 20px;
    background: white;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    border-top: 1px solid #eee;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 10px 18px;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
    resize: none;
    /* Already here, but critical */
    max-height: 120px;
    overflow-y: hidden;
    /* Hide scrollbar until it grows */
    line-height: 1.4;
    font-size: 14px;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
    /* Fixed standard property */
}

#chatbot-input::-webkit-scrollbar {
    width: 0px;
    /* Hide by default */
}

#chatbot-input.has-scroll::-webkit-scrollbar {
    width: 6px;
    /* Show only when needed */
    display: block;
}

#chatbot-input.has-scroll::-webkit-scrollbar-thumb {
    background: #F15A24;
    /* Smart Vision Orange */
    border-radius: 10px;
}

#chatbot-input.has-scroll {
    scrollbar-width: thin;
    scrollbar-color: #F15A24 transparent;
}

#chatbot-input:focus {
    border-color: var(--chat-primary);
}

#chatbot-send {
    width: 45px;
    height: 45px;
    background: var(--chat-primary);
    /* Smart Vision Orange */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(241, 90, 36, 0.3);
}

#chatbot-send:hover {
    transform: scale(1.05);
}

/* File preview bar above input */
#chatbot-file-preview {
    padding: 8px 20px 0 20px;
    background: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
}

#chatbot-file-preview i {
    font-size: 22px;
    color: #e74c3c;
}

#chatbot-preview-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

#chatbot-remove-file {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

#chatbot-remove-file:hover {
    color: #e74c3c;
}

/* Attach button on the left side of input */
#chatbot-attach-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: all 0.2s;
    flex-shrink: 0;
}

#chatbot-attach-btn:hover {
    color: var(--chat-primary);
    border-color: var(--chat-primary);
    background: rgba(241, 90, 36, 0.06);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing indicator - Futuristic Arabic */
.typing {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 18px;
    width: fit-content;
    border-bottom-left-radius: 4px;
    font-size: 13px;
    color: var(--chat-secondary);
    font-weight: 600;
}

.typing::after {
    content: "جاري التفكير...";
    animation: pulseText 1.5s infinite ease-in-out;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.typing span {
    width: 6px;
    height: 6px;
    background: var(--chat-primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* ChatGPT Writer Effect Cursor */
.msg-bot.typing-writer::after {
    content: '●';
    margin-right: 5px;
    animation: blink 0.7s infinite;
    font-size: 10px;
    vertical-align: middle;
    color: var(--chat-primary);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Model Loading Progress Styles */
.chatbot-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    height: 100%;
    text-align: center;
    background: white;
}

.loader-progress-container {
    width: 100%;
    height: 8px;
    background: #eef1f5;
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid #ddd;
}

#loader-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--chat-gradient);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.loader-status-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--chat-primary);
    margin-bottom: 5px;
}

.loader-percent {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

/* --- Nagham AI Inline Assistant --- */
.va-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999; 
    justify-content: center;
    align-items: center;
}

#naghamAI-container {
    position:relative;
    transition: all 0.3s ease;
    padding: 0;
    height: 40px;
}

.va-inline-visualizer {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    margin-right: 10px;
}

.va-inline-visualizer .bar {
    width: 3px;
    height: 8px;
    background: #F15A24; /* Smart Vision Orange */
    border-radius: 10px;
    animation: bounceVisualizer 0.8s infinite alternate;
}

.va-inline-visualizer .bar:nth-child(2) { animation-delay: 0.1s; height: 16px; }
.va-inline-visualizer .bar:nth-child(3) { animation-delay: 0.2s; height: 12px; }
.va-inline-visualizer .bar:nth-child(4) { animation-delay: 0.3s; height: 6px; }

#naghamAI-transcript {
    color: #4A90E2;
    border-right: 2px solid #ddd;
    padding-right: 10px;
    animation: fadeIn 0.3s;
}

#micIcon {
    color: #00ADEF; /* Smart Vision Blue */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

#micIcon:hover {
    animation: magicalGlow 1.2s infinite alternate ease-in-out;
    
}



@keyframes magicalGlow {
    0% { 
       
        color: #00ADEF; 
    }
    100% { 
       
        color: #F15A24; 
    }
}

#micIcon.active-ai {
    color: #F15A24; /* Solid Smart Vision Orange */
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    animation: activeGlow 1.5s infinite alternate;
}

@keyframes activeGlow {
    from { filter: drop-shadow(0 0 5px rgba(241, 90, 36, 0.4)); }
    to { filter: drop-shadow(0 0 15px rgba(241, 90, 36, 0.9)); }
}

@keyframes bounceVisualizer {
    from { transform: scaleY(0.5); }
    to { transform: scaleY(1.5); }
}

/* Loader for inline Nagham AI */
#naghamAI-loader {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4A90E2;
    border-radius: 50%;
    animation: spinva 1s linear infinite;
    display: none;
    margin-right: 10px;
}

@keyframes spinva {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chatbot-options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.chatbot-option-btn {
    text-align: right;
    width: 100%;
    border: 1px solid var(--chat-secondary);
    background: white;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--chat-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.chatbot-option-btn:hover {
    background: var(--chat-secondary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 173, 239, 0.3);
}

/* Scroll to Bottom Button */
.chatbot-scroll-bottom-btn {
    position: absolute;
    bottom: 85px;
    left: 20px;
    width: 38px;
    height: 38px;
    background: white;
    border: 1px solid #eee;
    border-radius: 50%;
    color: var(--chat-primary);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transition: opacity 0.3s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    opacity: 0;
}

.msg-copy-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: rgba(0,0,0,0.05);
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    padding: 0;
    line-height: 1;
}

.msg:hover .msg-copy-btn {
    opacity: 1;
}

.msg-copy-btn:hover {
    background: rgba(0,0,0,0.1);
    color: var(--chat-primary);
}

.msg-copy-btn i {
    font-size: 14px;
}

.chatbot-scroll-bottom-btn:hover {
    background: var(--chat-primary);
    color: white;
    border-color: var(--chat-primary);
    transform: translateY(2px);
    opacity: 1 !important;
}

/* ========== Chat Loading Skeleton ========== */
#chatbot-skeleton {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    width: 100%;
    flex: 1;
    background: var(--chat-bg);
    overflow: hidden;
}

#chatbot-skeleton.visible {
    display: flex;
}

.skeleton-msg {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.skeleton-msg.bot {
    align-items: flex-end;
}

.skeleton-msg.user {
    align-items: flex-start;
}

.skeleton-bubble {
    height: 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, #e8eaed 25%, #f5f6f7 50%, #e8eaed 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-msg.bot .skeleton-bubble {
    background: linear-gradient(90deg, #dde8f0 25%, #eef4f9 50%, #dde8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-msg.user .skeleton-bubble {
    background: linear-gradient(90deg, #f5d9cc 25%, #faeae3 50%, #f5d9cc 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== Chat Placeholder ========== */
#chatbot-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    flex: 1;
    background: var(--chat-bg);
    color: #333;
    overflow-y: auto;
}

#chatbot-placeholder.visible {
    display: flex;
}

.placeholder-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #00ADEF 0%, #0077A5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(0, 173, 239, 0.2);
    animation: placeholder-glow 2s infinite alternate;
}

@keyframes placeholder-glow {
    from {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(0, 173, 239, 0.2);
    }
    to {
        transform: scale(1.05);
        box-shadow: 0 12px 25px rgba(0, 173, 239, 0.4);
    }
}

#chatbot-placeholder h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

#chatbot-placeholder p {
    font-size: 12px;
    color: #666;
    max-width: 280px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.placeholder-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 300px;
}

.suggestion-card {
    background: white;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    text-align: right;
}

.suggestion-card:hover {
    border-color: var(--chat-primary);
    background: rgba(241, 90, 36, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241, 90, 36, 0.08);
}

.suggestion-card i {
    font-size: 18px;
    color: var(--chat-primary);
}

.suggestion-card span {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {
    #chatbot-window {
        width: 100vw;
        height: 100vh;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        border-radius: 0;
    }
    #chatbot-window.expanded {
        width: 100vw;
        height: 100vh;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
    }
    #chatbot-window.expanded #chatbot-sidebar {
        display: none;
    }
    #chatbot-window.expanded .chatbot-scroll-bottom-btn {
        left: 50%;
        transform: translateX(-50%);
    }
    #chatbot-expand {
        display: none !important;
    }
    #chatbot-header {
        border-radius: 0;
    }
    body:has(#chatbot-window[style*="flex"]) #chatbot-bubble {
        display: none !important;
    }
    body:has(#chatbot-window[style*="flex"]) #chatbot-overlay {
        display: none !important;
    }
    #chatbot-bubble {
        width: 44px;
        height: 44px;
        font-size: 22px;
        bottom: 55px;
        left: 10px;
    }
    #chatbot-header {
        padding: 14px 16px;
    }
    #chatbot-header .info img {
        width: 30px;
        height: 30px;
    }
    #chatbot-header .controls {
        font-size: 18px;
        gap: 12px;
    }
    #chatbot-messages {
        padding: 14px;
        gap: 12px;
    }
    .msg {
        max-width: 88%;
        padding: 10px 14px;
        font-size: 13px;
    }
    .msg-copy-btn {
        opacity: 0.6;
        top: 4px;
        left: 4px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    .msg-copy-btn i {
        font-size: 13px;
    }
    #chatbot-input-container {
        padding: 10px 14px;
        gap: 8px;
    }
    #chatbot-input {
        font-size: 13px;
        padding: 8px 14px;
        max-height: 100px;
    }
    #chatbot-send {
        width: 40px;
        height: 40px;
    }
    #chatbot-attach-btn {
        width: 32px;
        height: 32px;
    }
    #chatbot-attach-btn i {
        font-size: 16px;
    }
    #chatbot-file-preview {
        padding: 6px 14px 0 14px;
        font-size: 12px;
    }
    .chatbot-scroll-bottom-btn {
        bottom: 75px;
    }
}

@media (max-width: 480px) {
    #chatbot-window {
        width: 100vw;
        height: 100vh;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        border-radius: 0;
    }
    #chatbot-window.expanded {
        width: 100vw;
        height: 100vh;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
    }
    #chatbot-window.expanded #chatbot-sidebar {
        display: none;
    }
    #chatbot-expand {
        display: none !important;
    }
    #chatbot-header {
        border-radius: 0;
    }
    body:has(#chatbot-window[style*="flex"]) #chatbot-bubble {
        display: none !important;
    }
    body:has(#chatbot-window[style*="flex"]) #chatbot-overlay {
        display: none !important;
    }
    #chatbot-bubble {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 45px;
        left: 8px;
    }
    #chatbot-header {
        padding: 12px 14px;
    }
    #chatbot-header .info strong {
        font-size: 13px;
    }
    #chatbot-header .info span {
        font-size: 10px;
    }
    #chatbot-header .controls {
        font-size: 16px;
        gap: 10px;
    }
    #chatbot-messages {
        padding: 10px;
        gap: 10px;
    }
    .msg {
        max-width: 92%;
        padding: 8px 12px;
        font-size: 12px;
    }
    .msg-copy-btn {
        opacity: 0.6;
        top: 3px;
        left: 3px;
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    .msg-copy-btn i {
        font-size: 12px;
    }
    #chatbot-input-container {
        padding: 8px 10px;
        gap: 6px;
    }
    #chatbot-input {
        font-size: 12px;
        padding: 8px 12px;
        max-height: 80px;
    }
    #chatbot-send {
        width: 36px;
        height: 36px;
    }
    #chatbot-send i {
        font-size: 16px;
    }
    #chatbot-attach-btn {
        width: 28px;
        height: 28px;
    }
    #chatbot-attach-btn i {
        font-size: 14px;
    }
    #chatbot-file-preview {
        padding: 4px 10px 0 10px;
        font-size: 11px;
    }
    .chatbot-scroll-bottom-btn {
        bottom: 65px;
    }
}