﻿/* Shared notification inbox (store / admin / partner) */
:root {
  --notif-brand: var(--brand, var(--admin-accent, var(--partner-accent, #C45C26)));
  --notif-ink: var(--ink, #1c1612);
  --notif-muted: var(--muted, #7a6a5c);
  --notif-accent: var(--accent, var(--notif-brand));
  --notif-line: var(--line, rgba(0,0,0,.08));
  --notif-font-display: var(--font-display, Syne, system-ui, sans-serif);
}
.icon-btn.notif-bell {
  width: 40px; height: 40px; border-radius: 14px;
  border: 1px solid var(--notif-line);
  background: #fff; display: grid; place-items: center;
  color: var(--notif-ink); text-decoration: none; cursor: pointer;
  position: relative; padding: 0;
}
.notif-bell { position: relative; }
.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--notif-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}
.notif-badge[hidden] { display: none !important; }

.notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 12, .4);
  z-index: 90;
  backdrop-filter: blur(2px);
}
.notif-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  max-height: min(78vh, 640px);
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -16px 48px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: notif-up .28s cubic-bezier(.2,.8,.2,1);
}
.notif-sheet[hidden], .notif-backdrop[hidden] { display: none !important; }
body.notif-open { overflow: hidden; }

.notif-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #e4d9cf;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.notif-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.notif-sheet-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.notif-sheet-title h2 {
  margin: 0;
  font-family: var(--notif-font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--notif-ink);
}
.notif-unread-pill {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: var(--notif-brand);
  border-radius: 999px;
  padding: 3px 8px;
}
.notif-unread-pill[hidden] { display: none !important; }
.notif-sheet-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.notif-text-btn {
  border: 0;
  background: transparent;
  color: var(--notif-brand);
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 8px;
}
.notif-text-btn:hover { background: #fff4ec; }
.notif-icon-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: #f4efe9;
  color: var(--notif-ink);
  display: grid;
  place-items: center;
}
.notif-icon-close:hover { background: #ebe4db; }

.notif-list {
  flex: 1;
  overflow: auto;
  padding: 8px 10px 16px;
  -webkit-overflow-scrolling: touch;
}
.notif-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--notif-muted);
}
.notif-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: #fff4ec;
  color: var(--notif-brand);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}
.notif-empty p {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--notif-ink);
  font-size: .95rem;
}
.notif-empty span {
  font-size: .8rem;
  line-height: 1.4;
}

.notif-item {
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
  margin-bottom: 6px;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.notif-item:hover { background: #faf6f1; }
.notif-item.is-unread {
  background: linear-gradient(135deg, #fff8f0, #fff);
  border-color: rgba(196, 92, 38, 0.14);
}
.notif-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f4efe9;
  color: var(--notif-accent);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.notif-item.is-unread .notif-item-icon {
  background: #ffe8d4;
  color: var(--notif-brand);
}
.notif-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.notif-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.notif-item-top strong {
  font-size: .9rem;
  font-weight: 800;
  color: var(--notif-ink);
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-item-top time {
  flex-shrink: 0;
  font-size: .68rem;
  color: #a08978;
  font-weight: 600;
}
.notif-item-text {
  font-size: .78rem;
  color: var(--notif-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-chevron {
  color: #cbbbaa;
  font-size: .85rem;
}
.notif-item.is-unread .notif-item-chevron { color: var(--notif-brand); }

@keyframes notif-up {
  from { transform: translateY(24px); opacity: .5; }
  to { transform: none; opacity: 1; }
}

@media (min-width: 768px) {
  .notif-sheet {
    left: auto;
    right: 16px;
    bottom: 16px;
    top: auto;
    width: min(400px, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
  }
  .notif-sheet-handle { display: none; }
}

