﻿/* --- VegaAsistan Ana Pencere Yapısı --- */
.asistan-window {
    height: 700px;
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.asistan-chat-side {
    flex: 7;
    display: flex;
    flex-direction: column;
    background: #fdfdfd;
    border-right: 1px solid #f0f0f0;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    scroll-behavior: smooth;
}

.asistan-info-side {
    flex: 3;
    padding: 25px;
    background: #fff;
    overflow-y: auto;
    border-left: 1px solid #eee;
}

/* --- Bot Mesaj Balonu --- */
.bot-bubble {
    background: #004a99;
    color: #fff;
    padding: 15px 20px;
    border-radius: 2px 18px 18px 18px;
    margin-bottom: 15px;
    font-size: 14px;
    max-width: 85%;
    line-height: 1.5;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Kullanıcı Mesaj Balonu (Sağa Dayalı) --- */
.user-msg-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    width: 100%;
}

.user-bubble {
    background: #f0f4f8;
    color: #333;
    padding: 12px 18px;
    border-radius: 18px 18px 2px 18px;
    max-width: 80%;
    font-size: 14px;
    border: 1px solid #d1d9e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Buton Alanı ve Tasarımı --- */
.asistan-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding-left: 5px;
}

.asistan-btn {
    background: #fff;
    border: 1px solid #004a99;
    color: #004a99;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Giriş Animasyonu Başlangıcı */
    opacity: 0;
    transform: translateY(10px);
}

.asistan-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.asistan-btn:hover:not(:disabled) {
    background: #004a99;
    color: #fff;
    transform: scale(1.02);
}

/* Tıklanan veya Devre Dışı Kalan Butonlar */
.asistan-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #999;
}

/* --- Analiz/Yazıyor Göstergesi --- */
.typing-indicator {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
    padding-left: 10px;
    font-style: italic;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* --- Ürün Kartı (Sağ Panel) --- */
.product-card-asistan {
    text-align: center;
}

.product-card-asistan img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.product-card-asistan h6 {
    font-weight: 700;
    color: #004a99;
    margin-bottom: 10px;
}

/* Scrollbar Tasarımı (Daha temiz bir görünüm için) */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}



/* Mobil Görünüm (768px ve altı ekranlar için) */
@media (max-width: 768px) {
    .asistan-window {
        display: flex;
        flex-direction: column; /* Yan yana duran kısımları alt alta alır */
        height: auto; /* Sabit bir yükseklik varsa iptal eder */
        border-radius: 0; /* Mobilde tam ekran hissi için köşeleri düzeltir */
    }

    .asistan-chat-side {
        width: 100%;
        height: 60vh; /* Sohbet ekranının yüksekliğini ekranın %60'ı kadar yapar */
        border-right: none; /* Masaüstündeki dikey çizgiyi kaldırır */
        border-bottom: 2px solid #eee; /* Alt kısma yatay ayırıcı çizgi çeker */
    }

    .asistan-info-side {
        width: 100%;
        height: auto; 
        min-height: 40vh; /* Panel için minimum alan bırakır */
        padding: 15px !important; /* Mobilde kenar boşluklarını ferahlatır */
    }

    #chat-messages {
        height: 100%;
        overflow-y: auto;
        padding-bottom: 20px;
        scroll-behavior: smooth;
    }
}


/* Mobil cihazlarda VegaAsistan buton ikonlarını gizle ve alanı genişlet */
@media (max-width: 768px) {
    :root {
        --asistan-icon-display: none !important;
    }
}