/* =========================================================
   announcements.css
   ========================================================= */

/* ── Reset / base ─────────────────────────────────────────── */
.ann-body {
  background: var(--bg-color, #0b0c18);
  color: var(--text-color, #e4e6eb);
  font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
  min-height: 100vh;
}

/* ── Shared container ─────────────────────────────────────── */
.ann-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.ann-hero {
  position: relative;
  padding: 96px 0 56px;
  overflow: hidden;
  background: linear-gradient(160deg, #0d0f24 0%, #070813 70%);
  border-bottom: 1px solid rgba(88,101,242,0.12);
}
.ann-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.ann-hero-orb--1 {
  width: 480px; height: 480px;
  top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(88,101,242,0.12) 0%, transparent 70%);
}
.ann-hero-orb--2 {
  width: 300px; height: 300px;
  bottom: -100px; right: -60px;
  background: radial-gradient(circle, rgba(129,140,248,0.07) 0%, transparent 70%);
}
.ann-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #818cf8;
  margin-bottom: 16px;
}
.ann-hero-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 8px rgba(129,140,248,0.7);
  animation: ann-pulse 2s ease infinite;
}
@keyframes ann-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.ann-hero-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 14px;
}
.ann-hero-sub {
  font-size: 1rem;
  color: var(--text-light, #9ca3af);
  line-height: 1.65;
  max-width: 540px;
  margin: 0;
}

/* ── Page body ────────────────────────────────────────────── */
.ann-page-body {
  padding-top: 40px;
  padding-bottom: 100px;
}

/* ── Language tabs ────────────────────────────────────────── */
.ann-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(88,101,242,0.1);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
}
.ann-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light, #9ca3af);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.ann-tab:hover { color: var(--text-color, #e4e6eb); background: rgba(255,255,255,0.05); }
.ann-tab.active {
  color: #818cf8;
  background: rgba(88,101,242,0.14);
}
.ann-tab i { font-size: 0.78rem; }

/* ── Date navigation ──────────────────────────────────────── */
.ann-date-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
}
.ann-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid rgba(88,101,242,0.18);
  background: none;
  color: var(--text-light, #9ca3af);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.ann-date-chip:hover {
  color: var(--text-color, #e4e6eb);
  background: rgba(88,101,242,0.08);
  border-color: rgba(88,101,242,0.3);
}
.ann-date-chip.active {
  color: #818cf8;
  background: rgba(88,101,242,0.15);
  border-color: rgba(88,101,242,0.4);
}
.ann-date-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: rgba(88,101,242,0.18);
  color: #818cf8;
  font-size: 0.65rem;
  font-weight: 700;
}
.ann-date-chip.active .ann-date-chip__count {
  background: rgba(88,101,242,0.35);
}
.ann-date-chip--more {
  color: #52556a;
  border-style: dashed;
  border-color: rgba(255,255,255,0.1);
}
.ann-date-chip--more:hover {
  color: var(--text-light, #9ca3af);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}
.ann-date-chip--more i { font-size: 0.7rem; }

/* ── Announcement card ────────────────────────────────────── */
.ann-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ann-card {
  background: #0f1022;
  border: 1px solid rgba(88,101,242,0.1);
  border-radius: 12px;
  padding: 20px 24px;
  transition: border-color 0.2s;
  animation: ann-fade-in 0.25s ease;
}
.ann-card:hover { border-color: rgba(88,101,242,0.22); }

@keyframes ann-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card header — avatar + author + time */
.ann-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ann-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(88,101,242,0.15);
}
.ann-author-wrap {
  flex: 1;
  min-width: 0;
}
.ann-display-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-color, #e4e6eb);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ann-username {
  font-size: 0.72rem;
  color: var(--text-light, #9ca3af);
  margin-top: 1px;
}
.ann-time {
  font-size: 0.72rem;
  color: #52556a;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
  padding-top: 2px;
}

/* Card content — wrapper only; block/inline styling via dm-* classes */
.ann-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #c8caf0;
  word-break: break-word;
}

/* ── Discord markdown rendered elements (dm-*) ──────────────────────────── */

/* Headings */
.dm-h1, .dm-h2, .dm-h3 {
  color: var(--text-color, #e4e6eb);
  font-weight: 700;
  line-height: 1.3;
  margin: 14px 0 6px;
}
.dm-h1 { font-size: 1.5rem;  border-bottom: 1px solid rgba(255,255,255,0.06); padding-bottom: 6px; }
.dm-h2 { font-size: 1.2rem;  border-bottom: 1px solid rgba(255,255,255,0.04); padding-bottom: 4px; }
.dm-h3 { font-size: 1rem;    }

/* Blockquotes */
.dm-blockquote {
  border-left: 3px solid rgba(255,255,255,0.2);
  margin: 6px 0;
  padding: 4px 0 4px 12px;
  color: #9ca3af;
  border-radius: 0 2px 2px 0;
}
.dm-blockquote--multi {
  border-left-color: rgba(88,101,242,0.5);
  background: rgba(88,101,242,0.04);
  padding: 8px 0 8px 14px;
  border-radius: 0 6px 6px 0;
}

/* Lists */
.dm-ul, .dm-ol {
  margin: 6px 0;
  padding-left: 1.4em;   /* enough room for the marker without crowding text */
  color: #c8caf0;
  list-style-position: outside;
}
.dm-ul--nested {
  margin: 2px 0;
  padding-left: 1.4em;
}
.dm-li {
  margin: 2px 0;
  line-height: 1.65;
  padding-left: 0.15em;  /* small gap: marker → text */
}
.dm-li--nested {
  margin: 1px 0;
  line-height: 1.65;
}
.dm-ul           { list-style-type: disc; }
.dm-ul--nested   { list-style-type: circle; }
.dm-ol           { list-style-type: decimal; }

/* Fenced code block */
.dm-pre {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 10px 0;
  overflow-x: auto;
  position: relative;
}
.dm-pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #52556a;
  font-family: inherit;
}
.dm-code {
  font-family: 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.83rem;
  color: #c8caf0;
  background: none;
  padding: 0;
}

/* Inline code */
.dm-inline-code {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.82em;
  color: #c8caf0;
  border: 1px solid rgba(255,255,255,0.06);
}

/* Spoilers */
.dm-spoiler {
  background: rgba(0,0,0,0.5);
  color: transparent;
  border-radius: 3px;
  padding: 0 3px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  user-select: none;
}
.dm-spoiler--on {
  background: rgba(255,255,255,0.08);
  color: #c8caf0;
  cursor: default;
}

/* Inline formatting */
.ann-content strong, .ann-embed-desc strong { color: var(--text-color, #e4e6eb); font-weight: 700; }
.ann-content em,     .ann-embed-desc em     { font-style: italic; }
.ann-content del,    .ann-embed-desc del    { text-decoration: line-through; color: #52556a; }
.ann-content u,      .ann-embed-desc u      { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); }

/* Links */
.dm-link, .ann-content a {
  color: #818cf8;
  text-decoration: none;
  word-break: break-all;
}
.dm-link:hover, .ann-content a:hover { text-decoration: underline; }

/* Discord-style mention badges */
.dm-mention {
  display: inline;
  background: rgba(88,101,242,0.15);
  color: #818cf8;
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 500;
  cursor: default;
}
.dm-mention--role {
  /* color + background overridden inline via role color */
}
.dm-mention--channel {
  background: rgba(88,101,242,0.15);
  color: #818cf8;
}
.dm-mention--everyone {
  background: rgba(250,173,20,0.15);
  color: #faad14;
}

/* Attachments */
.ann-attachments {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ann-attachment-img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 8px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.15s;
  border: 1px solid rgba(255,255,255,0.06);
}
.ann-attachment-img:hover { opacity: 0.9; }
.ann-attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #9ca3af;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.ann-attachment-file:hover { background: rgba(255,255,255,0.07); color: #c8caf0; }
.ann-attachment-file i { color: #818cf8; font-size: 0.85rem; }

/* Embeds */
.ann-embeds {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ann-embed {
  border-radius: 6px;
  border-left: 4px solid #4f545c;
  background: rgba(0,0,0,0.2);
  padding: 12px 16px;
  font-size: 0.86rem;
  overflow: hidden;
}
.ann-embed-author {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}
.ann-embed-author-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
.ann-embed-author-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c8caf0;
}
.ann-embed-title {
  font-weight: 700;
  color: var(--text-color, #e4e6eb);
  margin-bottom: 6px;
  font-size: 0.92rem;
  line-height: 1.4;
}
.ann-embed-title a { color: #818cf8; text-decoration: none; }
.ann-embed-title a:hover { text-decoration: underline; }
.ann-embed-desc {
  color: #9ca3af;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.ann-embed-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.ann-embed-field-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #c8caf0;
  margin-bottom: 3px;
}
.ann-embed-field-value {
  font-size: 0.83rem;
  color: #9ca3af;
  line-height: 1.5;
}
.ann-embed-image {
  max-width: 100%;
  border-radius: 6px;
  margin-top: 10px;
  display: block;
  border: 1px solid rgba(255,255,255,0.04);
}
.ann-embed-thumbnail {
  float: right;
  max-width: 80px;
  max-height: 80px;
  border-radius: 6px;
  margin: 0 0 8px 12px;
  object-fit: cover;
}
.ann-embed-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.72rem;
  color: #52556a;
  clear: both;
}
.ann-embed-footer-icon {
  width: 16px; height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

/* Jump-to-Discord link */
.ann-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.75rem;
  color: #52556a;
  text-decoration: none;
  transition: color 0.15s;
}
.ann-jump:hover { color: #818cf8; }
.ann-jump i { font-size: 0.8rem; }

/* ── Skeleton loading ─────────────────────────────────────── */
.ann-skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ann-skeleton {
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.07) 40%,
    rgba(255,255,255,0.04) 80%
  );
  background-size: 200% 100%;
  animation: ann-shimmer 1.4s ease infinite;
}
.ann-skeleton--short { height: 80px; }
@keyframes ann-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty / error state ──────────────────────────────────── */
.ann-empty {
  text-align: center;
  padding: 72px 24px;
}
.ann-empty-icon {
  font-size: 2.4rem;
  color: rgba(88,101,242,0.25);
  margin-bottom: 18px;
}
.ann-empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-color, #e4e6eb);
  margin-bottom: 8px;
}
.ann-empty-sub {
  font-size: 0.88rem;
  color: var(--text-light, #9ca3af);
}

/* ── Load older button (mirrors apply-back-link) ──────────── */
.ann-load-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.ann-load-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #72768a;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.ann-load-btn:hover { color: #c8caf0; background: rgba(255,255,255,0.04); }
.ann-load-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ann-load-btn i { font-size: 0.85rem; }

/* ── Inline loading indicator ─────────────────────────────── */
.ann-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 28px 0;
  font-size: 0.84rem;
  color: var(--text-light, #9ca3af);
}
.ann-loading i { font-size: 0.9rem; }

.dm-ul--nested {
    list-style-type: circle;     /* hollow circle ○ */
    padding-left: 1.5em;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .ann-hero        { padding: 80px 0 44px; }
  .ann-hero-title  { font-size: 1.7rem; }
  .ann-card        { padding: 16px 18px; }
  .ann-embed       { padding: 10px 12px; }
  .ann-embed-thumbnail { max-width: 56px; max-height: 56px; }
  .ann-embed-fields { grid-template-columns: 1fr 1fr; }
  .ann-attachment-img { max-height: 240px; }
  .ann-tabs        { width: 100%; }
  .ann-tab         { flex: 1; justify-content: center; }
}
