/* ============================================
   EMPATIK CHATBOT - PREMIUM STIL
   ============================================ */

/* Chatbot Ana Buton */
#openBotBtn {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 60px;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(56, 239, 125, 0.4);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
}

#openBotBtn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(56, 239, 125, 0.5);
}

#openBotBtn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Chatbot Panel */
#botPanel {
    position: fixed;
    bottom: 160px;
    right: 30px;
    width: 420px;
    max-height: 580px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

#botPanel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Panel Başlık */
#botPanel h3 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 20px 24px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 24px 24px 0 0;
}

#botPanel h3::before {
    content: "🧠";
    font-size: 24px;
}

/* Sohbet Konteyner */
#responseArea {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(to bottom, #f0fff4 0%, #ffffff 100%);
    min-height: 250px;
    max-height: 320px;
    font-size: 15px;
    line-height: 1.7;
    color: #2d3748;
    scroll-behavior: smooth;
}

/* Scrollbar Özelleştirme */
#responseArea::-webkit-scrollbar {
    width: 6px;
}

#responseArea::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

#responseArea::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 10px;
}

/* Mesaj Balonu Stilleri */
.message-bubble {
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble.user {
    align-items: flex-end;
}

.message-bubble.bot {
    align-items: flex-start;
}

.message-content {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.message-bubble.user .message-content {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.3);
}

.message-bubble.bot .message-content {
    background: white;
    color: #2d3748;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(17, 153, 142, 0.1);
}

.message-timestamp {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 6px;
    padding: 0 8px;
}

/* Duygu Göstergesi */
.emotion-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(17, 153, 142, 0.1);
    color: #11998e;
    margin-top: 6px;
    font-weight: 600;
}

.emotion-indicator::before {
    content: "✨";
    font-size: 14px;
}

/* Empati Skoru Göstergesi */
.empathy-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    margin-left: 8px;
    font-weight: 600;
}

.empathy-score::before {
    content: "❤️";
    font-size: 12px;
}

/* Typing Indicator (Yazıyor animasyonu) */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #11998e;
    animation: typingAnimation 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Kullanıcı Input Alanı */
#userInput {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(17, 153, 142, 0.2);
    border-radius: 16px;
    font-size: 15px;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
    color: #2d3748;
    min-height: 60px;
    max-height: 120px;
}

#userInput:focus {
    border-color: #11998e;
    box-shadow: 0 0 0 4px rgba(17, 153, 142, 0.1);
}

#userInput::placeholder {
    color: #a0aec0;
}

/* Gönder Butonu */
#sendBtn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

#sendBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 239, 125, 0.4);
}

#sendBtn:active {
    transform: translateY(0);
}

#sendBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Input Konteyner */
.input-container {
    padding: 20px;
    background: #f0fff4;
    border-top: 1px solid rgba(17, 153, 142, 0.1);
}

/* Ses Kontrolleri */
#voiceControls {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    font-size: 13px;
}

#voiceControls label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #4a5568;
    cursor: pointer;
}

#voiceControls input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #11998e;
}

#stopBtn {
    background-color: #EF4444;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

#stopBtn:hover {
    background-color: #DC2626;
    transform: translateY(-1px);
}

#rateSlider {
    width: 100%;
    margin-top: 8px;
    cursor: pointer;
    accent-color: #11998e;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    #botPanel {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 140px;
        max-height: 70vh;
    }

    #openBotBtn {
        right: 20px;
        bottom: 70px;
        padding: 14px 24px;
        font-size: 15px;
    }

    .message-content {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    #botPanel {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 120px;
        border-radius: 20px;
    }

    #botPanel h3 {
        font-size: 18px;
        padding: 16px 20px;
    }

    #responseArea {
        min-height: 250px;
        max-height: 350px;
    }
}

/* Empati Seviyesi Progress Bar */
.empathy-progress-container {
    margin: 12px 0;
    padding: 0 20px;
}

.empathy-progress-label {
    font-size: 12px;
    color: #11998e;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.empathy-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(17, 153, 142, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.empathy-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}