/* ═══════════════════════════════════════════════════════
   Diş AI Asistan v4 — Premium Chat Widget CSS
   ═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --sch-primary: #0ea5e9;
    --sch-primary-d: #0284c7;
    --sch-primary-l: #7dd3fc;
    --sch-primary-bg: #f0f9ff;
    --sch-text: #ffffff;
    --sch-dark: #0f172a;
    --sch-body: #f1f5f9;
    --sch-gray-50: #f8fafc;
    --sch-gray-100: #f1f5f9;
    --sch-gray-200: #e2e8f0;
    --sch-gray-300: #cbd5e1;
    --sch-gray-400: #94a3b8;
    --sch-gray-500: #64748b;
    --sch-gray-600: #475569;
    --sch-white: #ffffff;
    --sch-radius: 20px;
    --sch-shadow: 0 25px 60px -12px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .03);
    --sch-font: 'Inter', system-ui, -apple-system, sans-serif;
}

#sohbet-chat-widget-root,
#sohbet-chat-widget-root * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--sch-font);
    -webkit-font-smoothing: antialiased;
}

/* ── TEMA İZOLASYONU — Elementor/Tema CSS'inin widget'a sızmasını engelle ── */
/* Sadece chat kutusu İÇİNDEKİ elementleri sıfırla — trigger butona dokunma */
#sohbet-chat-widget-root .sch-chat-box button,
#sohbet-chat-widget-root .sch-chat-box input,
#sohbet-chat-widget-root .sch-chat-box textarea {
    background-color: transparent;
    background-image: none !important;
    color: inherit;
    border: none;
    box-shadow: none;
    outline: none;
    font-family: var(--sch-font) !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

#sohbet-chat-widget-root .sch-chat-box button:hover,
#sohbet-chat-widget-root .sch-chat-box button:focus,
#sohbet-chat-widget-root .sch-chat-box button:active,
#sohbet-chat-widget-root .sch-chat-box input:focus {
    background-image: none !important;
    outline: none !important;
}

#sohbet-chat-widget-root .sch-chat-box button::before,
#sohbet-chat-widget-root .sch-chat-box button::after {
    display: none !important;
    content: none !important;
}

/* ═ 1. TETİKLEYİCİ BUTON ═════════════════════════════ */
.sch-trigger {
    position: fixed;
    bottom: 24px;
    z-index: 999998;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sch-primary) 0%, var(--sch-primary-d) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(14, 165, 233, .45), 0 0 0 4px rgba(14, 165, 233, .12);
    transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
    outline: none;
}

.sch-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 36px rgba(14, 165, 233, .55), 0 0 0 6px rgba(14, 165, 233, .15);
}

.sch-trigger:active {
    transform: scale(.92);
}

.sch-trigger.sch-right {
    right: 24px;
}

.sch-trigger.sch-left {
    left: 24px;
}

.sch-trigger svg {
    width: 28px;
    height: 28px;
    fill: var(--sch-text);
    transition: all .4s cubic-bezier(.34, 1.56, .64, 1);
    position: absolute;
}

.sch-trigger .sch-icon-chat {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.sch-trigger .sch-icon-close {
    opacity: 0;
    transform: scale(.3) rotate(-90deg);
}

.sch-trigger.open .sch-icon-chat {
    opacity: 0;
    transform: scale(.3) rotate(90deg);
}

.sch-trigger.open .sch-icon-close {
    opacity: 1;
    transform: scale(1) rotate(0);
}

/* Pulse ring */
.sch-trigger::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2.5px solid var(--sch-primary-l);
    opacity: 0;
    animation: sch-pulse 2.5s infinite 1.5s;
}

.sch-trigger.open::after {
    animation: none;
    opacity: 0;
}

@keyframes sch-pulse {
    0% {
        transform: scale(1);
        opacity: .6;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

/* Badge */
.sch-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #f43f5e, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2.5px solid #fff;
    animation: sch-pop .35s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, .35);
}

@keyframes sch-pop {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.sch-badge.hidden {
    display: none;
}

/* ═ ANIMATED TOOLTIP ══════════════════════════════════ */
.sch-tooltip {
    position: fixed;
    bottom: 36px;
    z-index: 999997;
    background: var(--sch-white);
    color: var(--sch-dark);
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .04);
    white-space: nowrap;
    animation: sch-tooltip-in .6s cubic-bezier(.34, 1.56, .64, 1) .8s both,
        sch-tooltip-float 3s ease-in-out 1.4s infinite;
    cursor: pointer;
    transition: opacity .3s, transform .3s;
}

.sch-tooltip.sch-right {
    right: 100px;
}

.sch-tooltip.sch-left {
    left: 100px;
}

.sch-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
}

.sch-tooltip.sch-right::after {
    right: -12px;
    border-left-color: var(--sch-white);
}

.sch-tooltip.sch-left::after {
    left: -12px;
    border-right-color: var(--sch-white);
}

.sch-tooltip.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(.8) !important;
    animation: none !important;
}

@keyframes sch-tooltip-in {
    from {
        opacity: 0;
        transform: translateX(20px) scale(.8);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes sch-tooltip-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* ═ 2. CHAT KUTUSU ════════════════════════════════════ */
.sch-chat-box {
    position: fixed;
    bottom: 104px;
    z-index: 999999;
    width: 420px;
    max-width: calc(100vw - 20px);
    height: 640px;
    max-height: 82vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(.82) translateY(24px);
    pointer-events: none;
    transition: all .4s cubic-bezier(.34, 1.56, .64, 1);
}

.sch-chat-box.sch-right {
    right: 24px;
    transform-origin: bottom right;
}

.sch-chat-box.sch-left {
    left: 24px;
    transform-origin: bottom left;
}

.sch-chat-box.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* ── Header ──────────────────────────────────────────── */
/* --- ÜST BİLGİ VE KONTROL ALANI (HEADER) TASARIMI --- */

/* Ana Kapsayıcı: Ferah ve temiz arka plan */
.sch-header {
    display: flex !important;
    align-items: center !important;
    padding: 16px 20px !important;
    background: transparent !important;
    border-bottom: none !important;
    border-radius: 24px 24px 0 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
    /* Çok hafif bir derinlik */
}

/* Asistan Avatarı */
.sch-header-avatar {
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

/* İsim ve Durum Yazılarının Kapsayıcısı */
.sch-header-info {
    display: flex !important;
    flex-direction: column !important;
    margin-left: 15px !important;
    justify-content: center !important;
}

/* Asistanın İsmi */
.sch-header-name {
    font-family: 'Inter', sans-serif, Arial !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    /* Simsiyah yerine tok ve premium bir lacivert/gri */
    line-height: 1.2 !important;
    margin-bottom: 3px !important;
}

/* Çevrimiçi Durumu Yazısı */
.sch-header-status {
    display: flex !important;
    align-items: center !important;
    font-family: 'Inter', sans-serif, Arial !important;
    font-size: 12.5px !important;
    color: #64748b !important;
    /* Yumuşak bir gri */
    font-weight: 500 !important;
}

/* Çevrimiçi Yeşil Nokta (Hareli ve Şık) */
.sch-online-dot {
    width: 8px !important;
    height: 8px !important;
    background-color: #10b981 !important;
    /* Canlı, güven veren modern bir yeşil */
    border-radius: 50% !important;
    margin-right: 6px !important;
    display: inline-block !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
    /* Etrafında çok hafif bir parlama/hare efekti yaratır */
}

/* Kapatma Butonu Kapsayıcısı */
.sch-header-actions {
    margin-left: auto !important;
    /* Çarpı butonunu en sağa yapıştırır */
    display: flex !important;
    align-items: center !important;
}

/* Kapatma Butonu (Çarpı) */
.sch-header-btn {
    background: transparent !important;
    border: none !important;
    padding: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    color: #94a3b8 !important;
    /* Pasif ikon rengi */
    margin: 0 !important;
}

/* Mouse ile çarpının üzerine gelince */
.sch-header-btn:hover {
    background: #f1f5f9 !important;
    /* Hafif gri yuvarlak bir arka plan belirir */
    color: #ef4444 !important;
    /* Çarpı ikonu hafif kırmızımsı olarak 'kapat' uyarısı verir */
}

.sch-header-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    /* Rengi otomatik olarak hover durumundan alır */
}

/* ── Manuel Mod Tasarım (Premium Light EnquiryBot) ───────────── */
.sch-manual-mode {
    border-radius: 24px;
    box-shadow: 0 25px 80px -12px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
    width: 420px !important;
    max-width: calc(100vw - 20px);
    height: 640px;
    max-height: 82vh;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.sch-manual-mode .sch-header {
    background: transparent;
    padding: 20px 22px;
    border-radius: 24px 24px 0 0;
    position: relative;
    border-bottom: none;
}

.sch-manual-mode .sch-header-avatar {
    display: block;
    width: 42px;
    height: 42px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
}

.sch-manual-mode .sch-header-info {
    display: block;
}

.sch-manual-mode .sch-header-name {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.sch-manual-mode .sch-header-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.sch-manual-mode .sch-header-actions {
    margin-left: auto;
}

.sch-manual-mode .sch-header-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    width: 36px;
    height: 36px;
}

.sch-manual-mode .sch-header-btn svg {
    fill: #fff;
}

.sch-manual-mode .sch-header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sch-manual-mode .sch-body {
    padding: 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.sch-manual-mode .sch-footer {
    border-top: none;
    background: transparent;
    padding: 0;
    border-radius: 0 0 24px 24px;
    display: none;
    /* Başlangıçta gizli */
    flex-direction: column;
    align-items: center;
}

.sch-manual-mode .sch-footer.sch-footer-visible {
    display: flex;
}

/* Hap şeklinde (Pill) input kapsayıcı */
.sch-manual-mode .sch-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 6px 6px 15px;
    margin: 0 20px 20px 20px;
    width: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s;
}

.sch-manual-mode .sch-input-wrapper:focus-within {
    border-color: var(--sch-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.08);
}

.sch-manual-mode .sch-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #0f172a;
    padding: 8px 0;
}

.sch-manual-mode .sch-input::placeholder {
    color: #94a3b8;
}

.sch-manual-mode .sch-send-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #000000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: static;
    transform: none;
    box-shadow: none;
    flex-shrink: 0;
}

.sch-manual-mode .sch-send-btn:hover {
    background: #222;
    transform: scale(1.05);
}

.sch-manual-mode .sch-send-btn svg {
    fill: #fff;
    width: 16px;
    height: 16px;
}

/* User icon inside input */
.sch-manual-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.35;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ── Mesaj Balonları (Manuel Mod — Premium Light) ────── */
.sch-manual-mode .sch-message-row {
    gap: 10px;
    align-items: flex-start;
    max-width: 92%;
    margin-bottom: 4px !important;
}

.sch-manual-mode .sch-message-row.sch-assistant {
    align-self: flex-start;
}

.sch-manual-mode .sch-msg-avatar {
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    margin-top: 2px;
}

.sch-manual-mode .sch-bubble {
    border-radius: 4px 18px 18px 18px;
    padding: 12px 16px !important;
    font-size: 14.5px;
    line-height: 1.6;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.sch-manual-mode .sch-assistant .sch-bubble {
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.sch-manual-mode .sch-message-row.sch-user {
    align-self: flex-end;
}

.sch-manual-mode .sch-user .sch-bubble {
    background: #0f172a;
    color: #ffffff;
    border-radius: 18px 4px 18px 18px;
    color: #fff;
    border-radius: 18px 4px 18px 18px;
    border: none;
    box-shadow: 0 4px 15px rgba(15, 39, 68, 0.2);
}

.sch-manual-mode .sch-msg-time {
    color: #94a3b8;
    font-size: 10.5px;
    margin-top: 4px;
    padding: 0 4px;
}

/* ── Yeni Sohbet Butonu (Manuel Mod — Premium Pill) ───── */
.sch-manual-mode .sch-new-chat-bar {
    background: transparent;
    border-top: none;
    padding: 6px 20px 10px;
    display: flex;
    justify-content: center;
}

.sch-manual-mode .sch-new-chat-bar.show {
    display: flex !important;
}

.sch-manual-mode .sch-new-chat-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #555;
    border-radius: 20px;
    padding: 6px 16px !important;
    font-size: 12px;
    border: none;
    font-weight: 500;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
}

.sch-manual-mode .sch-new-chat-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

.sch-manual-mode .sch-new-chat-btn:active {
    transform: scale(0.97);
}

.sch-manual-mode .sch-new-chat-btn svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
}

/* Ataç butonunu gizle (manuel modda) */
.sch-manual-mode .sch-attach-btn {
    display: none;
}

/* ── Mesaj Alanı ─────────────────────────────────────── */
.sch-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--sch-body);
}

.sch-body::-webkit-scrollbar {
    width: 5px;
}

.sch-body::-webkit-scrollbar-track {
    background: transparent;
}

.sch-body::-webkit-scrollbar-thumb {
    background: var(--sch-gray-300);
    border-radius: 5px;
}

/* ── Hoşgeldin Card ──────────────────────────────────── */
.sch-welcome-card {
    text-align: center;
    padding: 32px 24px 16px;
    animation: sch-welcome-in .5s ease;
}

@keyframes sch-welcome-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sch-welcome-emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 14px;
    animation: sch-wave-emoji 2s ease-in-out 1s 2;
}

@keyframes sch-wave-emoji {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(15deg);
    }

    75% {
        transform: rotate(-10deg);
    }
}

.sch-welcome-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--sch-dark);
    margin-bottom: 8px;
    letter-spacing: -.02em;
}

.sch-welcome-sub {
    font-size: 15px;
    color: var(--sch-gray-500);
    line-height: 1.65;
}

/* ── Hızlı Butonlar ──────────────────────────────────── */
.sch-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 18px 16px 10px;
    animation: sch-in .4s ease .15s both;
}

.sch-quick-btn {
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    border-radius: 22px;
    border: 1.5px solid var(--sch-gray-200);
    background: var(--sch-white);
    color: var(--sch-gray-600);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s ease;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.sch-quick-btn:hover {
    background: var(--sch-primary);
    color: var(--sch-text);
    border-color: var(--sch-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, .3);
}

/* ── Manuel Mod Radio Kartları (Ferah Kart Tasarımı) ──── */
/* --- HİZMET SEÇENEKLERİ (KARTLAR) TASARIMI (ZORUNLU - KESİN EZER) --- */

.sch-radio-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin: 15px 0 !important;
    width: 100% !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
}

.sch-radio-card {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
    margin: 0 !important;
    min-height: 50px !important;
    color: #334155 !important;
}

.sch-radio-card:hover {
    border-color: #b0b0b0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
    background-color: #fdfdfd !important;
}

.sch-radio-card:active {
    transform: translateY(1px) !important;
}

.sch-radio-circle {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 50% !important;
    margin-right: 15px !important;
    flex-shrink: 0 !important;
    background-color: #ffffff !important;
    display: block !important;
}

.sch-radio-card:hover .sch-radio-circle {
    border-color: #94a3b8 !important;
}

.sch-radio-text {
    font-size: 14.5px !important;
    color: #334155 !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    font-family: 'Inter', sans-serif, Arial !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Yeniden Seç Butonu ───────────────────────────────── */
.sch-reselect-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 6px 0;
    margin-top: 4px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: color 0.2s;
    animation: sch-in .3s ease;
}

.sch-reselect-btn:hover {
    color: #0ea5e9;
}

/* ── Mesaj Baloncukları ───────────────────────────────── */
.sch-message-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    max-width: 85%;
    animation: sch-in .35s ease;
}

@keyframes sch-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sch-message-row.sch-assistant {
    align-self: flex-start;
    padding-top: 10px !important;
}

.sch-msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--sch-gray-200);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.sch-bubble {

    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;

    font-size: var(--sch-bubble-fs, 14.5px);
    line-height: 1.7;
    word-break: break-word;
    letter-spacing: -.005em;
}

.sch-assistant .sch-bubble {
    background: var(--sch-white);
    color: var(--sch-dark);
    border-radius: 6px 20px 20px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    border: 1px solid var(--sch-gray-100);
}

.sch-message-row.sch-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.sch-user .sch-bubble {
    background: linear-gradient(135deg, var(--sch-primary) 0%, var(--sch-primary-d) 100%);
    color: var(--sch-text);
    border-radius: 20px 6px 20px 20px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, .2);
}

.sch-msg-time {
    font-size: 10.5px;
    color: var(--sch-gray-400);
    margin-top: 5px;
    display: block;
    padding: 0 6px;
}

.sch-user .sch-msg-time {
    text-align: right;
}

.sch-bubble img.sch-attached-img {
    max-width: 220px;
    border-radius: 12px;
    margin-top: 10px;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

/* ── Typing ───────────────────────────────────────────── */
.sch-typing {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    align-self: flex-start;
    animation: sch-in .3s ease;
}

.sch-typing-dots {
    display: flex;
    gap: 6px;
    padding: 8px 10px !important;
    background: var(--sch-white);
    border-radius: 6px 20px 20px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    border: 1px solid var(--sch-gray-100);
}

.sch-typing-dots span {
    width: 9px;
    height: 9px;
    background: var(--sch-gray-300);
    border-radius: 50%;
    animation: sch-wave 1.4s infinite;
}

.sch-typing-dots span:nth-child(2) {
    animation-delay: .2s;
}

.sch-typing-dots span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes sch-wave {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: .3;
    }

    30% {
        transform: translateY(-7px);
        opacity: 1;
    }
}

/* ── Yeni Sohbet Butonu ──────────────────────────────── */
.sch-new-chat-bar {
    display: flex;
    justify-content: center;
    padding: 10px 18px;
    background: var(--sch-gray-50);
    border-top: 1px solid var(--sch-gray-200);
}

.sch-new-chat-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    border-radius: 10px;
    border: 1px solid var(--sch-gray-200);
    background: var(--sch-white);
    color: var(--sch-gray-500);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s ease;
}

.sch-new-chat-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sch-new-chat-btn svg {
    width: 14px;
    height: 14px;
}

/* ── Giriş Alanı ─────────────────────────────────────── */
/* --- ALT GİRİŞ ALANI (INPUT & FOOTER) TASARIMI (ZORUNLU EZİCİ KODLAR) --- */

/* En Dış Kapsayıcı (Ataş ve Metin Kutusu) */
.sch-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 20px 25px 20px !important;
    /* Sağ, sol ve alttan ferah boşluk */
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Gizli dosya yükleme inputu */
.sch-file-input {
    display: none !important;
}

/* Ataş (Resim Yükleme) Butonu */
.sch-attach-btn {
    background: transparent !important;
    border: none !important;
    padding: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: background 0.2s !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.sch-attach-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.sch-attach-btn svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #64748b !important;
    fill: none !important;
}

/* Hap Şeklindeki Beyaz Input Kapsayıcısı */
.sch-input-wrapper {
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50px !important;
    /* Tam hap görünümü için kritik */
    padding: 6px 6px 6px 15px !important;
    /* Sağ tarafta siyah butona tam oturacak boşluk */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Metin Giriş Alanı (Temanın ayarlarını sıfırlıyoruz) */
.sch-input {
    flex: 1 !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    padding: 8px 10px !important;
    font-size: 14.5px !important;
    font-family: 'Inter', sans-serif, Arial !important;
    color: #334155 !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: auto !important;
    line-height: normal !important;
}

.sch-input::placeholder {
    color: #94a3b8 !important;
}

/* Siyah Yuvarlak Gönder Butonu */
.sch-send-btn {
    background: #000000 !important;
    /* Referanstaki şık siyah renk */
    border: none !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    /* Tam yuvarlak */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

.sch-send-btn:hover {
    transform: scale(1.05) !important;
    background: #222222 !important;
}

.sch-send-btn:active {
    transform: scale(0.95) !important;
}

.sch-send-btn svg {
    width: 18px !important;
    height: 18px !important;
    fill: #ffffff !important;
    margin-left: 2px !important;
    /* Ok ikonunu yuvarlağın ortasına optik olarak hizalar */
}

/* --- ALT GİRİŞ ALANI ZORUNLU YATAY HİZALAMA (YAN YANA DİZİLİM) --- */

.sch-footer {
    display: flex !important;
    flex-direction: row !important;
    /* KESİNLİKLE YAN YANA DİZ */
    flex-wrap: nowrap !important;
    /* ASLA ALT SATIRA KAYDIRMA */
    align-items: center !important;
    /* Dikeyde hepsini tam ortala */
    justify-content: space-between !important;
    gap: 12px !important;
    /* Ataş ve Yazı kutusu arasındaki boşluk */
    width: 100% !important;
    padding: 10px 20px 25px 20px !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

/* Ataş İkonunu Sabitle ve Küçült (Ezilmesini Engelle) */
.sch-attach-btn {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
    /* Ekran daralsa bile ataş butonu küçülmesin */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #f8fafc !important;
    /* Şık durması için çok hafif gri arka plan */
    border: 1px solid #e2e8f0 !important;
}

.sch-attach-btn svg {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
}

/* Yazı Alanını Kalan Tüm Boşluğa Yatay Olarak Yay */
.sch-input-wrapper {
    display: flex !important;
    flex-direction: row !important;
    /* İçindeki input ve butonu yan yana diz */
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex-grow: 1 !important;
    /* Ekrandaki kalan tüm sağ boşluğu doldur */
    width: auto !important;
    margin: 0 !important;
    /* Önceki hap görünümü özellikleri korunuyor */
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50px !important;
    padding: 6px 6px 6px 15px !important;
}

/* Gönder Butonunu Sabitle */
.sch-send-btn {
    flex-shrink: 0 !important;
    /* Dar ekranda siyah butonun ovalleşmesini engeller */
}

/* --- İKON VE METİN ÇAKIŞMASI DÜZELTMESİ --- */

.sch-input-wrapper {
    position: relative !important;
    /* İkonu sabitlemek için referans noktası */
}

/* Kullanıcı (Kişi) İkonunu Sol Kenara Sabitle */
.sch-manual-input-icon {
    position: absolute !important;
    left: 18px !important;
    /* Sol taraftan uygun boşluk */
    top: 50% !important;
    transform: translateY(-50%) !important;
    /* Dikeyde tam ortala */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #94a3b8 !important;
    /* İkon rengini placeholder ile uyumlu yap */
    pointer-events: none !important;
    /* ÇOK ÖNEMLİ: İkona tıklansa bile arkadaki input'u seçtirir */
}

.sch-manual-input-icon svg,
.sch-manual-input-icon img {
    width: 18px !important;
    height: 18px !important;
}

/* Metni (Placeholder ve yazılan yazıyı) İkondan Sonra Başlat */
.sch-input {
    padding-left: 42px !important;
    /* Asıl sihir burada: Yazıyı sağa iter ve ikonla çakışmasını engeller */
}

.sch-file-input {
    display: none;
}

/* ── Upload Preview ──────────────────────────────────── */
.sch-upload-preview {
    display: none;
    padding: 12px 18px;
    background: var(--sch-primary-bg);
    border-top: 1px solid var(--sch-gray-200);
    align-items: center;
    gap: 12px;
}

.sch-upload-preview.show {
    display: flex;
}

.sch-upload-preview img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.sch-upload-preview .sch-upload-name {
    flex: 1;
    font-size: 12.5px;
    color: var(--sch-gray-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sch-upload-preview .sch-upload-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 22px;
    padding: 4px;
    border-radius: 50%;
    transition: background .2s;
}

.sch-upload-preview .sch-upload-remove:hover {
    background: rgba(239, 68, 68, .1);
}

/* ═ 3. MOBİL ═════════════════════════════════════════ */
@media (max-width: 480px) {
    .sch-chat-box {
        width: calc(100vw - 16px);
        height: calc(100vh - 106px);
        max-height: calc(100vh - 106px);
        bottom: 96px;
        right: 8px !important;
        left: 8px !important;
        border-radius: 18px;
    }

    .sch-trigger {
        bottom: 18px;
        width: 56px;
        height: 56px;
    }

    .sch-trigger.sch-right {
        right: 18px;
    }

    .sch-trigger.sch-left {
        left: 18px;
    }

    .sch-tooltip {
        display: none !important;
    }

    .sch-body {
        padding: 18px 14px;
    }

    .sch-bubble {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ═ DOĞRULAMA HATA BALONU (Validation Error Bubble) ═══ */
.sch-error-bubble {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
    border-radius: 4px 18px 18px 18px !important;
    animation: sch-error-shake 0.4s ease;
    font-weight: 500;
}

.sch-manual-mode .sch-error-bubble {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

.sch-error-row {
    animation: sch-error-in 0.3s ease;
}

@keyframes sch-error-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-4px);
    }

    40% {
        transform: translateX(4px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(2px);
    }
}

@keyframes sch-error-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════
   YENİ SOHBET BUTONU
   ═══════════════════════════════════════════════════════ */
.sch-new-chat-bar {
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.sch-new-chat-bar.show {
    display: flex !important;
}

.sch-new-chat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--sch-primary);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sch-new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.15);
}

.sch-new-chat-btn svg {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════════════
   YAZIYOR... (TYPING) ANİMASYONU
   ═══════════════════════════════════════════════════════ */
.sch-typing {
    display: flex;
    align-items: flex-end;
    margin-bottom: 15px;
}

.sch-typing .sch-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sch-typing-dots {
    display: flex;
    gap: 4px;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    border: 1px solid #e2e8f0;
    width: max-content;
}

.sch-typing-dots span {
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: sch-typing-bounce 1.2s infinite ease-in-out both;
}

.sch-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.sch-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes sch-typing-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}