/* ============================================================
   notify.css — 헤더 좌측 상단 알림 토글

   버튼은 header.html 의 .hdr-l 안에 있고(.hico 를 그대로 쓴다),
   패널은 shell.html 이 .app 바깥에 갖는다. .app 의 overflow-x:clip 이
   position:fixed 자식을 잘라내기 때문이다. 위치는 notify.js 가
   버튼의 getBoundingClientRect() 로 매번 맞춘다.

   z-index — dialog.css 의 모달(9600)보다 아래, 헤더(600)보다 위.
   ============================================================ */

/* 알림 배지 — 쿠폰(hb-blue) · 쪽지(hb-gold) 와 구분되는 세 번째 색 */
.hbadge.hb-red {
  background: #C2352B;
  color: #fff;
}

/* 펼쳤을 때 버튼을 눌린 상태로 */
#ess83-ntf-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}

/* ── 패널 ───────────────────────────────── */
.ntf-panel {
  position: fixed;
  z-index: 9400;
  width: 320px;
  max-width: calc(100vw - 16px);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: #14161A;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  overflow: hidden;
  transform-origin: top left;
}

.ntf-panel[hidden] { display: none !important; }

.ntf-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #F6F1E8;
}

.ntf-close {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(246, 241, 232, .55);
  font-size: 13px;
  cursor: pointer;
}

.ntf-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.ntf-list {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ntf-item {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ntf-item:last-child { border-bottom: 0; }
.ntf-item:hover { background: rgba(255, 255, 255, .05); }

/* 안 읽은 것 — 좌측 금색 막대 */
.ntf-item.is-new { background: rgba(212, 175, 90, .07); box-shadow: inset 3px 0 0 #D4AF5A; }

.ntf-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ntf-kind {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  background: rgba(255, 255, 255, .09);
  color: rgba(246, 241, 232, .72);
}

.ntf-kind.k-charge   { background: rgba(26, 86, 219, .22);  color: #8FB4FF; }
.ntf-kind.k-exchange { background: rgba(194, 53, 43, .22);  color: #F19790; }
.ntf-kind.k-userinfo { background: rgba(255, 255, 255, .10); color: #D7D2C9; }
.ntf-kind.k-cs       { background: rgba(90, 168, 120, .20); color: #8FD9AC; }
.ntf-kind.k-event    { background: rgba(212, 175, 90, .20); color: #E4C878; }

.ntf-subject {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #F6F1E8;
  word-break: keep-all;
}

.ntf-meta {
  margin-top: 4px;
  padding-left: 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(246, 241, 232, .48);
}

.ntf-meta .ntf-amount {
  color: rgba(246, 241, 232, .78);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ntf-empty {
  padding: 34px 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(246, 241, 232, .42);
}

.ntf-empty[hidden] { display: none !important; }

@media (max-width: 480px) {
  .ntf-panel { width: calc(100vw - 16px); }
}

/* ── 토스트 ──────────────────────────────────
   새로 도착한 알림을 내용까지 띄운다. 누르면 해당 화면으로 간다.
   패널과 같은 이유로 body 직속이고, 위치는 notify.js 가 맞춘다.
   패널(9400)보다 살짝 아래 — 목록을 펼치면 토스트는 어차피 걷힌다.
   ─────────────────────────────────────────── */
.ntf-toasts {
  position: fixed;
  z-index: 9300;
  width: 300px;
  max-width: calc(100vw - 16px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.ntf-toasts[hidden] { display: none !important; }

.ntf-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 30px 10px 11px;
  background: #14161A;
  border: 1px solid rgba(255, 255, 255, .12);
  border-left: 3px solid #D4AF5A;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  cursor: pointer;
  animation: ntf-toast-in .18s ease-out both;
}

.ntf-toast:hover { background: #1A1D22; }

@keyframes ntf-toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ntf-toast { animation: none; }
}

.ntf-toast .ntf-kind { margin-top: 1px; }

.ntf-toast-body {
  flex: 1 1 auto;
  min-width: 0;
}

.ntf-toast-subject {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #F6F1E8;
  word-break: keep-all;
}

.ntf-toast-msg {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  color: rgba(246, 241, 232, .62);
  font-variant-numeric: tabular-nums;
}

.ntf-toast-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(246, 241, 232, .40);
  font-size: 11px;
  cursor: pointer;
}

.ntf-toast-close:hover { background: rgba(255, 255, 255, .10); color: #fff; }

@media (max-width: 480px) {
  .ntf-toasts { width: calc(100vw - 16px); }
}
