/* --- ROBOT ALANI --- */
#buskirala-robot-container {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 200px;
    height: 300px;
    z-index: 9999;
    pointer-events: none; /* Arkadaki siteye tıklanabilsin */
}

#buskirala-robot-canvas {
    width: 100%;
    height: 100%;
    pointer-events: auto; /* Sadece robota tıklanabilsin */
    cursor: pointer;
}

/* --- SOHBET KUTUSU (Küçültüldü) --- */
#buskirala-chat-interface {
    display: none;
    position: absolute; /* Robotun hemen üstünde başlasın */
    bottom: 220px;      /* Yeri aşağı çekildi (Eskiden 300px idi) */
    right: 50px;
    
    width: 280px;       /* Genişlik: 320px -> 280px (Daha kibar) */
    height: 350px;      /* Yükseklik: 450px -> 350px (Ekrana sığsın) */
    
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border: 1px solid #d1d1d1;
    
    /* Flex yapısı */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Animasyonlu açılış için */
    z-index: 10000;
}

/* Başlık (Sürüklenebilir Alan) */
.chat-header {
    background: #0073aa; /* Buskirala Mavisi */
    color: #fff;
    padding: 10px 15px; /* Padding küçüldü */
    font-size: 14px;    /* Font küçüldü */
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    cursor: move; /* Sürükleme imleci */
    user-select: none;
}

.chat-close {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.8;
}

.chat-close:hover {
    opacity: 1;
}

/* Mesaj Alanı */
.chat-messages {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f4f6f8;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
}

/* Scrollbar Tasarımı (İnce) */
.chat-messages::-webkit-scrollbar {
    width: 5px;
}
.chat-messages::-webkit-scrollbar-track {
    background: #eee;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

/* Mesaj Balonları */
.message {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px; /* Okunabilirlik için ideal boyut */
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
    background: #0073aa;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.message.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Alt Kısım (Input) */
.chat-input-area {
    padding: 8px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 15px;
    outline: none;
    font-size: 13px;
    background: #fafafa;
}

.chat-input-area input:focus {
    border-color: #0073aa;
    background: #fff;
}

.chat-input-area button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 0 12px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: background 0.2s;
}

.chat-input-area button:hover {
    background: #005a87;
}

.chat-input-area button:disabled {
    background: #ccc;
    cursor: default;
}

/* "Yazıyor..." Göstergesi */
.typing-indicator {
    font-style: italic;
    color: #999;
    font-size: 11px;
    padding: 2px 10px;
    background: #f4f6f8;
    display: none;
}