/* ── CHATBOT WIDGET ── */
/* Mevcut tasarım diliyle (style.css) birebir uyumlu: aynı renk değişkenleri,
   aynı border-radius/transition, aynı FAB dili (bkz. .theme-toggle). */

.chatbot-fab {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    transition: all var(--transition);
}

.chatbot-fab:hover {
    transform: scale(1.08);
    background: var(--color-primary-hover);
}

.chatbot-fab svg {
    width: 26px;
    height: 26px;
}

@media (max-width: 768px) {
    .chatbot-fab {
        bottom: 1.5rem;
        left: 1.5rem;
        width: 50px;
        height: 50px;
    }
}

.chatbot-panel {
    position: fixed;
    bottom: 6.5rem;
    left: 2rem;
    width: min(360px, calc(100vw - 3rem));
    height: min(520px, calc(100vh - 9rem));
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* .chatbot-panel { display:flex } yukarıda [hidden]'ın varsayılan display:none'ını
   ezer — bu satır olmadan panel her zaman görünür kalır. */
.chatbot-panel[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .chatbot-panel {
        left: 1.5rem;
        bottom: 5.75rem;
    }
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-alt);
    flex-shrink: 0;
}

.chatbot-header strong {
    font-size: 0.95rem;
}

.chatbot-header span {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
}

.chatbot-close:hover {
    color: var(--color-primary);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chatbot-msg {
    max-width: 85%;
    padding: 0.6rem 0.85rem;
    border-radius: var(--border-radius);
    font-size: 0.88rem;
    line-height: 1.45;
}

.chatbot-msg-bot {
    align-self: flex-start;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.chatbot-msg-user {
    align-self: flex-end;
    background: var(--color-primary);
    color: #fff;
}

.chatbot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: transparent;
    border: none;
    padding: 0;
    max-width: 100%;
}

.chatbot-chip {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.chatbot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: transparent;
    border: none;
    padding: 0;
    max-width: 100%;
}

.chatbot-link-btn {
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid var(--color-primary);
    padding: 0.35rem 0.7rem;
    border-radius: 50px;
    transition: all var(--transition);
}

.chatbot-link-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.chatbot-image {
    background: transparent;
    border: none;
    padding: 0;
    max-width: 100%;
    width: 100%;
}

.chatbot-image img {
    width: 100%;
    display: block;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 0.75rem 0.9rem;
}

.chatbot-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-text-muted);
    animation: chatbot-blink 1.2s infinite ease-in-out;
}

.chatbot-typing span:nth-child(2) { animation-delay: 0.15s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatbot-blink {
    0%, 80%, 100% { opacity: 0.25; }
    40% { opacity: 1; }
}

.chatbot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.9rem 1rem 1.1rem;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.chatbot-option-btn {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 50px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition);
}

.chatbot-option-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-1px);
}