/* TEMEL CHATBOT STİLLERİ */
#chatbot-popup {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e0e0e0;
}

.chatbot-header {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#close-chatbot {
    background: none;
    border: none;
    color: white;
    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: #f5f7fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.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: #e3f2fd;
    color: #0d47a1;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.bot-message {
    background: white;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    border: 1px solid #e0e0e0;
}

/* YAZIYOR ANİMASYONU */
.typing-indicator {
    display: inline-flex;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-right: auto;
    width: fit-content;
    align-items: center;
    gap: 6px;
    border: 1px solid #e0e0e0;
}

.typing-indicator span {
    height: 10px;
    width: 10px;
    background: #4CAF50;
    border-radius: 50%;
    display: inline-block;
    opacity: 0.4;
}

.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: white;
    border-top: 1px solid #eee;
    gap: 12px;
}

#userInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: border 0.3s;
}

#userInput:focus {
    border-color: #4CAF50;
}

.send-button {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    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 2px 5px rgba(0,0,0,0.1);
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 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;
    }
}
