/* notify.css — /p/notify (full Announcements list). Design source:
   WEBSYS_MD/NOTIFICATION_ANNOUNCEMENTS_REQUIREMENTS.md §4. Item styling
   mirrors the nav bell dropdown's .ppw-notify-item (nav.css) at a larger
   scale, since this is that same list's "view all" destination. */

*, *::before, *::after { box-sizing: border-box; }

body { background: var(--space-gradient), var(--bg-primary); background-repeat: no-repeat; background-attachment: fixed; color: var(--text-primary); font-family: var(--font-thai); margin: 0; }

.ntf-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--navbar-h));
  min-height: calc(100dvh - var(--navbar-h));
  padding: 48px 20px 20px; display: flex; flex-direction: column; align-items: center;
}
/* margin-top: auto (not a flat 20px) — pushes the footer to the very
   bottom of .ntf-page's flex column regardless of how short the list is,
   instead of sitting right under it (2026-08-01 fix). */
.ntf-page .lg-footer-link { margin-top: auto; padding-top: 20px; }

.ntf-hero { text-align: center; max-width: 560px; margin-bottom: 28px; }
.ntf-hero h1 { font-size: 26px; font-weight: 700; margin: 0 0 8px; }
.ntf-hero p { font-size: 14px; color: var(--text-secondary); margin: 0; }

.ntf-list { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 10px; }
.ntf-empty { text-align: center; color: var(--text-secondary); font-size: 13px; padding: 24px 0; }

.ntf-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
/* Both states below match each card's OWN accent-stripe color (teal
   normally, red when urgent — same colors as the ::before stripe below),
   not a universal gold (revised 2026-08-11 ask — "สีขอบก็ต้องกับสีการ์ด"). */
.ntf-card.is-unread { border-color: rgba(var(--accent-teal-rgb), 0.4); }
.ntf-card.is-unread.is-urgent { border-color: rgba(var(--like-red-rgb), 0.4); }
/* Expanded-state border (2026-08-11 ask) — same treatment as the nav bell
   dropdown's .ppw-notify-card.is-expanded, so whichever card is currently
   open reads as visually distinct instead of just "not collapsed". */
.ntf-card.is-expanded { border-color: rgba(var(--accent-teal-rgb), 0.6); }
.ntf-card.is-expanded.is-urgent { border-color: rgba(var(--like-red-rgb), 0.6); }
.ntf-card::before {
  content: '';
  position: absolute;
  left: 0; top: 9px; bottom: 9px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--accent-teal);
  opacity: 0.35;
}
:root[data-theme="light"] .ntf-card::before { background: #13CDCB; }
.ntf-card.is-urgent::before { background: #e8435a; }
.ntf-card.is-unread::before { opacity: 0.9; }

.ntf-card__head {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: 600 14px var(--font-thai);
  text-align: left;
  cursor: pointer;
}
.ntf-card.is-unread .ntf-card__head { color: var(--text-primary); }
/* Pinned indicator (2026-08-11 ask) — same FontAwesome thumbtack glyph +
   gold color as the nav bell dropdown's .ppw-notify-card__pin. */
.ntf-card__pin { flex: none; font-size: 12px; color: var(--accent-gold); display: flex; }
:root[data-theme="light"] .ntf-card__pin { color: #F4A140; }
.ntf-card__title { flex: 1; line-height: 1.4; font-size: 15px; color: var(--text-primary); }
/* Dimming driven by `.is-read-dim`, not simply "not unread" (2026-08-11 ask)
   — the card just clicked open stays full-brightness until another card is
   opened or the page is reloaded; see renderList()'s justReadId in notify.js. */
.ntf-card.is-read-dim .ntf-card__title { opacity: 0.72; }
.ntf-card__date { font-size: 11px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; opacity: 0.65; }
.ntf-card__urgent {
  flex: none;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(var(--like-red-rgb), 0.18);
  color: var(--like-red);
  font-size: 10px; font-weight: 700;
}

.ntf-card__body { padding: 0 18px 18px; }
.ntf-card__body[hidden] { display: none; }
.ntf-card__body .sp-markdown { font-size: 13px; }
.ntf-card__footer {
  margin: 14px -18px -18px;
  padding: 8px 18px;
  background: rgba(var(--surface-rgb), 0.025);
  border-top: 1px solid rgba(var(--surface-rgb), 0.05);
}
.ntf-card__footer .ppw-notify-item__links { margin-top: 0; }

@media (max-width: 600px) {
  .ntf-page { padding: 32px 16px 16px; }
  .ntf-hero h1 { font-size: 22px; }
  .ntf-card__head { padding: 14px 14px; gap: 8px; }
  .ntf-card__body { padding: 0 14px 14px; }
  .ntf-card__footer { margin: 12px -14px -14px; padding: 8px 14px; }
}
