/* ============================================================
   notice.css — Bảng Thông Báo & Sự Kiện (Notice & Events Panel)
   ============================================================ */

.notice-panel {
  position: absolute;
  top: 60px;
  right: 170px;
  width: 580px;
  max-width: calc(100% - 190px);
  height: min(760px, calc(100% - 100px));
  max-height: calc(100% - 100px);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  background: radial-gradient(circle at 50% 0%, rgba(26, 32, 53, 0.98), rgba(13, 17, 30, 0.99));
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(234, 179, 8, 0.15);
  color: #efe7d0;
  font-family: 'Be Vietnam Pro', 'Nunito', sans-serif;
  z-index: 35;
  backdrop-filter: blur(14px);
  animation: fadeIn 0.2s ease;
  overflow: hidden;
}

/* ==========================================================================
   Responsive for Mobile Landscape & Small Screen Viewports
   ========================================================================== */
@media (max-height: 620px), (max-width: 860px) {
  .notice-panel {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(92%, 680px) !important;
    max-width: 96% !important;
    height: min(92%, 520px) !important;
    max-height: 94% !important;
    border-radius: 12px !important;
    z-index: 10000 !important;
  }

  .np-head {
    padding: 8px 14px 6px !important;
  }
  .np-title {
    font-size: 14px !important;
  }
  .np-sub {
    font-size: 10px !important;
  }
  .np-x {
    width: 26px !important;
    height: 26px !important;
    font-size: 12px !important;
  }

  .np-tabs {
    padding: 6px 12px !important;
    gap: 6px !important;
  }
  .np-tab {
    padding: 5px 12px !important;
    font-size: 12px !important;
  }

  .np-body {
    padding: 10px 14px !important;
    gap: 8px !important;
    min-height: 0 !important;
  }
  .np-card {
    padding: 10px 14px !important;
    gap: 8px !important;
    border-radius: 8px !important;
  }
  .np-card-title {
    font-size: 13.5px !important;
  }
  .np-card-desc {
    font-size: 11.5px !important;
    line-height: 1.45 !important;
  }
}

/* Narrow portrait phone (height > width, width <= 600px) */
@media (max-width: 600px) and (orientation: portrait) {
  .notice-panel {
    width: min(94%, 480px) !important;
    max-width: 96% !important;
    height: min(90%, 620px) !important;
    max-height: 92% !important;
  }
  .np-tab {
    font-size: 11px !important;
    padding: 5px 8px !important;
  }
}

/* Header */
.np-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.35) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  flex-shrink: 0;
}

.np-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.np-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fde047;
  text-shadow: 0 0 10px rgba(253, 224, 71, 0.35);
}

.np-sub {
  font-size: 11px;
  color: #94a3b8;
}

.np-x {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.np-x:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Tabs */
.np-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(10, 8, 22, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.np-tabs::-webkit-scrollbar {
  display: none;
}

.np-tab {
  flex: 1 0 auto;
  padding: 7px 12px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.np-tab:hover {
  background: rgba(51, 65, 85, 0.6);
  color: #f1f5f9;
}

.np-tab.active {
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.25) 0%, rgba(161, 98, 7, 0.3) 100%);
  border-color: #fbbf24;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
}

.np-tab-badge {
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 10px;
  background: #22c55e;
  color: #fff;
  line-height: 1.2;
}

.np-tab-badge.hot {
  background: #ef4444;
}

/* Body — Auto expanding cards with smooth scrolling */
.np-body {
  padding: 14px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(251, 191, 36, 0.4) transparent !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-behavior: smooth;
}

.np-body::-webkit-scrollbar {
  display: block;
  width: 4px;
}

.np-body::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.35);
  border-radius: 4px;
}

/* Notice & Article Cards */
.np-card {
  background: rgba(20, 27, 45, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: auto;
  min-height: fit-content;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.np-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(26, 35, 58, 0.85);
}

.np-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.np-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.np-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.np-tag.gold {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.np-tag.red {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.np-tag.cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.np-tag.purple {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.np-tag.green {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.np-date {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.np-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.4;
  word-break: break-word;
}

.np-card-desc {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.6;
  word-break: break-word;
  white-space: normal;
}

.np-card-bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
}

/* Event Cards (Auto Height, Auto Expand) */
.np-event-card {
  background: rgba(20, 27, 45, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: auto;
  min-height: fit-content;
  box-sizing: border-box;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.np-event-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(26, 35, 58, 0.85);
}

.np-event-card.live {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.15);
}

.np-event-card.live::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #22c55e;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.np-event-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.np-event-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.np-event-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #fef08a;
  line-height: 1.35;
  word-break: break-word;
}

.np-event-meta {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}

.np-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.np-status-badge.live {
  background: #15803d;
  color: #dcfce7;
  border: 1px solid #22c55e;
  animation: npPulse 1.8s infinite;
}

.np-status-badge.today {
  background: #854d0e;
  color: #fef08a;
  border: 1px solid #eab308;
}

.np-status-badge.ended {
  background: #334155;
  color: #94a3b8;
  border: 1px solid #475569;
}

.np-status-badge.perm {
  background: #1e3a8a;
  color: #bfdbfe;
  border: 1px solid #3b82f6;
}

@keyframes npPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Event Details (Full Width Stacked, No Squeeze) */
.np-event-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 14, 26, 0.55);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.np-detail-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.np-detail-lbl {
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-width: 82px;
  flex-shrink: 0;
}

.np-detail-val {
  color: #f1f5f9;
  font-weight: 600;
  flex: 1;
  line-height: 1.45;
  word-break: break-word;
}

.np-event-act {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.np-btn {
  padding: 6px 16px;
  background: linear-gradient(180deg, #ca8a04 0%, #a16207 100%);
  border: 1px solid #fbbf24;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.np-btn:hover {
  background: linear-gradient(180deg, #eab308 0%, #ca8a04 100%);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}

.np-btn.secondary {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.np-btn.secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
}

/* Empty State */
.np-empty {
  padding: 50px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.np-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #fef08a;
}
