/* BVN Chat Widget - V2 - Gelişmiş Widget CSS */

/* CSS Variables - Backend'den yüklenen ayarlar */
:root {
    --bvn-primary-color: #1a73e8;
    --bvn-text-color: #ffffff;
    --bvn-bg-color: #f5f5f5;
    --bvn-user-bubble-color: #1a73e8;
    --bvn-user-text-color: #ffffff;
    --bvn-user-avatar-bg-color: #1a73e8;
    --bvn-bot-bubble-color: #ffffff;
    --bvn-bot-text-color: #333333;
    --bvn-input-bg-color: #ffffff;
    --bvn-input-border-color: #e0e0e0;
    --bvn-job-input-text-color: var(--bvn-bot-text-color, #333333);
    --bvn-job-input-placeholder-color: #6b7280;
    --bvn-font-family: system-ui, -apple-system, sans-serif;
    --bvn-font-size: 14px;
    --bvn-font-weight: 400;
    --bvn-chat-width: 380px;
    --bvn-chat-height: 550px;
}

/* CSS Reset - Widget'ın dış site stillerinden izolasyonu */
.bvn-chat-widget,
.bvn-chat-widget *,
.bvn-chat-widget *::before,
.bvn-chat-widget *::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
}

.bvn-chat-widget * {
    font-family: var(--bvn-font-family) !important;
    line-height: inherit;
}

/* Body scroll kilidi (mobil tam ekran deneyimi için) */
html.bvn-chat-scroll-locked,
body.bvn-chat-scroll-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

body.bvn-chat-scroll-locked {
    position: fixed !important;
    width: 100%;
    left: 0;
    right: 0;
    touch-action: none;
}

body.bvn-chat-scroll-locked #bvn-chat-widget-container,
body.bvn-chat-scroll-locked .bvn-chat-widget,
body.bvn-chat-scroll-locked .bvn-chat-widget * {
    touch-action: auto;
}

/* Widget Container */
.bvn-chat-widget {
    position: fixed !important;
    z-index: 999999 !important;
    font-family: var(--bvn-font-family) !important;
    font-size: var(--bvn-font-size) !important;
    font-weight: var(--bvn-font-weight) !important;
}

.bvn-chat-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 999998 !important;
    display: none;
    pointer-events: auto;
    touch-action: none;
}

.bvn-chat-overlay.visible {
    display: block;
}

/* Position variants */
.bvn-chat-widget.bottom-right {
    bottom: 20px;
    right: 20px;
}

.bvn-chat-widget.bottom-left {
    bottom: 20px;
    left: 20px;
}

.bvn-chat-widget.top-right {
    top: 20px;
    right: 20px;
}

.bvn-chat-widget.top-left {
    top: 20px;
    left: 20px;
}

/* Chat Button */
.bvn-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bvn-toggle-button-color, #1a73e8) !important;
    color: white;
    border: none;
    cursor: pointer;
    /* box-shadow ve filter JavaScript'ten dinamik olarak ayarlanıyor - CSS'te hiçbir default değer vermiyoruz */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    position: relative;
    overflow: hidden; /* Video için overflow hidden */
}

/* Hover efektleri JavaScript'ten kontrol ediliyor */
.bvn-chat-button:hover {
    transform: scale(1.1);
    /* box-shadow ve filter JavaScript'ten ayarlanıyor */
}

.bvn-chat-button:active {
    transform: scale(0.95);
}

/* Notification badge */
.bvn-chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* AI Animation Speech Bubble */
.bvn-chat-speech-bubble {
    position: absolute;
    bottom: 75px;
    right: 0;
    background: white;
    color: #333333;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.4;
    min-width: 25ch;
    max-width: 32ch;
    width: auto;
    z-index: 1000001 !important;
    animation: speechBubbleFadeIn 0.3s ease;
    pointer-events: auto;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    white-space: normal !important;
    word-break: normal !important;
    display: block !important;
}

/* Konuşma balonu içeriği */
.bvn-chat-speech-bubble-content {
    padding-right: 24px;
    word-break: normal !important;
    overflow-wrap: normal !important;
    white-space: normal !important;
    word-wrap: normal !important;
}

/* Konuşma balonu kapatma butonu - Sağ üst köşede */
.bvn-chat-speech-bubble-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #666;
    font-size: 18px;
    line-height: 1;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    z-index: 1000002 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bvn-chat-speech-bubble-close:hover {
    background-color: #f0f0f0;
    color: #333;
    transform: scale(1.1);
}

.bvn-chat-speech-bubble-close:active {
    transform: scale(0.95);
}

.bvn-chat-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

@keyframes speechBubbleFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes speechBubbleFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Position variants for speech bubble */
.bvn-chat-widget.bottom-right .bvn-chat-speech-bubble {
    right: 0;
}

.bvn-chat-widget.bottom-left .bvn-chat-speech-bubble {
    left: 0;
    right: auto;
}

.bvn-chat-widget.bottom-left .bvn-chat-speech-bubble::after {
    left: 20px;
    right: auto;
}

.bvn-chat-widget.top-right .bvn-chat-speech-bubble {
    bottom: auto;
    top: 70px;
    right: 0;
}

.bvn-chat-widget.top-right .bvn-chat-speech-bubble::after {
    bottom: auto;
    top: -8px;
    border-top: none;
    border-bottom: 8px solid white;
}

.bvn-chat-widget.top-left .bvn-chat-speech-bubble {
    bottom: auto;
    top: 70px;
    left: 0;
    right: auto;
}

.bvn-chat-widget.top-left .bvn-chat-speech-bubble::after {
    bottom: auto;
    top: -8px;
    left: 20px;
    right: auto;
    border-top: none;
    border-bottom: 8px solid white;
}

/* Chat Window */
.bvn-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: var(--bvn-chat-width);
    max-width: calc(100vw - 40px);
    height: var(--bvn-chat-height);
    max-height: calc(100vh - 120px);
    background: white !important;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
    transition: all 0.3s ease;
}

.bvn-chat-window.open {
    display: flex;
}

/* Full Screen Mode */
.bvn-chat-window.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    z-index: 999999 !important;
    animation: fullscreenIn 0.3s ease;
    overscroll-behavior: contain;
}

/* Tam ekran modunda chat butonunu gizle */
.bvn-chat-widget:has(.bvn-chat-window.fullscreen) .bvn-chat-button {
    display: none !important;
}

/* Tam ekran modunda input wrapper'ın düzgün yerleşimi */
.bvn-chat-window.fullscreen .bvn-chat-input-wrapper {
    position: relative !important;
    z-index: 10 !important;
    background: white !important;
}

/* Tam ekran modunda powered by badge */
.bvn-chat-window.fullscreen .bvn-powered-by {
    position: relative !important;
    z-index: 5 !important;
}

@keyframes fullscreenIn {
    from {
        transform: scale(0.95);
        opacity: 0.9;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Chat Header */
.bvn-chat-header {
    background: var(--bvn-primary-color) !important;
    color: var(--bvn-text-color) !important;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    min-height: fit-content;
}

.bvn-chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bvn-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dil Değiştirici - Tek EN Butonu (Toggle) */
.bvn-lang-btn {
    background: none;
    border: none;
    color: var(--bvn-text-color, #ffffff) !important;
    font-size: 13px;
    font-weight: 400;
    padding: 6px 10px;
    cursor: pointer !important;
    transition: all 0.2s ease;
    opacity: 0.5;
    border-radius: 4px;
    min-width: 32px;
    text-align: center;
}

.bvn-lang-btn:hover {
    opacity: 0.9 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.05);
}

.bvn-lang-btn:active {
    transform: scale(0.95);
}

/* Full Screen Button */
.bvn-fullscreen-btn {
    background: none;
    border: none;
    color: var(--bvn-text-color, #ffffff) !important;
    font-size: 18px;
    padding: 4px 8px;
    cursor: pointer !important;
    transition: all 0.2s ease;
    opacity: 0.8;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bvn-fullscreen-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.1);
}

.bvn-fullscreen-btn:active {
    transform: scale(0.95);
}

.bvn-chat-avatar {
    /* Width and height controlled dynamically by JavaScript */
    min-width: 0;
    min-height: 0;
    max-width: 200px;
    max-height: 200px;
    border-radius: 0;
    background: transparent;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: visible;
    flex-shrink: 0;
    width: 0;
    height: 0;
}

.bvn-chat-avatar:empty {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* Logo varsa avatar'ı göster (JavaScript ile display: flex yapılacak) */
.bvn-chat-avatar:has(img) {
    display: flex;
}

.bvn-chat-avatar img {
    /* Size controlled by inline styles from JavaScript */
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bvn-chat-header-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: inherit !important;
    background: transparent !important;
}

.bvn-chat-header-status {
    font-size: 12px;
    opacity: 0.9;
    margin: 2px 0 0 0;
    color: inherit !important;
    background: transparent !important;
}

.bvn-chat-reset,
.bvn-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.8;
}

.bvn-chat-reset:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bvn-chat-reset:disabled:hover {
    background: none;
    opacity: 0.3;
}

.bvn-chat-reset:hover,
.bvn-chat-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.bvn-chat-reset:active,
.bvn-chat-close:active {
    opacity: 0.6;
}

/* Chat Messages */
.bvn-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bvn-bg-color) !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bvn-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.bvn-chat-messages::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.bvn-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.bvn-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Message Bubble */
.bvn-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 85%;
}

.bvn-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bvn-message.assistant {
    align-self: flex-start;
}

.bvn-message-avatar {
    width: 0;
    height: 0;
    border-radius: 50%;
    background: transparent;
    color: transparent;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0;
    flex-shrink: 0;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
}

/* Logo varsa avatar'ı göster (JavaScript ile display: flex yapılacak) */
.bvn-message-avatar:has(img) {
    display: flex;
    width: 36px;
    height: 36px;
    background: var(--bvn-primary-color, #1a73e8);
    color: white;
    font-size: 16px;
}

/* Boş avatar container'ları tamamen gizle (robot ikonu gösterilmesin) */
.bvn-message-avatar:empty {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.bvn-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    background: white;
    border-radius: 50%;
}

.bvn-message-avatar:empty,
.bvn-message-avatar:not(:has(img)):not(:has(*)) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bvn-message.user .bvn-message-avatar {
    background: var(--bvn-user-avatar-bg-color);
}

.bvn-message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--bvn-bot-bubble-color) !important;
    color: var(--bvn-bot-text-color) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    font-size: var(--bvn-font-size);
    line-height: 1.5;
}

.bvn-message.user .bvn-message-bubble {
    background: var(--bvn-user-bubble-color) !important;
    color: var(--bvn-user-text-color) !important;
}

.bvn-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

/* Typing Indicator */
.bvn-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    width: fit-content;
}

.bvn-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typingDot 1.4s infinite;
}

.bvn-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.bvn-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Chat Input */
.bvn-chat-input-wrapper {
    padding: 16px 20px;
    background: white !important;
    border-top: 1px solid #e0e0e0;
    position: relative;
}

.bvn-chat-input {
    width: 100%;
    border: 1px solid var(--bvn-input-border-color);
    border-radius: 8px;
    padding: 12px 50px 12px 16px;
    font-size: var(--bvn-font-size);
    font-family: var(--bvn-font-family);
    background: var(--bvn-input-bg-color) !important;
    resize: none;
    max-height: 100px;
    outline: none;
    transition: border-color 0.2s;
    /* CSS Isolation - Dış site stillerini override et */
    color: #333333 !important;
    caret-color: #333333 !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    /* Scrollbar - Başlangıçta gizli */
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
}

/* İkinci satıra geçtiğinde scroll göster */
.bvn-chat-input.has-scroll {
    overflow-y: auto;
}

/* Scrollbar stilleri - sadece scroll varken görünür */
.bvn-chat-input.has-scroll::-webkit-scrollbar {
    width: 6px;
}

.bvn-chat-input.has-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.bvn-chat-input.has-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.bvn-chat-input.has-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.bvn-chat-input:focus {
    border-color: var(--bvn-input-border-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.bvn-chat-input::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.bvn-chat-send-button {
    position: absolute;
    right: 26px;
    bottom: 22px;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: transparent;
    color: #666;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
    box-shadow: none;
}

.bvn-chat-send-button:hover:not(:disabled) {
    color: var(--bvn-primary-color, #1a73e8);
    background: rgba(26, 115, 232, 0.05);
}

.bvn-chat-send-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Job Question Inline Input */
.bvn-job-answer-wrapper {
    margin-top: 12px;
}

.bvn-job-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.bvn-job-input {
    flex: 1;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--bvn-input-border-color, #e0e0e0);
    border-radius: 20px;
    font-size: var(--bvn-font-size, 14px);
    font-weight: var(--bvn-font-weight, 400);
    font-family: var(--bvn-font-family, system-ui, -apple-system, sans-serif) !important;
    background-color: var(--bvn-input-bg-color, #ffffff);
    color: var(--bvn-job-input-text-color, var(--bvn-bot-text-color, #333333));
    caret-color: var(--bvn-job-input-text-color, var(--bvn-bot-text-color, #333333));
    resize: none;
    line-height: 1.5;
    min-height: 40px;
    max-height: 120px;
    overflow-y: hidden;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bvn-job-input::placeholder {
    color: var(--bvn-job-input-placeholder-color, #6b7280);
    opacity: 1;
}

.bvn-job-input.has-scroll {
    overflow-y: auto;
}

.bvn-job-input.has-scroll::-webkit-scrollbar {
    width: 6px;
}

.bvn-job-input.has-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.bvn-job-input.has-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.bvn-job-input.has-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.bvn-job-input:focus {
    outline: none;
    border-color: var(--bvn-primary-color, #1a73e8);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.12);
}

.bvn-job-input:disabled {
    background: #f5f5f5;
    opacity: 0.75;
    cursor: not-allowed;
}

.bvn-job-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: var(--bvn-primary-color, #1a73e8);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.bvn-job-send-btn:hover:not(:disabled) {
    background-color: var(--bvn-primary-color-hover, #1557b0);
    transform: translateY(-1px);
}

.bvn-job-send-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.bvn-job-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bvn-job-send-btn svg {
    pointer-events: none;
}

@keyframes bvn-job-slide-out-left {
    to {
        opacity: 0;
        transform: translateX(-24px);
    }
}

.bvn-job-dismiss {
    animation: bvn-job-slide-out-left 0.3s ease forwards;
}

/* Welcome Message */
.bvn-welcome-message {
    text-align: center;
    padding: 60px 30px;
    color: #666 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: transparent !important;
}

.bvn-welcome-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: wave 1.5s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.bvn-welcome-message h3 {
    margin: 0 0 20px 0;
    font-size: 28px;
    color: #333 !important;
    font-weight: 600;
    background: transparent !important;
}

.bvn-welcome-message p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: inherit !important;
    background: transparent !important;
}

/* Error State */
.bvn-error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

/* Powered By Badge */
.bvn-powered-by {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: #999 !important;
    background: #fafafa !important;
    border-top: 1px solid #f0f0f0;
}

.bvn-powered-by a {
    color: var(--bvn-primary-color, #1a73e8);
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .bvn-chat-widget.bottom-right {
        bottom: 10px;
        right: 10px;
        left: auto;
    }

    .bvn-chat-widget.bottom-left {
        bottom: 10px;
        left: 10px;
        right: auto;
    }
    
    .bvn-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 70px;
        right: 0;
        left: 0;
        margin: 0 auto;
        max-width: none;
    }
    
    .bvn-chat-button {
        width: 56px;
        height: 56px;
        font-size: 30px;
    }
    
    /* Mobile'da daha iyi görünüm için header butonları */
    .bvn-chat-header-actions {
        gap: 8px;
    }
    
    .bvn-lang-btn {
        font-size: 12px;
        padding: 4px 8px;
        min-width: 28px;
    }
    
    .bvn-fullscreen-btn {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
    
    .bvn-fullscreen-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Accessibility */
.bvn-chat-button:focus,
.bvn-chat-reset:focus,
.bvn-chat-close:focus,
.bvn-chat-send-button:focus,
.bvn-fullscreen-btn:focus {
    outline: 2px solid var(--bvn-primary-color, #1a73e8);
    outline-offset: 2px;
}

/* Loading State */
.bvn-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.bvn-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--bvn-primary-color, #1a73e8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* TechSpec Tablo Stilleri */
.techspec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.techspec-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.techspec-table thead th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #5568d3;
}

.techspec-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.techspec-table tbody tr:hover {
    background-color: #f5f7ff;
}

.techspec-table tbody tr:nth-child(even) {
    background-color: #f9f9fb;
}

.techspec-table tbody tr:nth-child(even):hover {
    background-color: #f0f2ff;
}

.techspec-table tbody td {
    padding: 10px;
    color: #333;
    vertical-align: middle;
}

.techspec-table tbody td:first-child {
    font-weight: 500;
    color: #1a1a1a;
}

/* Responsive tablo */
@media (max-width: 600px) {
    .techspec-table {
        font-size: 11px;
    }
    
    .techspec-table thead th,
    .techspec-table tbody td {
        padding: 8px 6px;
    }
}

/* Tablo başlıkları için özel stil */
.bvn-message-bubble h4 {
    margin: 10px 0 8px 0;
    color: #333 !important;
    font-size: 15px;
    font-weight: 600;
    background: transparent !important;
}

.bvn-message-bubble h3 {
    margin: 10px 0 8px 0;
    color: #333 !important;
    font-size: 16px;
    font-weight: 600;
    background: transparent !important;
}

/* Mesaj bubble'ında overflow fix */
.bvn-message-bubble {
    overflow-x: auto;
}

/* ============================================ */
/* Autocomplete Dropdown */
/* ============================================ */

.bvn-autocomplete-dropdown {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white !important;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid #e0e0e0;
}

.bvn-autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.bvn-autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.bvn-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.bvn-autocomplete-group {
    border-bottom: 1px solid #f0f0f0;
}

.bvn-autocomplete-group:last-child {
    border-bottom: none;
}

.bvn-autocomplete-group-title {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f8f8f8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.bvn-autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.bvn-autocomplete-item:last-child {
    border-bottom: none;
}

.bvn-autocomplete-item:hover,
.bvn-autocomplete-item.active {
    background: linear-gradient(90deg, #f0f7ff 0%, #e3f2fd 100%);
}

.bvn-autocomplete-item-label {
    font-size: var(--bvn-font-size);
    color: #333 !important;
    font-weight: 500;
    margin-bottom: 4px;
    background: transparent !important;
}

.bvn-autocomplete-item-desc {
    font-size: 12px;
    color: #666 !important;
    margin-top: 4px;
    background: transparent !important;
}

/* Autocomplete Responsive */
@media (max-width: 480px) {
    .bvn-autocomplete-dropdown {
        left: 10px;
        right: 10px;
    }
}

/* ========================================
   Consent Banner (Minimal - Chat içinde)
   ======================================== */
.bvn-consent-banner {
    padding: 15px;
    background: #f5f5f5 !important;
    border-radius: 8px;
    margin: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.bvn-consent-banner-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bvn-consent-link {
    color: #1a73e8;
    font-weight: 600;
    text-decoration: underline;
    font-size: 14px;
    transition: opacity 0.2s;
}

.bvn-consent-link:hover {
    opacity: 0.7;
    color: #0d47a1;
}

.bvn-consent-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333333 !important;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    background: transparent !important;
}

.bvn-consent-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bvn-consent-continue {
    padding: 10px 20px;
    background: var(--bvn-consent-button-color, var(--bvn-primary-color, #1a73e8)) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.bvn-consent-continue:hover:not(:disabled) {
    background: var(--bvn-consent-button-color, var(--bvn-primary-color, #1a73e8)) !important;
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bvn-consent-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #cccccc;
}

/* ========================================
   Consent Popup (Parent window'da açılan)
   ======================================== */
.bvn-consent-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    /* CSS Isolation */
    font-family: system-ui, -apple-system, sans-serif !important;
    box-sizing: border-box !important;
}

.bvn-consent-popup-overlay *,
.bvn-consent-popup-overlay *::before,
.bvn-consent-popup-overlay *::after {
    box-sizing: border-box !important;
}

.bvn-consent-popup {
    background: white !important;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: bvn-popup-in 0.3s ease-out;
}

@keyframes bvn-popup-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.bvn-consent-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff !important;
}

.bvn-consent-popup-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333 !important;
    background: transparent !important;
}

.bvn-consent-popup-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.bvn-consent-popup-close:hover {
    background: #f5f5f5;
    color: #333;
}

.bvn-consent-popup-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff !important;
}

.bvn-consent-popup-text {
    color: #333 !important;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: transparent !important;
}

/* ========================================
   CTA (Call-to-Action) Butonları
   ======================================== */

/* CTA Buttons Container - Input'un hemen üstünde */
/* CTA & Attachment Row */
.bvn-cta-attachment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px 8px 15px;
    background: #f8f9fa !important;
    border-top: 1px solid #e0e0e0;
    position: relative;
}

.bvn-cta-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

/* Attachment Button */
.bvn-attachment-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--bvn-attachment-button-color, #1a73e8);
    color: var(--bvn-attachment-text-color, #ffffff);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
}

.bvn-attachment-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bvn-attachment-button:active {
    transform: scale(0.95);
}

/* Attachment Dropdown - Yukarıya doğru açılan */
.bvn-attachment-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: auto;
    min-width: 200px;
    max-width: 320px;
    background: transparent;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 100;
}

.bvn-attachment-dropdown-show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Attachment Content */
.bvn-attachment-content {
    max-height: 320px;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Scrollbar - gizli */
.bvn-attachment-content::-webkit-scrollbar {
    width: 0;
    display: none;
}

.bvn-attachment-content {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Attachment Link Button - CTA stili */
.bvn-attachment-link-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: var(--bvn-attachment-button-color, #1a73e8);
    color: var(--bvn-attachment-text-color, #ffffff);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.bvn-attachment-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    filter: brightness(1.08);
}

.bvn-attachment-link-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* CTA Button */
.bvn-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bvn-cta-button-color, #1a73e8);
    color: var(--bvn-cta-text-color, #ffffff);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.bvn-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.bvn-cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bvn-cta-icon {
    font-size: 16px;
    line-height: 1;
}

.bvn-cta-text {
    line-height: 1;
}

/* ========================================
   CTA Form Modal
   ======================================== */

.bvn-cta-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    padding: 20px;
    animation: bvn-fade-in 0.2s ease-out;
    /* CSS Isolation */
    font-family: system-ui, -apple-system, sans-serif !important;
    box-sizing: border-box !important;
}

.bvn-cta-modal-overlay *,
.bvn-cta-modal-overlay *::before,
.bvn-cta-modal-overlay *::after {
    box-sizing: border-box !important;
}

.bvn-cta-modal {
    background: white !important;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: bvn-modal-in 0.3s ease-out;
}

@keyframes bvn-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bvn-modal-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.bvn-cta-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
}

.bvn-cta-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
}

.bvn-cta-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.bvn-cta-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* CTA Form */
.bvn-cta-form {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff !important;
}

.bvn-cta-form-group {
    margin-bottom: 16px;
}

.bvn-cta-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333 !important;
    font-size: 14px;
    background: transparent !important;
}

.bvn-cta-form-group input:not([type="checkbox"]),
.bvn-cta-form-group textarea,
.bvn-cta-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
    /* CSS Isolation - Dış site stillerini override et */
    background: #ffffff !important;
    color: #333333 !important;
    caret-color: #333333 !important;
    line-height: 1.5 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.bvn-cta-form-group input:not([type="checkbox"])::placeholder,
.bvn-cta-form-group textarea::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.bvn-cta-form-group input:not([type="checkbox"]):focus,
.bvn-cta-form-group textarea:focus,
.bvn-cta-form-group select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.bvn-cta-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox wrapper styling (eski .bvn-cta-checkbox-label yerine) */
.bvn-checkbox-wrapper {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    cursor: pointer !important;
    user-select: none !important;
    padding: 8px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background: #fafafa !important;
    transition: all 0.2s !important;
}

.bvn-checkbox-wrapper:hover {
    background: #f0f0f0 !important;
    border-color: #bbb !important;
}

.bvn-checkbox-wrapper input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    margin-top: 3px !important;
    flex-shrink: 0 !important;
}

.bvn-checkbox-wrapper span {
    flex: 1 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333 !important;
}

.bvn-cta-submit-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.bvn-cta-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.bvn-cta-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 480px) {
    .bvn-consent-popup {
        max-width: 100%;
        max-height: 90vh;
    }
    
    .bvn-consent-banner {
        margin: 8px;
        padding: 12px;
    }
    
    .bvn-consent-banner-content {
        gap: 10px;
    }
    
    .bvn-cta-attachment-row {
        padding: 10px 12px 6px 12px;
        gap: 8px;
    }
    
    .bvn-cta-buttons-container {
        gap: 6px;
    }
    
    .bvn-cta-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .bvn-attachment-button {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .bvn-attachment-dropdown {
        min-width: 180px;
        max-width: calc(100vw - 40px);
    }
    
    .bvn-attachment-content {
        max-height: 280px;
        padding: 0;
        gap: 10px;
    }
    
    .bvn-attachment-link-btn {
        padding: 9px 14px;
        font-size: 12px;
    }
    
    .bvn-cta-modal {
        max-width: 100%;
        max-height: 90vh;
    }
    
    .bvn-cta-modal-header {
        padding: 15px;
    }
    
    .bvn-cta-form {
        padding: 15px;
    }
}

