﻿/* --- GENEL SAYFA STİLLERİ --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
}

nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
}

main {
    padding: 20px;
    min-height: 70vh; /* Sayfa içeriği az olsa bile footer aşağıda kalsın */
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    position: relative;
    bottom: 0;
    width: 100%;
}


/* --- CHATBOT STİLLERİ --- */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-icon {
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}
/* --- CHATBOT SİMGESİ İÇİN EK STİLLER --- */
.chat-icon-img {
    width: 100%; /* Resmin div'in genişliğini kaplamasını sağlar */
    height: 100%; /* Resmin div'in yüksekliğini kaplamasını sağlar */
    object-fit: contain; /* Resmin oranını bozmadan div'e sığdırır */
    border-radius: 50%; /* Eğer resminiz kareyse daire şeklinde görünmesini sağlar */
}

/* İkon ve baloncuğu yan yana hizalayan alan */
.chat-trigger-area {
    display: flex; /* Elementleri yan yana dizer */
    align-items: center; /* Dikey olarak ortalar */
    gap: 15px; /* Aralarına 15px boşluk koyar */
    cursor: pointer; /* Alanın tamamını tıklanabilir yapar (opsiyonel) */
    position: relative; /* İçindeki mutlak konumlu öğeler için referans noktası */
}
/* Mevcut .chat-icon stili */
.chat-icon {
    width: 60px;
    height: 60px;
    background-color: #007bff; /* Arka plan rengini istediğiniz gibi değiştirebilirsiniz */
    /* color: white;  Artık ikon yerine resim olduğu için bu satır gereksiz hale geldi */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* font-size: 28px;  Font Awesome olmadığı için bu satır da gereksiz */
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
    overflow: hidden; /* Resim div'den taşarsa kırpılmasını sağlar */
}

    /* Mevcut .chat-icon:hover stili aynı kalabilir */
    .chat-icon:hover {
        transform: scale(1.1);
    }
    .chat-icon:hover {
        transform: scale(1.1);
    }

.chatbot-container {
    width: 350px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-in-out;
}

    .chatbot-container.open {
        transform: scale(1);
    }

.chatbot-header {
    background-color: #007bff;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .chatbot-header h2 {
        margin: 0;
        font-size: 1.1em;
    }

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chatbot-messages {
    height: 300px;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    max-width: 80%;
    line-height: 1.6;
    overflow-wrap: break-word; /* EKLENEN SATIR: Uzun kelimelerin satır atlamasını sağlar */
}

.user-message {
    background-color: #007bff;
    color: #fff;
    align-self: flex-end;
}

.bot-message {
    background-color: #f1f1f1;
    color: #333;
    align-self: flex-start;
 
}

.chatbot-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

#userInput {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
}

#sendMessage {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    max-width: 80%;
   }

/* --- DİKKAT ÇEKMEK İÇİN KONUŞMA BALONU STİLLERİ --- */
.chat-bubble {
    background-color: white;
    color: #333;
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    /* Animasyonlu giriş (opsiyonel, aynı kalabilir) */
    opacity: 0;
    transform: translateX(10px); /* Yönü X eksenine çevirdik */
    animation: fadeInBubble 0.5s 1s forwards;
    position: relative; /* Okun konumlanması için gerekli */
}

    /* Konuşma balonuna ok eklemek için (YENİ YÖN) */
    .chat-bubble::after {
        content: '';
        position: absolute;
        top: 50%; /* Dikey olarak ortalar */
        right: -10px; /* Balonun sağından 10px dışarıda */
        transform: translateY(-50%); /* Tam ortalamak için */

        border: 5px solid transparent;
        border-left-color: white; /* Okun rengi (sola bakan taraf) */
    }

/* Balonun belirme animasyonu */
@keyframes fadeInBubble {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}
}
