/* --- KAPSAYICI --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    pointer-events: none;
}

/* --- BILDIRIM KUTUSU (DIS KABUK) --- */
.custom-toast {
    position: relative;
    box-sizing: border-box;
    
    /* Animasyon için başlangıç */
    max-height: 0;
    padding: 0 16px;
    margin: 0 !important;
    
    opacity: 0;
    transform: translateX(100%);
    overflow: hidden;
    
    background-color: #fff;
    width: 380px;
    max-width: 90vw;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    
    /* ESNEKLIK */
    display: flex;
    align-items: flex-start; /* Ikon ve metin yukarı hizalı */
    pointer-events: auto;

    /* ANIMASYON */
    transition: 
        max-height 0.5s ease-in-out,
        padding 0.4s ease-out,
        margin-bottom 0.4s ease-out,
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease-out;
}

/* --- AÇILMIŞ HALI --- */
.custom-toast.show {
    /* 1000px veriyoruz ki içerik ne kadar uzunsa sığsın */
    max-height: 1000px !important; 
    
    padding-top: 16px;    
    padding-bottom: 16px; 
    margin-bottom: 12px !important; 
    
    opacity: 1;
    transform: translateX(0);
}

/* Renkler */
.custom-toast.toast-type-success { border-left: 4px solid #10b981; border-bottom: 1px solid #10b981; }
.custom-toast.toast-type-error   { border-left: 4px solid #ef4444; border-bottom: 1px solid #ef4444; }
.custom-toast.toast-type-info    { border-left: 4px solid #3b82f6; border-bottom: 1px solid #3b82f6; }

/* --- IÇERIK KISITLAMALARINI KALDIRMA (ÖNEMLI) --- */

.toast-content { 
    flex: 1; 
    /* Yükseklik serbest olsun */
    height: auto !important; 
    min-height: 0 !important;
    max-height: none !important;
    
    /* Metin uzunsa kutuyu patlatmasın, aşağı insin */
    white-space: normal !important; 
    word-break: break-word !important; 
    overflow: visible !important;
}

.toast-title { 
    font-weight: 600; 
    color: #1f2937; 
    font-size: 14px; 
    margin-bottom: 4px !important; /* Başlık ile mesaj arasına az boşluk */
    margin-top: 0 !important;
    line-height: 1.4 !important;
}

.toast-message { 
    color: #6b7280; 
    font-size: 13px; 
    
    /* Satır yüksekliğini düzelt */
    line-height: 1.5 !important; 
    margin: 0 !important;
    
    /* Mesajın yüksekliğini serbest bırak */
    height: auto !important; 
    display: block !important;
}

/* Ikon Ayarı */
.toast-icon { 
    margin-right: 12px; 
    display: block; 
    width: 24px; 
    height: 24px; 
    flex-shrink: 0; 
    margin-top: 2px !important; 
}

/* Kapat Butonu */
.toast-close { 
    margin-left: 12px; 
    cursor: pointer; 
    color: #9ca3af; 
    background: transparent; 
    border: none; 
    padding: 4px; 
    display: flex;
    align-items: flex-start; 
    margin-top: -2px;
}
.toast-close:hover { background-color: #f3f4f6; color: #374151; border-radius: 4px; }

.custom-toast.single-line {
    /* Flex hizalamasını ortala */
    align-items: center !important;
}

.custom-toast.single-line .toast-icon {
    /* Çok satırlıdaki margin ayarını iptal et, tam ortala */
    margin-top: 0 !important;
}

.custom-toast.single-line .toast-title {
    /* Varsa marginleri sıfırla */
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.custom-toast.single-line .toast-close {
    /* Kapat butonunu tam ortala */
    align-items: center !important;
    margin-top: 0 !important;
}