/* =========================
   VERA Chatbot
   ========================= */
.vera-chatbot {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 12050;
    font-family: inherit;
}

/* Toggle button (aç/kapa) */
.vera-chatbot .cb-toggle {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 0;
    background: var(--primary-600, #1e4b7a);
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.vera-chatbot .cb-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
}

/* Panel */
.vera-chatbot .cb-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(360px, 92vw);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0, 0, 0, .18);
    border: 1px solid rgba(0, 0, 0, .05);
}

/* Header */
.cb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    background: var(--primary-50, #eef5fb);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.cb-brand {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cb-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.cb-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--primary-900, #0b2742);
}

.cb-header small {
    color: var(--primary-700, #2c5b91);
}

.cb-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--primary-900, #0b2742);
    opacity: .7;
}

.cb-close:hover {
    opacity: 1;
}

/* Mesaj alanı */
.cb-messages {
    max-height: 52vh;
    min-height: 220px;
    overflow: auto;
    padding: 12px;
    display: grid;
    gap: 10px;
    background: #fff;
}

/* Mesaj balonları */
.cb-msg {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.45;
    font-size: 14px;
}

.cb-msg.user {
    margin-left: auto;
    background: var(--accent-100, #fff3e6);
    color: var(--accent-900, #7a3e00);
    border: 1px solid var(--accent-200, #ffd9b0);
}

.cb-msg.bot {
    margin-right: auto;
    background: var(--primary-25, #f6faff);
    color: var(--primary-900, #0b2742);
    border: 1px solid var(--primary-100, #d7e6f5);
}

/* Input bar */
.cb-input {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, .06);
    background: #fff;
    align-items: center;
}

.cb-input textarea {
    resize: none;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    max-height: 120px;
    outline: none;
}

.cb-input textarea:focus {
    border-color: var(--primary-400, #5e8db8);
    box-shadow: 0 0 0 3px rgba(94, 141, 184, .18);
}

/* Gönder butonu */
.cb-send {
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    height: 40px;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-600, #1e4b7a);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* RTL uyum */
html[dir="rtl"] .cb-msg.user {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .cb-msg.bot {
    margin-right: 0;
    margin-left: auto;
}

/* =========================
   Voice button (mikrofon)
   ========================= */
#cb-voice,
.cb-voice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: .5rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: var(--primary-600, #1e4b7a);
    color: #fff;
    font-size: 18px;
    transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    -webkit-appearance: none;
    appearance: none;
}

.cb-voice-icon {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

/* aktif/pasif halleri */
.cb-voice:hover {
    transform: translateY(-1px);
}

.cb-voice[aria-pressed="true"] {
    background: #b91c1c;
    box-shadow: 0 6px 18px rgba(185, 28, 28, .25);
}

/* TTS toggle link */
.cb-tts-btn {
    margin-top: 6px;
    font-size: 12px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
}

.cb-tts-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Küçük ekran tweak */
@media (max-width: 480px) {
    .vera-chatbot {
        right: 12px;
        bottom: 12px;
    }

    .vera-chatbot .cb-panel {
        width: min(340px, 94vw);
    }
}