/* SOCIAL LIKES & ALERTS v1.0 (Modern UI) */
:root {
    --sl-indigo: #6366f1;
    --sl-red: #ef4444;
    --sl-bg: #ffffff;
    --sl-border: #e2e8f0;
    --sl-text: #1e293b;
    --sl-text-sub: #64748b;
}

/* === HEADER BELL === */
.sl-bell-wrap { position: relative; display: inline-block; margin-right: 15px; }
.sl-bell-btn { background: none; border: none; font-size: 20px; color: #94a3b8; cursor: pointer; transition: 0.2s; }
.sl-bell-btn:hover { color: var(--sl-indigo); transform: scale(1.1); }
.sl-bell-badge { position: absolute; top: -5px; right: -5px; background: var(--sl-red); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 5px; border-radius: 10px; border: 2px solid #fff; display:none; }

/* === DROPDOWN === */
.sl-dropdown {
    position: absolute; top: 140%; right: -10px; width: 360px; background: #fff; border-radius: 12px;
    box-shadow: 0 10px 40px -5px rgba(0,0,0,0.1); border: 1px solid var(--sl-border); display: none; z-index: 9000;
}
.sl-dropdown.active { display: block; animation: slSlide 0.2s ease; }
@keyframes slSlide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.sl-dd-header { padding: 12px 16px; border-bottom: 1px solid var(--sl-border); display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 12px 12px 0 0; }
.sl-head-title { font-weight: 700; font-size: 14px; color: var(--sl-text); }
.sl-head-tools { display: flex; gap: 10px; }
.sl-tool-btn { font-size: 11px; color: var(--sl-text-sub); cursor: pointer; font-weight: 600; transition:0.2s; }
.sl-tool-btn:hover { color: var(--sl-indigo); }

.sl-dd-list { max-height: 350px; overflow-y: auto; }
.sl-dd-footer { padding: 10px; text-align: center; background: #f8fafc; border-top: 1px solid var(--sl-border); border-radius: 0 0 12px 12px; }
.sl-foot-link { font-size: 11px; color: var(--sl-text-sub); text-decoration: none; font-weight: 600; cursor: pointer; }
.sl-foot-del { color: var(--sl-red); margin-left: 15px; }

/* === ITEMS === */
.sl-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid #f1f5f9; background: #fff; transition:0.2s; }
.sl-item:hover { background: #f8fafc; }
.sl-item.unread { background: #f0f9ff; border-left: 3px solid var(--sl-indigo); }
.sl-link-area { display: flex; align-items: center; gap: 12px; text-decoration: none !important; color: var(--sl-text); flex: 1; }
.sl-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid #e2e8f0; }
.sl-content { font-size: 13px; line-height: 1.3; }
.sl-content b { color: #0f172a; font-weight: 600; }
.sl-date { font-size: 11px; color: var(--sl-text-sub); display: block; margin-top: 2px; }
.sl-actions { display: flex; gap: 5px; opacity: 0; transition: 0.2s; margin-left: 10px; }
.sl-item:hover .sl-actions { opacity: 1; }
.sl-act-btn { width: 24px; height: 24px; border-radius: 6px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.btn-read { background: #e0e7ff; color: var(--sl-indigo); } .btn-read:hover { background: var(--sl-indigo); color: #fff; }
.btn-del { background: #fee2e2; color: var(--sl-red); } .btn-del:hover { background: var(--sl-red); color: #fff; }
.sl-item:not(.unread) .btn-read { display: none; }

/* === SETTINGS PAGE === */
.sl-card { background: #fff; border-radius: 12px; border: 1px solid var(--sl-border); overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 20px; }
.sl-card-head { padding: 15px 20px; border-bottom: 1px solid var(--sl-border); font-size: 15px; font-weight: 700; color: var(--sl-text); background: #fff; display:flex; justify-content:space-between; align-items:center; }
.sl-row { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #f1f5f9; }
.sl-info { display: flex; gap: 15px; align-items: center; }
.sl-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
/* --- İKON RENKLENDİRMELERİ --- */

/* Beğeni: Kırmızı */
.icon-like { 
    background: #fef2f2; 
    color: #ef4444; 
}

/* Ses: Zümrüt Yeşili */
.icon-sound { 
    background: #ecfdf5; 
    color: #10b981; 
}

/* Etiket (Mention): İndigo */
.icon-mention { 
    background: #eef2ff; 
    color: #6366f1; 
}

/* Yorum (Reply): Gök Mavisi */
.icon-reply { 
    background: #f0f9ff; 
    color: #0ea5e9; 
}

/* Alıntı (Quote): Kehribar/Turuncu */
.icon-quote { 
    background: #fffbeb; 
    color: #f59e0b; 
}

/* Özel Mesaj (PM): Mor */
.icon-pm { 
    background: #f3e8ff; 
    color: #a855f7; 
}

/* Arkadaşlık (Friend): Koyu Mavi */
.icon-friend { 
    background: #eff6ff; 
    color: #3b82f6; 
}
.sl-select { padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; outline: none; }
.sl-btn-test { padding: 8px 12px; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; font-size: 12px; margin-left: 5px; }
.sl-toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.sl-toggle input { opacity: 0; width: 0; height: 0; }
.sl-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 34px; }
.sl-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .sl-slider { background-color: var(--sl-indigo); } input:checked + .sl-slider:before { transform: translateX(20px); }
.sl-save-btn { width: 100%; padding: 15px; background: #f8fafc; border: none; border-top: 1px solid var(--sl-border); color: var(--sl-indigo); font-weight: 700; cursor: pointer; transition: 0.2s; font-size: 13px; }
.sl-save-btn:hover { background: #f1f5f9; color: #4f46e5; }

/* === FULL PAGE === */
.sl-page-btn { padding: 6px 12px; background: #fff; border: 1px solid var(--sl-border); border-radius: 6px; font-size: 12px; color: var(--sl-text-sub); text-decoration: none; font-weight: 600; }
.sl-page-btn.btn-danger { color: var(--sl-red); border-color: #fecaca; background: #fef2f2; }
.sl-pagination { padding: 15px; border-top: 1px solid var(--sl-border); text-align: right; background: #f8fafc; }

/* === POSTBIT & STATS === */
.sl-like-btn { background: #fff; border: 1px solid #e2e8f0; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: #64748b; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition:0.2s; }
.sl-like-btn:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.sl-like-btn.liked { background: #fef2f2; border-color: #fca5a5; color: #ef4444; }
.sl-stats-box { display: flex; gap: 10px; margin-top: 8px; background: #f8fafc; border: 1px solid var(--sl-border); padding: 8px; border-radius: 8px; justify-content: center; }
.sl-stat { display: flex; flex-direction: column; align-items: center; min-width: 60px; }
.sl-stat-val { font-weight: 800; font-size: 14px; line-height: 1; }
.sl-stat-lbl { font-size: 9px; text-transform: uppercase; color: var(--sl-text-sub); font-weight: 600; margin-top: 3px; }
.val-red { color: var(--sl-red); } .val-indigo { color: var(--sl-indigo); }

/* --- TOAST BİLDİRİM (SAĞ ALT KUTUCUK) --- */
.sl-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sl-toast {
    background: #fff;
    border-left: 4px solid #4f46e5;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    max-width: 350px;
    animation: sl-slide-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.sl-toast-icon { font-size: 20px; color: #4f46e5; }
.sl-toast-content { display: flex; flex-direction: column; }
.sl-toast-title { font-weight: 800; font-size: 13px; color: #1e293b; }
.sl-toast-desc { font-size: 12px; color: #64748b; margin-top: 2px; }

@keyframes sl-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes sl-slide-out {
    to { transform: translateX(100%); opacity: 0; }
}

/* --- BADGE ANİMASYONU --- */
.sl-pulse-anim {
    animation: sl-pulse 0.5s ease-in-out;
}
@keyframes sl-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
    100% { transform: scale(1); }
}

/* --- TOGGLE SWITCH (AÇ/KAPA ANAHTARI) --- */
.sl-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0;
}

/* Standart checkbox'ı gizle */
.sl-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Anahtarın Arka Planı (Gri - Pasif) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1; /* Slate-300 */
    transition: .4s;
}

/* Anahtarın Yuvarlağı (Top) */
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Yuvarlak Köşeler */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* --- AKTİF (CHECKED) DURUMU --- */
/* Arka plan yeşil/mavi olsun */
.sl-switch input:checked + .slider {
    background-color: #4f46e5; /* İndigo Rengi */
}

/* Topu sağa kaydır */
.sl-switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* Odaklanınca gölge (Erişilebilirlik) */
.sl-switch input:focus + .slider {
    box-shadow: 0 0 1px #4f46e5;
}


@media screen and (max-width: 768px) {
    /* Menünün kapsayıcısını sabitleyelim (Eğer buton bir üst kapsayıcıya bağlıysa taşmayı önler) */
    .sl-bell-wrap {
        position: static !important; /* Mobil cihazlarda mutlak konumlandırmayı üst elemente yayıyoruz */
    }

    .sl-dropdown {
        /* Sabit genişliği kaldırıp ekranın sağından ve solundan 15px boşluk bırakıyoruz */
        width: calc(100vw - 30px) !important; 
        
        /* Ekranın sağ kenarına veya sol kenarına taşmasını engellemek için sabit konumu sıfırlıyoruz */
        right: 15px !important;
        left: 15px !important;
        
        /* Butonun hemen altında açılması için ideal dikey boşluk */
        top: 100% !important; 
        
        /* Mobilde taşan listelerin daha rahat kaydırılması için */
        max-width: 100%;
    }

    /* İsteğe bağlı: Mobilde bildirim listesinin içindeki yazı boyutlarını ve boşlukları 
       bir tık küçülterek ekrana daha fazla bilgi sığdırabilirsiniz */
    .sl-item {
        padding: 10px 12px !important;
    }
    
    .sl-content {
        font-size: 12px !important;
    }

    /* Mobilde küçük ekranlarda aksiyon butonlarının (sil/okundu) her zaman görünür olması 
       kullanıcı deneyimini artırır (çünkü mobilde hover/fare üzerine getirme efekti yoktur) */
    .sl-actions {
        opacity: 1 !important;
    }
}

/* === ÇOK KÜÇÜK EKRANLAR İÇİN DÜZENLEME (400px ve altı telefonlar) === */
@media screen and (max-width: 400px) {
    .sl-dropdown {
        /* Çok küçük ekranlarda sağdan soldan boşluğu 10px'e düşürerek alanı maksimize ediyoruz */
        width: calc(100vw - 20px) !important;
        right: 10px !important;
        left: 10px !important;
    }
}