/* FİNİST RENK PALETİ VE GENEL AYARLAR */
:root {
    --finist-primary: #4e54c8; /* Ana Renk */
    --finist-secondary: #8f94fb; /* Açık Ton */
    --finist-bg: #f0f2f5; /* Genel Arka Plan */
    --chat-bg: #eef2ff; /* Sohbet Arka Planı (Çok açık mavi) */
}

body, html {
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--finist-bg);
}

/* Yardımcı Renk Sınıfları */
.text-finist {
    color: var(--finist-primary) !important;
}

.bg-finist {
    background-color: var(--finist-primary) !important;
}

.btn-finist {
    background-color: var(--finist-primary);
    border: none;
    transition: 0.3s;
}

.btn-finist:hover {
    background-color: #3b3f98;
}

/* Header */
.header-height {
    height: 70px; /* Biraz daha ferah */
}

/* Sidebar (Liste) */
.chat-item {
    transition: background-color 0.2s;
    border-radius: 10px; /* Hafif yuvarlatılmış liste elemanları */
    margin: 0 10px; /* Kenar boşluğu */
}

.chat-item:hover {
    background-color: #f8f9fa;
}

.active-chat {
    background-color: #eef2ff !important; /* Seçili sohbet rengi */
}

/* Sağ Panel (Sohbet) Arka Planı */
.bg-chat-pattern {
    background-color: var(--chat-bg);
    /* WhatsApp deseni yerine modern düz veya hafif dokulu bir zemin */
    background-image: radial-gradient(#dbeafe 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Mesaj Baloncukları */
.msg-bubble {
    max-width: 70%;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Gelen Mesaj (Sol) */
.message.received .msg-bubble {
    border-bottom-left-radius: 5px; /* Konuşma balonu efekti */
}

/* Giden Mesaj (Sağ - Finist Rengi) */
.message.sent .msg-bubble {
    border-bottom-right-radius: 5px; /* Konuşma balonu efekti */
    background: linear-gradient(135deg, var(--finist-primary) 0%, var(--finist-secondary) 100%);
}

/* Saat Gösterimi */
.msg-time {
    font-size: 0.7rem;
    position: absolute;
    bottom: 5px;
    right: 10px;
    display: flex;
    align-items: center;
}

.small-time {
    font-size: 0.75rem;
}

/* Scrollbar Özelleştirme */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(78, 84, 200, 0.2); /* Finist renginin şeffaf hali */
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

/* Mobil Düzenlemeler */
@media (max-width: 767.98px) {
    #input-area {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        padding-bottom: 20px !important; /* iPhone çentiği için pay */
    }
    
    #message-container {
        padding-bottom: 90px !important;
    }
    
    .chat-item {
        margin: 0; /* Mobilde tam genişlik */
        border-radius: 0;
    }
}