/**
 * notif_sheet.css — 알림 바텀시트
 * Brand: #6a0dad / #671175 · Pretendard
 */

/* ── 벨 버튼 ── */
.wh-nav-right { margin-left: auto; }

.wh-nav-bell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wh-text-primary, #111827);
  padding: 0;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid #fff;
  pointer-events: none;
}

/* ── 오버레이 ── */
.notif-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 9999;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.notif-overlay.is-open { display: flex; }

/* ── 바텀시트 모달 ── */
.notif-modal {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #fff;
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-width: 480px;
  height: 84vh;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  animation: notif-slide-up .3s cubic-bezier(.16, 1, .3, 1);
  will-change: transform, height;
  box-shadow: 0 -2px 24px rgba(106, 13, 173, .07);
}

@keyframes notif-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* 드래그 핸들 */
.notif-drag-handle {
  width: 32px;
  height: 3px;
  background: #e9e9ef;
  border-radius: 999px;
  margin: 12px auto 0;
  flex-shrink: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.notif-drag-handle:active { cursor: grabbing; }

/* ── 모달 헤더 ── */
.notif-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}

.notif-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  letter-spacing: -0.5px;
}

/* 닫기 버튼 — 기본 스타일 완전 리셋 후 재정의 */
.notif-modal-close {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}

.notif-modal-close:active { background: #ede0f7; }

.notif-modal-close svg {
  width: 13px;
  height: 13px;
  color: #9ca3af;
  display: block;
  transition: color .15s;
}

.notif-modal-close:active svg { color: #6a0dad; }

/* ── 탭 바 ── */
.notif-tab-bar {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid #f3eef8;
}

.notif-tab-bar::-webkit-scrollbar { display: none; }

/* 탭 버튼 — 기본 스타일 완전 리셋 */
.notif-tab {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #671175;
  background: #f3eef8;
  border: none;
  outline: none;
  border-radius: 30px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, color .18s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Pretendard', -apple-system, sans-serif;
}

.notif-tab:active { transform: scale(0.95); }

.notif-tab.is-active {
  background: linear-gradient(135deg, #671175, #6a0dad);
  color: #fff;
}

/* 탭 카운트 뱃지 */
.notif-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  line-height: 1;
  background: #ede0f7;
  color: #6a0dad;
  transition: background .18s, color .18s;
}

.notif-tab.is-active .notif-tab-badge {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

/* ── 전체 삭제 바 ── */
.notif-clear-bar {
  display: flex;
  justify-content: flex-end;
  padding: 6px 16px 5px;
  flex-shrink: 0;
  border-bottom: 1px solid #f8f4ff;
}

/* 전체 삭제 버튼 — 기본 스타일 완전 리셋 */
.notif-clear-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #c0c5d0;
  background: transparent;
  border: none;
  outline: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Pretendard', -apple-system, sans-serif;
}

.notif-clear-btn:active {
  color: #6a0dad;
  background: #f3eef8;
}

.notif-clear-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  display: block;
}

/* ── 바디 ── */
.notif-modal-body {
  overflow-y: auto;
  flex: 1;
  padding-bottom: env(safe-area-inset-bottom);
  overscroll-behavior: contain;
}

/* ── 알림 아이템 ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  position: relative;
  cursor: default;
  transition: background .12s;
}

.notif-item + .notif-item { border-top: 1px solid #f8f4ff; }

.notif-item[data-id] { cursor: pointer; }
.notif-item[data-id]:active { background: #faf6ff; }

.notif-item.is-unread { background: #fdfaff; }
.notif-item.is-unread[data-id]:active { background: #f4eeff; }

/* ── 아이콘 박스 — 탭별 색상 ── */
.notif-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* 기본 (fallback) */
  background: #f3eef8;
  color: #6a0dad;
}

/* 예약 — 브랜드 퍼플 */
.notif-item-icon--book {
  background: #f0e8fc;
  color: #6a0dad;
}

/* 메시지 — 스카이 블루 */
.notif-item-icon--message {
  background: #e4f0fd;
  color: #1565c0;
}

/* 결제 — 워밍 앰버 */
.notif-item-icon--pay {
  background: #fff8e1;
  color: #e65100;
}

.notif-item-icon svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* ── 아이템 텍스트 ── */
.notif-item-body {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.notif-item-msg {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-time {
  font-size: 11px;
  color: #b8bec8;
  margin-top: 5px;
  font-weight: 500;
}

/* ── 아이템 오른쪽 (dot + 삭제버튼) ── */
.notif-item-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 2px;
}

/* 읽지 않음 도트 */
.notif-item-dot {
  width: 7px;
  height: 7px;
  background: #6a0dad;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 개별 삭제 버튼 — 기본 스타일 완전 리셋 */
.notif-delete-btn {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}

.notif-delete-btn:active { background: #f0e8fc; }

.notif-delete-btn svg {
  width: 12px;
  height: 12px;
  color: #c8cdd8;
  display: block;
  transition: color .15s;
}

.notif-delete-btn:active svg { color: #6a0dad; }

/* ── 썸네일 ── */
.notif-item-thumb {
  margin-top: 6px;
  border-radius: 8px;
  overflow: hidden;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.notif-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── 빈 상태 ── */
.notif-empty,
.notif-tab-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 10px;
}

.notif-empty svg,
.notif-tab-empty svg {
  width: 40px;
  height: 40px;
  fill: #6a0dad;
  opacity: .15;
}

.notif-empty p,
.notif-tab-empty p {
  font-size: 13px;
  color: #b8bec8;
  margin: 0;
  font-weight: 500;
  font-family: 'Pretendard', -apple-system, sans-serif;
}
