/* Musify — Pusat Notifikasi (lonceng, lembar bawah, banner dalam-aplikasi). Logika: js/core/notifications.js */

/* badge pada lonceng */
.nm-bell { position: relative; }
.nm-bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; line-height: 1; color: #fff;
  background: linear-gradient(135deg, #ff7a1a, #ff4081); box-shadow: 0 0 0 2px #0b0c12;
  transform: scale(0); transition: transform .38s var(--ease-spring, cubic-bezier(.34,1.45,.64,1)); pointer-events: none;
}
.nm-bell-badge.on { transform: scale(1); }
.nm-bell.ring i, .nm-bell.ring svg { animation: nmnRing .9s ease-in-out; transform-origin: 50% 0; }
@keyframes nmnRing { 0%,100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-7deg); } 75% { transform: rotate(3deg); } }

/* lembar bawah */
#nm-notif-sheet { position: fixed; inset: 0; z-index: 450; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
#nm-notif-sheet .nmn-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .35s ease; pointer-events: auto; }
#nm-notif-sheet.show .nmn-scrim { opacity: 1; }
.nmn-panel {
  position: relative; width: 100%; max-width: 520px; max-height: 84dvh; display: flex; flex-direction: column;
  background: rgba(20,21,29,.97); border: 1px solid rgba(255,255,255,.1); border-bottom: 0; border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px rgba(0,0,0,.55);
  transform: translateY(100%); transition: transform .5s var(--ease-out, cubic-bezier(.22,1,.36,1)); pointer-events: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px); will-change: transform; touch-action: pan-y;
}
#nm-notif-sheet.show .nmn-panel { transform: translateY(0); }
.nmn-panel.dragging { transition: none; }
.nmn-grab { width: 42px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); margin: 10px auto 2px; flex: none; }
.nmn-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 12px; flex: none; }
.nmn-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: #fff; }
.nmn-actions { display: flex; gap: 6px; }
.nmn-actions button { font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.7); padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.06); transition: transform .15s ease, background .2s ease; }
.nmn-actions button:active { transform: scale(.94); background: rgba(255,255,255,.12); }

.nmn-sys { margin: 0 14px 10px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); flex: none; }
.nmn-sys .t { flex: 1; min-width: 0; }
.nmn-sys .t b { display: block; font-size: .82rem; color: #fff; }
.nmn-sys .t span { display: block; font-size: .7rem; color: rgba(255,255,255,.55); margin-top: 2px; line-height: 1.35; }
.nmn-switch { position: relative; width: 46px; height: 28px; flex: none; border-radius: 14px; background: rgba(255,255,255,.16); transition: background .3s ease; }
.nmn-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .35s var(--ease-spring, cubic-bezier(.34,1.45,.64,1)); }
.nmn-switch[aria-checked="true"] { background: linear-gradient(135deg, #ff7a1a, #ff4081); }
.nmn-switch[aria-checked="true"]::after { transform: translateX(18px); }
.nmn-switch[disabled] { opacity: .4; }

.nmn-list { overflow-y: auto; overscroll-behavior: contain; padding: 0 14px 16px; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.nmn-item { position: relative; display: flex; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); animation: nmnIn .45s var(--ease-out, cubic-bezier(.22,1,.36,1)) both; }
.nmn-item:nth-child(2) { animation-delay: .05s; } .nmn-item:nth-child(3) { animation-delay: .1s; } .nmn-item:nth-child(4) { animation-delay: .15s; }
@keyframes nmnIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.nmn-item.unread { background: rgba(255,122,26,.07); border-color: rgba(255,122,26,.22); }
.nmn-item.unread::before { content: ""; position: absolute; top: 14px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #ff7a1a; box-shadow: 0 0 8px rgba(255,122,26,.8); }
.nmn-ico { width: 38px; height: 38px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.08); }
.nmn-ico.update { background: linear-gradient(135deg, #ff7a1a, #ff4081); }
.nmn-ico.channel { background: linear-gradient(135deg, #25d366, #128c7e); }
.nmn-ico.music { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.nmn-body { flex: 1; min-width: 0; }
.nmn-body b { display: block; font-size: .85rem; color: #fff; padding-right: 16px; }
.nmn-body p { margin: 3px 0 0; font-size: .74rem; line-height: 1.45; color: rgba(255,255,255,.62); }
.nmn-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.nmn-meta time { font-size: .65rem; color: rgba(255,255,255,.4); }
.nmn-meta .go { font-size: .72rem; font-weight: 700; color: #fff; padding: 5px 12px; border-radius: 999px; background: linear-gradient(135deg, #ff7a1a, #ff4081); transition: transform .15s ease; }
.nmn-meta .go:active { transform: scale(.94); }
.nmn-meta .del { margin-left: auto; font-size: .68rem; color: rgba(255,255,255,.4); padding: 4px 6px; }
.nmn-empty { text-align: center; padding: 38px 20px 30px; color: rgba(255,255,255,.5); font-size: .8rem; }
.nmn-empty i, .nmn-empty svg { display: block; margin: 0 auto 10px; width: 34px; height: 34px; opacity: .5; }

/* banner dalam-aplikasi */
#nm-notif-banner {
  position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; width: min(92vw, 420px); z-index: 580;
  transform: translate(-50%, -150%); transition: transform .55s var(--ease-spring, cubic-bezier(.34,1.45,.64,1)), opacity .3s ease; opacity: 0;
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px;
  background: rgba(24,25,34,.96); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
#nm-notif-banner.show { transform: translate(-50%, 0); opacity: 1; }
#nm-notif-banner .nmn-body b { padding-right: 0; }

@media (prefers-reduced-motion: reduce) {
  .nm-bell.ring i, .nm-bell.ring svg, .nmn-item { animation: none !important; }
  .nmn-panel, #nm-notif-banner { transition-duration: .01s !important; }
}
