/* ============================================================================
 * SESTO.SENSO Portal v2 — Notification Center styles
 * ============================================================================
 * Bell button (in header), badge counter, drawer (right-side slide-in).
 * Uses existing design tokens: --pink, --surface, --border, etc.
 * ============================================================================ */

/* ---- Bell button ---- */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(0,0,0,.08));
  background: var(--surface, #fff);
  color: var(--text, #222);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
  padding: 0;
  margin-right: 8px;
}
.notif-bell:hover {
  background: var(--surface-hover, rgba(0,0,0,.04));
}
.notif-bell:active { transform: scale(0.96); }
.notif-bell.has-unread svg { color: var(--pink, #D4175E); }

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink, #D4175E);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  letter-spacing: 0;
  box-sizing: border-box;
  border: 2px solid var(--surface, #fff);
}

/* ---- Backdrop ---- */
.notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 9000;
}
.notif-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Drawer ---- */
.notif-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 380px;
  max-width: 100vw;
  background: var(--surface, #fff);
  border-left: 1px solid var(--border, rgba(0,0,0,.08));
  box-shadow: -8px 0 24px rgba(0, 0, 0, .12);
  z-index: 9001;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
}
.notif-drawer.open {
  transform: translateX(0);
}

@media (max-width: 540px) {
  .notif-drawer { width: 100vw; }
}

/* ---- Drawer header ---- */
.notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,.08));
  flex-shrink: 0;
}
.notif-drawer-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--text, #222);
}
.notif-drawer-close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(0,0,0,.08));
  background: transparent;
  color: var(--text, #222);
  cursor: pointer;
  transition: background .15s ease;
}
.notif-drawer-close:hover { background: var(--surface-hover, rgba(0,0,0,.04)); }

/* ---- Drawer body ---- */
.notif-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

/* ---- Feed item ---- */
.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border, rgba(0,0,0,.06));
  cursor: pointer;
  transition: background .12s ease;
  position: relative;
  font-family: 'DM Sans', sans-serif;
}
.notif-item:hover { background: var(--surface-hover, rgba(0,0,0,.03)); }
.notif-item.is-unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pink, #D4175E);
}

.notif-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.notif-item-title {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #222);
}
.notif-item-time {
  font-size: 11px;
  color: var(--text-muted, #888);
}
.notif-item-summary {
  font-size: 13px;
  color: var(--text-muted, #555);
  margin-bottom: 6px;
}
.notif-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.notif-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
}
.tag-sfw     { background: rgba(34, 139, 230, .12); color: #228be6; }
.tag-nsfw    { background: rgba(212, 23, 94, .12);  color: var(--pink, #D4175E); }
.tag-review  { background: rgba(250, 176, 5, .15);  color: #e8590c; }
.tag-failed  { background: rgba(220, 53, 69, .12);  color: #c92a2a; }

/* ---- Empty + loading states ---- */
.notif-empty {
  padding: 48px 24px;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
}
.notif-empty-glyph {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .6;
}
.notif-empty-text {
  font-size: 14px;
  color: var(--text, #222);
  margin-bottom: 6px;
}
.notif-empty-hint {
  font-size: 12px;
  color: var(--text-muted, #888);
  line-height: 1.5;
}
.notif-loading {
  padding: 12px 20px;
}
.notif-skel {
  height: 56px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg,
    rgba(0,0,0,.04) 0%,
    rgba(0,0,0,.08) 50%,
    rgba(0,0,0,.04) 100%);
  background-size: 200% 100%;
  animation: notif-shimmer 1.4s linear infinite;
}
@keyframes notif-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Dark theme tweaks ---- */
[data-theme="dark"] .notif-bell {
  background: var(--surface, #1a1a1a);
  border-color: var(--border, rgba(255,255,255,.1));
}
[data-theme="dark"] .notif-bell:hover {
  background: var(--surface-hover, rgba(255,255,255,.06));
}
[data-theme="dark"] .notif-drawer {
  background: var(--surface, #1a1a1a);
}
[data-theme="dark"] .notif-skel {
  background: linear-gradient(90deg,
    rgba(255,255,255,.04) 0%,
    rgba(255,255,255,.08) 50%,
    rgba(255,255,255,.04) 100%);
  background-size: 200% 100%;
}

/* Lock body scroll while drawer open */
body.notif-drawer-open { overflow: hidden; }
