/* ====================================================================
   BIONUL EDTECH PLATFORM - ANNOUNCEMENTS & ALERTS STYLES
   css/announcements.css — Mobile-first, matching Bionul design language
   ==================================================================== */

.announcements-page-container {
  max-width: 580px;
  margin: 0 auto;
  padding: 8px 14px 90px 14px;
}

/* ====================================================================
   1. TOP BAR NAVIGATION
   ==================================================================== */
.ann-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 14px 2px;
}

.ann-header-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-heading, #0F172A);
  letter-spacing: -0.02em;
  margin: 0;
  flex: 1;
}

.ann-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ann-header-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-heading, #0F172A);
  cursor: pointer;
  transition: background var(--transition-fast, 0.2s);
}

.ann-header-icon-btn:hover {
  background: var(--surface-subtle, #F1F5F9);
}

/* Search Bar */
.ann-search-bar-wrap {
  display: none;
  margin-bottom: 14px;
  animation: slideDown 0.2s ease-out;
}

.ann-search-bar-wrap.show {
  display: block;
}

.ann-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-color, #E2E8F0);
  border-radius: var(--radius-full, 9999px);
  padding: 8px 16px;
  box-shadow: var(--shadow-sm);
}

.ann-search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.88rem;
  color: var(--text-heading);
  background: transparent;
  font-family: inherit;
}

.ann-search-clear {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

/* ====================================================================
   2. SEGMENTED TABS
   ==================================================================== */
.ann-tabs-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #F1F5F9;
  border-radius: var(--radius-full, 9999px);
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}

.ann-tabs-bar .seg-tab-btn {
  padding: 8px 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.ann-tabs-bar .seg-tab-btn.active {
  background: var(--primary, #5B3DF5);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(91, 61, 245, 0.28);
}

/* ====================================================================
   3. PROMOTIONAL HERO BANNER
   ==================================================================== */
.ann-hero-card {
  background: #F4F2FF;
  border: 1.5px solid #E0DBFD;
  border-radius: var(--radius-xl, 20px);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.ann-hero-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #5B3DF5;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(91, 61, 245, 0.35);
}

.ann-hero-text-col {
  min-width: 0;
}

.ann-hero-headline {
  font-size: 1.02rem;
  font-weight: 800;
  color: #1E1B4B;
  line-height: 1.25;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.ann-hero-subtitle {
  font-size: 0.78rem;
  color: #4338CA;
  line-height: 1.35;
  font-weight: 500;
}

.ann-hero-illustration {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====================================================================
   4. ANNOUNCEMENT CARDS
   ==================================================================== */
.ann-card-item {
  background: var(--surface-card, #FFFFFF);
  border: 1px solid var(--border-color, #EAEBF2);
  border-radius: var(--radius-xl, 18px);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast, 0.2s), box-shadow var(--transition-fast, 0.2s);
  position: relative;
}

.ann-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ann-card-item.priority-important {
  border-left: 4.5px solid #EF4444;
}

.ann-card-item.priority-exam {
  border-left: 4.5px solid #8B5CF6;
}

.ann-card-item.priority-live {
  border-left: 4.5px solid #10B981;
}

.ann-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.ann-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ann-badge-pill.important {
  background: #FEE2E2;
  color: #DC2626;
}

.ann-badge-pill.exam {
  background: #EDE9FE;
  color: #6D28D9;
}

.ann-badge-pill.live {
  background: #DCFCE7;
  color: #16A34A;
}

.ann-badge-pill.general {
  background: #E0F2FE;
  color: #0284C7;
}

.ann-card-date {
  font-size: 0.74rem;
  color: var(--text-muted, #64748B);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ann-card-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-heading, #0F172A);
  line-height: 1.35;
  margin-bottom: 8px;
}

.ann-card-body {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-body, #334155);
  margin-bottom: 12px;
}

.ann-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle, #F1F5F9);
}

.ann-target-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-subtle);
  padding: 3px 8px;
  border-radius: 6px;
}

.ann-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.ann-action-btn:hover {
  transform: translateX(2px);
  text-decoration: underline;
}

/* ====================================================================
   5. SKELETONS
   ==================================================================== */
.ann-skeleton-card {
  width: 100%;
  height: 140px;
  border-radius: 18px;
  background: linear-gradient(90deg, #F8FAFC 25%, #EDE9FE 50%, #F8FAFC 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s infinite;
  margin-bottom: 14px;
}

@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

/* Responsive */
@media (max-width: 360px) {
  .ann-tabs-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .ann-hero-illustration {
    display: none;
  }
}
