/* TEMEL CHATBOT STİLLERİ */
#chatbot-popup {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: #141414; /* popup arka planını koyu griye çektim */
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #2a2a2a;
}

.chatbot-header {
    background: #1f1f1f; /* yeşil -> koyu gri */
    color: #ffd66b; /* başlık sarı */
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffd66b; /* Gezi Asistanı metni sarı */
}

#close-chatbot {
    background: none;
    border: none;
    color: #ffd66b;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

#close-chatbot:hover {
    transform: scale(1.2);
}

/* MESAJ ALANI */
#chatbox {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: transparent; /* popup ana arka plan zaten koyu, iç alan transparan */
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #e6e6e6;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 14px;
    animation: fadeIn 0.3s ease-out;
}

.user-message {
    background: #2b2b2b; /* kullanıcı mesajı koyu tema */
    color: #f5f5f5;
    margin-left: auto;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.bot-message {
    background: #262626; /* bot mesajı koyu gri */
    color: #f1f1f1;
    margin-right: auto;
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    position: relative;
    border: 1px solid #333333;
}

/* YAZIYOR ANİMASYONU */
.typing-indicator {
    display: inline-flex;
    padding: 12px 16px;
    background: #2a2a2a; /* koyu arka plan */
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-right: auto;
    width: fit-content;
    align-items: center;
    gap: 6px;
    border: 1px solid #3a3a3a;
}

.typing-indicator span {
    height: 10px;
    width: 10px;
    background: #555555; /* koyu tema için daha görünür gri */
    border-radius: 50%;
    display: inline-block;
    opacity: 0.95;
}

.typing-indicator span:nth-child(1) {
    animation: typingPulse 1.2s infinite;
}
.typing-indicator span:nth-child(2) {
    animation: typingPulse 1.2s infinite 0.4s;
}
.typing-indicator span:nth-child(3) {
    animation: typingPulse 1.2s infinite 0.8s;
}

@keyframes typingPulse {
    0% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-5px); }
    100% { opacity: 0.4; transform: translateY(0); }
}

/* GİRİŞ ALANI */
.chatbot-input-container {
    display: flex;
    padding: 16px;
    background: transparent; /* popup koyu, input kutusu koyu tonlarda */
    border-top: 1px solid #2a2a2a;
    gap: 12px;
}

#userInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #333333;
    border-radius: 25px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: border 0.3s;
    background: #1a1a1a; /* yazı yazma alanı koyu */
    color: #f2f2f2;
}

#userInput::placeholder { color: #9a9a9a; }

#userInput:focus {
    border-color: #555555; /* odaklandığında hafif vurgulu gri */
}

.send-button {
    background: #2a2a2a; /* koyu buton */
    color: #ffd66b; /* uçak ikonu sarı */
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

/* ANİMASYONLAR */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#chatbot-trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;    /* Yuvarlak yapmak için */
  object-fit: cover;     /* Görseli düzgün kesmek için */
}

@media (max-width: 600px) {
    #chatbot-popup {
        width: 90vw;
        height: 85vh;
        right: 5vw;
        bottom: 80px;
        border-radius: 14px;
    }

    .chatbot-header {
        padding: 14px 18px;
        font-size: 16px;
    }

    .chatbot-header h3 {
        font-size: 16px;
    }

    #chatbox {
        padding: 12px;
        gap: 10px;
    }

    .message {
        font-size: 13px;
        padding: 10px 14px;
    }

    .typing-indicator {
        padding: 10px 12px;
        gap: 5px;
    }

    .typing-indicator span {
        height: 8px;
        width: 8px;
    }

    .chatbot-input-container {
        padding: 12px;
        gap: 8px;
    }

    #userInput {
        padding: 10px 14px;
        font-size: 13px;
    }

    .send-button {
        width: 42px;
        height: 42px;
    }

    #chatbot-trigger {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}
