/* Vision-X Bot Styles - Version 3.1.5 */

@font-face { font-family: 'DINPro'; src: url('../fonts/DINPro-Light_1.otf') format('opentype'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'DINPro'; src: url('../fonts/DINPro-Regular_1.otf') format('opentype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'DINPro'; src: url('../fonts/DINPro-Medium_1.otf') format('opentype'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'DINPro'; src: url('../fonts/DINPro-Bold_1.otf') format('opentype'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'DINPro'; src: url('../fonts/DINPro-Black_1.otf') format('opentype'); font-weight: 900; font-style: normal; }

:root {
    --vxb-primary: #6C5CE7;
    --vxb-text: #333;
    --vxb-input-border: #ccc;
    --vxb-w-d: 400px;
    --vxb-h-d: 600px;
    --vxb-font: 'DINPro', sans-serif;
    /* Defaults Fallback */
    --vxb-title-size: 24px;
    --vxb-sub-size: 13px;
    --vxb-h-align: center;
}

.vision-x-bot-floating-widget {
    position: fixed; bottom: 20px; right: 20px; z-index: 999999;
    display: flex; flex-direction: column; align-items: flex-end; 
    font-family: var(--vxb-font) !important; pointer-events: none;
}
.vision-x-bot-floating-widget * { font-family: var(--vxb-font) !important; pointer-events: auto; }

/* TEASER */
.vxb-teaser {
    position: absolute; bottom: 92px; right: 0; background: #fff; color: #333;
    padding: 8px 16px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-size: 14px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 10px;
    z-index: 999998; animation: vxb-float 3s ease-in-out infinite; transform-origin: bottom right;
}
.vxb-teaser::after {
    content: ''; position: absolute; bottom: -6px; right: 24px; width: 12px; height: 12px;
    background: #fff; transform: rotate(45deg);
}
.vxb-teaser-close { background: none; border: none; color: #999; font-size: 18px; cursor: pointer; padding: 0; line-height: 1; }
@keyframes vxb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* TOGGLE */
.vision-x-bot-toggle {
    width: 60px; height: 60px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); margin-top: 15px;
    transition: transform 0.2s; background-color: var(--vxb-primary) !important;
    -webkit-tap-highlight-color: transparent; border: 2px solid #fff;
}
.vision-x-bot-toggle.has-av {
    width: 65px; height: 65px; border-radius: 50%; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.vision-x-bot-toggle:active { transform: scale(0.95); }
.vision-x-bot-toggle img { width: 100%; height: 100%; object-fit: cover; }
.vision-x-bot-toggle svg { width: 28px; height: 28px; }

body.vision-x-bot-active .vision-x-bot-toggle { display: none !important; }

/* WINDOW */
.vision-x-bot-chat-window {
    width: var(--vxb-w-d); height: var(--vxb-h-d);
    background: #fff !important; border-radius: 16px; 
    box-shadow: 0 5px 30px rgba(0,0,0,0.2); border: 1px solid #e0e0e0;
    display: none; opacity: 0; transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex-direction: column; overflow: hidden; margin-bottom: 15px; 
}
.vision-x-bot-chat-window.show { display: flex !important; opacity: 1; transform: translateY(0); }

/* HEADER */
.vision-x-bot-widget-header {
    flex-shrink: 0; padding: 15px 20px; background-color: var(--vxb-primary) !important;
    color: #fff !important; display: grid; grid-template-columns: 70px 1fr 50px; align-items: center;
}
.vxb-header-left { display: flex; align-items: center; justify-content: flex-start; }
.vxb-header-img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.3); }

.vxb-head-txt { 
    /* VARIABLE ALIGNMENT */
    text-align: var(--vxb-h-align); 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.vxb-head-txt h3 { 
    margin: 0; 
    /* VARIABLE SIZE */
    font-size: var(--vxb-title-size); 
    font-weight: 900; color: #fff !important; 
}
.vxb-head-txt p { 
    margin: 2px 0 0 0; 
    /* VARIABLE SIZE */
    font-size: var(--vxb-sub-size); 
    font-weight: 400; opacity: 0.9; color: #fff !important; 
}
.vxb-header-right { display: flex; justify-content: flex-end; }
.vision-x-bot-close-btn { background: none; border: none; color: #fff !important; font-size: 32px; cursor: pointer; padding: 0; }

/* MESSAGES */
.vision-x-bot-chat-messages {
    flex-grow: 1; overflow-y: auto; padding: 20px; background: #f9f9f9;
    display: flex; flex-direction: column; gap: 15px; -webkit-overflow-scrolling: touch;
}
.vision-x-bot-message { display: flex; align-items: flex-end; max-width: 100%; }
.vision-x-bot-message.user { justify-content: flex-end; }
.vision-x-bot-message.bot { justify-content: flex-start; }

.vxb-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; overflow: hidden; margin-bottom: 2px; display: flex; align-items: center; justify-content: center; }
.vxb-avatar.bot { margin-right: 10px; }
.vxb-avatar.user { margin-left: 10px; }
.vxb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vxb-avatar.placeholder { background: #e0e0e0; color: #777; }
.vxb-avatar.placeholder.user { background: #d5d5d5; }

.vxb-msg-content {
    padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.5; font-weight: 400;
    max-width: 75%; word-wrap: break-word; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.vision-x-bot-message.user .vxb-msg-content { background-color: var(--vxb-primary) !important; color: #fff !important; border-bottom-right-radius: 4px; }
.vision-x-bot-message.bot .vxb-msg-content { background-color: var(--vxb-bg-bot) !important; color: var(--vxb-text) !important; border: 1px solid #eee; border-bottom-left-radius: 4px; }
.vxb-msg-content.typing { color: #999 !important; font-style: italic; padding: 8px 14px; }

/* INPUT */
.vision-x-bot-input-area {
    flex-shrink: 0; background: #fff; border-top: 1px solid #eee; 
    padding: 10px; display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap;
}
.vision-x-bot-attachments { width: 100%; flex-basis: 100%; order: -1; display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; padding: 0; }
.vxb-att-chip { font-size: 12px; background: #f0f0f0; padding: 4px 10px; border-radius: 12px; color: #555; border: 1px solid #ddd; font-weight: 500; display: inline-flex; align-items: center; }
.vxb-remove-att { margin-left: 8px; cursor: pointer; font-weight: 700; color: #999; font-size: 16px; padding: 2px; }
.vxb-remove-att:hover { color: #d63638; }

.vision-x-bot-input {
    flex: 1; border: 1px solid var(--vxb-input-border) !important; 
    border-radius: 24px; padding: 8px 14px; max-height: 100px; 
    resize: none; outline: none; font-family: inherit; color: var(--vxb-text) !important; background: #fcfcfc;
    font-size: 15px !important; font-weight: 400; -webkit-appearance: none;
}
.vision-x-bot-input:focus { border-color: var(--vxb-primary) !important; background: #fff; }
.vision-x-bot-send-btn {
    color: #fff !important; border: none; padding: 8px 18px; border-radius: 24px; 
    cursor: pointer; font-weight: 500; font-size: 15px; background-color: var(--vxb-primary) !important; flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.vision-x-bot-attach-btn { background: none; border: none; cursor: pointer; font-size: 20px; padding: 6px; color: #999; flex-shrink: 0; }

/* FOOTER */
.vision-x-bot-footer {
    flex-shrink: 0; font-size: 11px; text-align: center; color: #aaa; padding: 8px; 
    border-top: 1px solid #f9f9f9; background: #fff; font-weight: 300;
    padding-bottom: env(safe-area-inset-bottom, 8px);
}
.vision-x-bot-footer a { color: var(--vxb-primary) !important; text-decoration: none; font-weight: 500; }

/* MOBILE */
@media (max-width: 480px) {
    .vision-x-bot-chat-window { 
        width: 100% !important; height: 100dvh !important; max-height: 100dvh !important;
        position: fixed; bottom: 0; right: 0; left: 0; top: 0; border-radius: 0; margin: 0; z-index: 1000000;
    }
    .vision-x-bot-floating-widget { right: 20px; left: auto; bottom: 20px; align-items: flex-end; }
    .vision-x-bot-toggle { position: fixed; bottom: 20px; right: 20px; z-index: 999999; }
    .vxb-teaser { display: none !important; }
    body.vision-x-bot-active .vision-x-bot-toggle { display: none; }
    .vision-x-bot-input { font-size: 16px; }
}

/* ANIMATIONS */
.vxb-dots { display: inline-flex; gap: 4px; align-items: center; height: 12px; }
.vxb-dots span { width: 6px; height: 6px; background: #999; border-radius: 50%; animation: vxb-bounce 1.4s infinite ease-in-out both; }
.vxb-dots span:nth-child(1) { animation-delay: -0.32s; }
.vxb-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes vxb-bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

.vxb-wave { display: inline-flex; gap: 3px; align-items: flex-end; height: 16px; }
.vxb-wave span { width: 3px; height: 6px; background: #999; animation: vxb-wave-anim 1s infinite ease-in-out; }
.vxb-wave span:nth-child(2) { animation-delay: 0.1s; }
.vxb-wave span:nth-child(3) { animation-delay: 0.2s; }
@keyframes vxb-wave-anim { 0%,100% { height: 6px; } 50% { height: 14px; } }

.vxb-spinner { width: 16px; height: 16px; border: 2px solid #e0e0e0; border-top-color: #888; border-radius: 50%; animation: vxb-spin 0.8s linear infinite; }
@keyframes vxb-spin { to { transform: rotate(360deg); } }