/* ════════════════════════════════════════
   ANNOUNCEMENTS — Cập Nhật & Thông Báo
   Dark theme nhất quán với site
════════════════════════════════════════ */

/* ── Container section ── */
.ann-section {
  margin: 28px 0 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.025);
  overflow: hidden;
}

/* ── Top tab bar ── */
.ann-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.18);
}
.ann-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  font-size: .82rem;
  font-weight: 700;
  color: rgba(240,242,248,.45);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .18s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
  white-space: nowrap;
}
.ann-tab.active {
  color: #f0f2f8;
  border-bottom-color: #a29bfe;
}
.ann-tab-badge {
  background: rgba(108,92,231,.85);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1.4;
}
.ann-tab-badge.red { background: rgba(255,70,70,.85); }

/* ── Inner toolbar ── */
.ann-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  flex-wrap: wrap;
}
.ann-search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 6px 12px;
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}
.ann-search-wrap i { color: rgba(240,242,248,.3); font-size: .8rem; }
.ann-search-inp {
  background: none;
  border: none;
  outline: none;
  color: #f0f2f8;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
}
.ann-search-inp::placeholder { color: rgba(240,242,248,.28); font-size: .8rem; }
.ann-cat-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.ann-cat-btn {
  padding: 5px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: rgba(240,242,248,.5);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.ann-cat-btn.active,
.ann-cat-btn:hover {
  background: rgba(108,92,231,.18);
  border-color: rgba(108,92,231,.4);
  color: #a29bfe;
}

/* ── Scroll list ── */
.ann-list {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(108,92,231,.3) transparent;
}
.ann-list::-webkit-scrollbar { width: 4px; }
.ann-list::-webkit-scrollbar-thumb { background: rgba(108,92,231,.3); border-radius: 2px; }

/* ── Card ── */
.ann-card {
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .15s;
  position: relative;
}
.ann-card:last-child { border-bottom: none; }
.ann-card:hover { background: rgba(255,255,255,.02); }

/* Left accent bar driven by --ann-color CSS var */
.ann-card::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ann-color, #6c5ce7);
  opacity: .8;
}

/* ── Card header row ── */
.ann-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ann-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid;
}
.ann-badge-pin   { background: rgba(255,200,0,.15); color: #ffd700;   border-color: rgba(255,200,0,.3); }
.ann-badge-update{ background: rgba(99,179,237,.12); color: #63b3ed;  border-color: rgba(99,179,237,.25); }
.ann-badge-feature{background: rgba(0,230,118,.1);  color: #00e676;  border-color: rgba(0,230,118,.25); }
.ann-badge-bugfix{ background: rgba(255,100,80,.12);color: #ff7070;  border-color: rgba(255,100,80,.25); }
.ann-badge-maint { background: rgba(200,150,255,.1);color: #c8a0ff; border-color: rgba(200,150,255,.25); }
.ann-badge-news  { background: rgba(240,180,60,.12); color: #f0b43c;  border-color: rgba(240,180,60,.25); }
.ann-product-tag {
  font-size: .68rem;
  color: rgba(240,242,248,.38);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ann-card-time {
  margin-left: auto;
  font-size: .68rem;
  color: rgba(240,242,248,.28);
  white-space: nowrap;
}

/* ── Title & content ── */
.ann-card-title {
  font-size: .97rem;
  font-weight: 800;
  color: #f0f2f8;
  line-height: 1.35;
  margin-bottom: 6px;
}
.ann-card-content {
  font-size: .8rem;
  color: rgba(240,242,248,.6);
  line-height: 1.55;
  margin-bottom: 10px;
}
.ann-card-content a {
  color: var(--ann-color, #a29bfe);
  text-decoration: underline;
}
.ann-card-content img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.ann-card-content b, .ann-card-content strong { color: #f0f2f8; }
.ann-card-content code {
  background: rgba(255,255,255,.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: .82em;
  font-family: monospace;
}

/* ── Footer row ── */
.ann-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ann-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: rgba(240,242,248,.38);
  font-size: .8rem;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all .18s;
}
.ann-like-btn.liked,
.ann-like-btn:hover { color: #ff4d6a; }
.ann-like-btn.liked i { color: #ff4d6a; }
.ann-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: rgba(240,242,248,.75);
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .18s;
  cursor: pointer;
  font-family: inherit;
}
.ann-link-btn.primary {
  background: rgba(108,92,231,.2);
  border-color: rgba(108,92,231,.4);
  color: #a29bfe;
}
.ann-link-btn:hover { opacity: .8; transform: translateY(-1px); }

/* ── Empty state ── */
.ann-empty {
  text-align: center;
  padding: 40px 16px;
  color: rgba(240,242,248,.28);
  font-size: .82rem;
}
.ann-empty i { font-size: 2rem; display: block; margin-bottom: 10px; }

/* ── Detail page overlay ── */
.ann-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.ann-detail-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.ann-detail-modal {
  background: #13151f;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 24px;
  max-width: 620px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  transform: translateY(24px);
  transition: transform .22s;
  scrollbar-width: thin;
  scrollbar-color: rgba(108,92,231,.3) transparent;
}
.ann-detail-overlay.open .ann-detail-modal { transform: none; }
.ann-detail-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.ann-detail-close {
  margin-left: auto;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(240,242,248,.6);
  font-size: .85rem;
  flex-shrink: 0;
  transition: all .15s;
}
.ann-detail-close:hover { background: rgba(255,70,70,.15); color: #ff7070; }
.ann-detail-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #f0f2f8;
  line-height: 1.3;
  flex: 1;
}
.ann-detail-content {
  font-size: .87rem;
  color: rgba(240,242,248,.72);
  line-height: 1.7;
}
.ann-detail-content a { color: #a29bfe; }
.ann-detail-content img { max-width: 100%; border-radius: 10px; margin: 8px 0; }
.ann-detail-content p { margin: 0 0 10px; }
.ann-detail-content b, .ann-detail-content strong { color: #f0f2f8; }
.ann-detail-content ul, .ann-detail-content ol { padding-left: 18px; margin: 0 0 10px; }
.ann-detail-content code {
  background: rgba(255,255,255,.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .83em;
  font-family: monospace;
}
.ann-detail-content pre {
  background: rgba(0,0,0,.4);
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 10px 0;
}

/* Mobile */
@media(max-width:540px) {
  .ann-tab { padding: 11px 12px; font-size: .76rem; }
  .ann-card-title { font-size: .88rem; }
  .ann-cat-filters { display: none; }
  .ann-search-wrap { max-width: 100%; }
}
@media(hover:none) {
  .ann-card:hover { background: transparent; }
  .ann-link-btn:hover { opacity: 1; transform: none; }
  .ann-like-btn:hover:not(.liked) { color: rgba(240,242,248,.38); }
}
