/* =================================================================== */
/* === 1. GENEL DEĞİŞKENLER VE TEMEL YAPI === */
/* =================================================================== */

:root {
    /* Renk Paleti */
    --color-primary: #0d6efd;
    --color-text-light: #ffffff;
    --color-background-sidebar: #e9eef6;
    --color-background-input: #f0f4f9;
    --color-background-hover: #dcdfe4;
    --color-bot-message-bg: #e9ecef;
    --color-bot-message-text: #212529;
    --color-delete-icon: #9aa0a6;
    --color-delete-icon-hover: #e84135;

    /* Boyutlandırma ve Yarıçaplar */
    --sidebar-width: 280px;
    --message-border-radius: 1.5rem;
}

/* Sadece sohbet sayfasını etkileyen ana yerleşim */
 #chat-layout {
    height: 100vh;
    display: flex;
    overflow: hidden; 
} 

body#admin-page-content {
    height: auto;       /* Yüksekliği içeriğe göre otomatik ayarla */
    overflow-y: auto;   /* Dikey kaydırmayı aktif et */
    display: block;     /* Flexbox yapısını bu sayfa için iptal et */
}

/* =================================================================== */
/* === 2. KENAR MENÜSÜ (SIDEBAR) VE SOHBET LİSTESİ === */
/* =================================================================== */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--color-background-sidebar);
    padding: 1.5rem 1rem;
    transition: margin-left 0.3s ease-in-out;
}

.sidebar.sidebar-collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.chat-history {
    overflow-y: auto;
}

/* Kenar menüsündeki sohbet listesi öğeleri */
.conversation-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
}

.conversation-list-item:hover {
    background-color: var(--color-background-hover);
}

.conversation-list-item .conversation-item {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 12px;
}

.delete-conversation-btn {
    padding: 8px;
    margin-right: 5px;
    cursor: pointer;
    color: var(--color-delete-icon);
    display: none; /* Normalde gizli */
    flex-shrink: 0;
}

.conversation-list-item:hover .delete-conversation-btn {
    display: inline-block; /* Fare üzerine gelince göster */
}

.delete-conversation-btn:hover {
    color: var(--color-delete-icon-hover);
}


/* =================================================================== */
/* === 3. SOHBET MESAJ BALONLARI VE GİRİŞ ALANI === */
/* =================================================================== */

.chat-input-form {
    background-color: var(--color-background-input);
    border-radius: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1.25rem;
    border-radius: var(--message-border-radius);
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.user-message {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-bottom-right-radius: 0;
    align-self: flex-end;
}

.bot-message {
    background-color: var(--color-bot-message-bg);
    color: var(--color-bot-message-text);
    border-bottom-left-radius: 0;
    align-self: flex-start;
}


/* =================================================================== */
/* === 4. NOT DEFTERİ & MODAL & CKEDITOR === */
/* =================================================================== */

#note-editor-container {
    /* Konumlandırma (Tailwind'deki fixed, top-1/2 vb. taklit eder) */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1055; /* Bootstrap modallarından daha üstte olması için */

    /* Yeniden boyutlandırma */
    resize: both;
    overflow: auto;
    min-width: 350px;
    min-height: 250px;
}

#note-editor-header {
    cursor: move;
}

/* Pencereyi gizlemek için basit bir yardımcı class */
#note-editor-container.hidden {
    display: none !important;
}