/* Bildirim merkezi — inc/notification-center.php'den taşındı (Denetim P4: tarayıcı önbelleğe alabilsin) */
/* ── Zil Butonu ── */
.se-notif { position: relative; display: flex; align-items: center; }

.se-notif__btn {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border: none; background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: var(--c-fg, #111);
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.se-notif__btn:hover,
.se-notif__btn[aria-expanded="true"] {
    background: rgba(245,128,37,.1);
    color: var(--c-1, #F58025);
}

.se-notif__badge {
    position: absolute;
    top: 4px; right: 4px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    background: var(--c-1, #F58025);
    color: #fff;
    font-size: 10px; font-weight: 700; line-height: 16px;
    border-radius: 8px;
    text-align: center;
    pointer-events: none;
    font-family: var(--font-mono, monospace);
}

/* ── Panel ── */
.se-notif-panel {
    position: fixed;
    top: 68px;
    right: max(1rem, calc((100vw - 1200px) / 2 + 1rem));
    width: min(400px, calc(100vw - 2rem));
    max-height: min(560px, calc(100vh - 80px));
    display: flex; flex-direction: column;
    background: var(--c-bg, #fff);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
    z-index: 99998;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(.97);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}
.se-notif-panel:not([hidden]) {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.se-notif-panel[hidden] { display: flex !important; visibility: hidden; }

.se-notif-panel__arrow {
    position: absolute;
    top: -7px; right: 52px;
    width: 14px; height: 7px;
    overflow: hidden;
}
.se-notif-panel__arrow::before {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: var(--c-bg, #fff);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 2px;
}

/* ── Başlık ── */
.se-notif-panel__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.125rem .75rem;
    border-bottom: 1px solid rgba(0,0,0,.07);
    flex-shrink: 0;
}
.se-notif-panel__title { font-weight: 700; font-size: .9rem; }
.se-notif-panel__read-all {
    font-size: .75rem; color: var(--c-1, #F58025);
    background: none; border: none; cursor: pointer; padding: 0;
    opacity: .85;
}
.se-notif-panel__read-all:hover { opacity: 1; text-decoration: underline; }

/* ── İzin Bandı ── */
.se-notif-panel__perm {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem;
    background: linear-gradient(135deg, #fff8f0, #fff3e5);
    border-bottom: 1px solid rgba(245,128,37,.2);
    flex-shrink: 0;
}
.se-notif-panel__perm-icon { font-size: 1.4rem; flex-shrink: 0; }
.se-notif-panel__perm-text {
    flex: 1;
    display: flex; flex-direction: column; gap: .1rem;
    font-size: .78rem; line-height: 1.4;
}
.se-notif-panel__perm-text strong { font-size: .82rem; }
.se-notif-panel__perm-btn {
    background: var(--c-1, #F58025); color: #fff;
    border: none; border-radius: 6px; cursor: pointer;
    font-size: .78rem; font-weight: 600;
    padding: .35rem .8rem; flex-shrink: 0;
    transition: opacity .15s;
}
.se-notif-panel__perm-btn:hover { opacity: .88; }
.se-notif-panel__perm-close {
    background: none; border: none; cursor: pointer;
    color: #aaa; font-size: 1.2rem; line-height: 1;
    padding: 0 .25rem; flex-shrink: 0;
}
.se-notif-panel__perm-close:hover { color: #555; }

/* ── Gövde (kaydırılabilir liste) ── */
.se-notif-panel__body {
    flex: 1; overflow-y: auto;
    overscroll-behavior: contain;
    padding: .375rem 0;
}
.se-notif-panel__body::-webkit-scrollbar { width: 4px; }
.se-notif-panel__body::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 2px; }

/* ── Yükleniyor ── */
.se-notif-panel__loading {
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}
.se-notif-panel__spinner {
    width: 24px; height: 24px;
    border: 3px solid rgba(245,128,37,.2);
    border-top-color: var(--c-1, #F58025);
    border-radius: 50%;
    animation: se-spin .7s linear infinite;
}
@keyframes se-spin { to { transform: rotate(360deg); } }

/* ── Bildirim Öğesi ── */
.se-notif-item {
    display: flex; gap: .75rem; align-items: flex-start;
    padding: .75rem 1.125rem;
    text-decoration: none;
    color: inherit;
    transition: background .12s;
    border-left: 3px solid transparent;
    cursor: pointer;
    position: relative;
}
.se-notif-item:hover { background: rgba(0,0,0,.035); }
.se-notif-item.is-unread {
    border-left-color: var(--c-1, #F58025);
    background: rgba(245,128,37,.04);
}
.se-notif-item + .se-notif-item { border-top: 1px solid rgba(0,0,0,.05); }

.se-notif-item__icon {
    font-size: 1.35rem; flex-shrink: 0;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.045);
    border-radius: 50%;
}
.se-notif-item__body { flex: 1; min-width: 0; }
.se-notif-item__title {
    font-size: .84rem; font-weight: 600;
    margin: 0 0 .15rem;
    line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.se-notif-item.is-unread .se-notif-item__title { color: var(--c-fg, #111); }
.se-notif-item:not(.is-unread) .se-notif-item__title { color: var(--c-fg-dim, #555); }
.se-notif-item__text {
    font-size: .78rem; color: var(--c-fg-dim, #666);
    margin: 0 0 .25rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.45;
}
.se-notif-item__time { font-size: .7rem; color: #aaa; }
.se-notif-item__dot {
    width: 7px; height: 7px;
    background: var(--c-1, #F58025);
    border-radius: 50%; flex-shrink: 0;
    margin-top: .3rem; align-self: flex-start;
}

/* [hidden] attribute CSS override'larına karşı korunma */
#se-notif-empty[hidden],
#se-notif-perm[hidden],
#se-notif-loading[hidden],
#se-notif-foot[hidden],
#se-notif-badge[hidden] { display: none !important; }

/* ── Boş Durum ── */
.se-notif-panel__empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: .5rem;
    padding: 2.5rem 1rem;
    color: #aaa; font-size: .85rem; text-align: center;
}
.se-notif-panel__empty span { font-size: 2.5rem; }
.se-notif-panel__empty p { margin: 0; }

/* ── Daha Fazla ── */
.se-notif-panel__foot {
    border-top: 1px solid rgba(0,0,0,.07);
    padding: .625rem 1rem;
    flex-shrink: 0;
}
.se-notif-panel__more {
    width: 100%; padding: .45rem;
    background: none; border: 1px solid rgba(0,0,0,.1);
    border-radius: 6px; cursor: pointer;
    font-size: .8rem; color: var(--c-fg-dim, #555);
    transition: background .12s;
}
.se-notif-panel__more:hover { background: rgba(0,0,0,.04); }

/* ── Overlay ── */
.se-notif-overlay {
    position: fixed; inset: 0; z-index: 99997;
    background: transparent;
}

/* ── Mobil ── */
@media (max-width: 600px) {
    .se-notif-panel {
        top: auto;
        bottom: 0; right: 0; left: 0;
        width: 100%; max-width: 100%;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        max-height: 75vh;
    }
    .se-notif-panel__arrow { display: none; }
}
