/* 알림 페이지 - 공지사항과 내 알림.
   아이콘은 전부 인라인 SVG 로 직접 그렸다(외부 CDN 의존·저작권 문제 없음). */

.notice-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* ── 머리 영역 ─────────────────────────────────────────── */
.notice-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.notice-hero-art {
  flex-shrink: 0;
  /* 종이 살짝 흔들린다. 장식은 이 하나로 충분하다. */
  animation: notice-ring 5s ease-in-out infinite;
  transform-origin: 50% 12%;
}

@keyframes notice-ring {
  0%, 86%, 100% { transform: rotate(0); }
  88% { transform: rotate(9deg); }
  91% { transform: rotate(-8deg); }
  94% { transform: rotate(5deg); }
  97% { transform: rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .notice-hero-art { animation: none; }
}

.notice-title {
  font-size: 1.6rem;
  margin: 0;
}

.notice-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: #6b7280;
}

/* ── 탭 ────────────────────────────────────────────────── */
.notice-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.notice-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
}

.notice-tab.active {
  color: #e63946;
  border-bottom-color: #e63946;
}

.notice-badge {
  display: inline-block;
  min-width: 1.3em;
  padding: 0 0.35em;
  margin-left: 0.25rem;
  border-radius: 999px;
  background: #e63946;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
}

.notice-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
}

.notice-readall {
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  color: #6b7280;
  cursor: pointer;
}

.notice-readall:hover { background: #f3f4f6; }

/* ── 목록 ──────────────────────────────────────────────── */
.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.notice-item {
  display: flex;
  gap: 0.8rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.notice-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

/* 링크형 알림은 <a> 가 아이콘까지 감싸므로 안쪽에도 같은 배치를 준다. */
.notice-link {
  display: flex;
  gap: 0.8rem;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

/* 안 읽은 알림은 왼쪽 띠로 구분한다. 색만 살짝 바꾸면 눈에 안 띈다. */
.notice-item.is-unread {
  border-left: 3px solid #e63946;
  cursor: pointer;
}

/* ── 유형 메달(아이콘) ─────────────────────────────────── */
.notice-medal {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f5;
  color: #6b7280;
}

.notice-medal--info        { background: #e8f1fd; color: #2563eb; }
.notice-medal--update      { background: #e7f7ef; color: #16a34a; }
.notice-medal--event       { background: #fdeef3; color: #db2777; }
.notice-medal--warning     { background: #fdf3e0; color: #d97706; }
.notice-medal--maintenance { background: #eef1f5; color: #475569; }
.notice-medal--winner      { background: #fdf6dd; color: #ca8a04; }
.notice-medal--expired     { background: #fde8ea; color: #e63946; }
.notice-medal--reminder    { background: #f0ebfa; color: #7c3aed; }
.notice-medal--deleted     { background: #eef1f5; color: #6b7280; }

.notice-item-main {
  flex: 1;
  min-width: 0;
}

.notice-item-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.notice-item-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.notice-pin {
  font-size: 0.7rem;
  font-weight: 700;
  color: #e63946;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.notice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e63946;
  flex-shrink: 0;
}

.notice-item-body {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #374151;
  /* 공지는 줄바꿈을 그대로 살려야 읽힌다. */
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.notice-item-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ── 로딩 뼈대 ─────────────────────────────────────────── */
/* 빈 화면에 갑자기 목록이 꽂히면 화면이 튀어 보인다. 자리부터 잡아 둔다. */
.notice-skel {
  height: 86px;
  border-radius: 14px;
  background: linear-gradient(100deg, #f1f3f6 40%, #fafbfc 50%, #f1f3f6 60%);
  background-size: 200% 100%;
  animation: notice-shimmer 1.2s linear infinite;
}

@keyframes notice-shimmer {
  to { background-position: -200% 0; }
}

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

/* ── 빈 화면 ───────────────────────────────────────────── */
.notice-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 2.5rem 0 2rem;
  color: #9ca3af;
  font-size: 0.9rem;
  text-align: center;
}

.notice-empty p { margin: 0; }
