/* ==========================================================================
   Announcements page
   ========================================================================== */

@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/misc/Farsi-Digits/Vazirmatn-FD-font-face.css");

.vp-mobile .layout--announcements .content.announcements-content-host {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0)) !important;
}

.announcements-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  font-family: Vazirmatn, inherit;
  overflow: visible;
}

.announcements-page__badge-row {
  display: flex;
  justify-content: flex-start;
}

.announcements-page__add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: Vazirmatn, inherit;
  font-size: 14px;
  font-weight: 600;
  background: #0f172a;
  border-color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.ann-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ann-page-badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--danger, #e5484d);
  padding: 6px 12px;
  border-radius: 999px;
}

.ann-card {
  position: relative;
  background: var(--surface, #fff);
  border-radius: 16px;
  border: 1px solid #e8edf2;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  overflow: visible;
}

.ann-card__row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.ann-card--pinned {
  background: linear-gradient(135deg, #fffdf8 0%, #fff 55%);
  border-color: rgba(245, 158, 11, 0.28);
}

.ann-card--unread {
  border-color: rgba(229, 72, 77, 0.22);
  box-shadow: 0 2px 12px rgba(229, 72, 77, 0.08);
}

.ann-card--read {
  opacity: 1;
}

.ann-card__open {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 14px 14px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: right;
  font: inherit;
  color: inherit;
  min-width: 0;
}

.ann-card__icon-wrap {
  position: relative;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.ann-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
}

.ann-card__icon--circle-dollar {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.ann-card__icon--trending-down {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.ann-card__icon--megaphone {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.ann-card__unread-dot {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}

.ann-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ann-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.ann-card__head-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ann-card__title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  color: #0f172a;
}

.ann-card__period {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  font-variant-numeric: tabular-nums;
}

.ann-card__pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  background: rgba(251, 191, 36, 0.16);
  padding: 3px 8px;
  border-radius: 999px;
}

.ann-card__status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ann-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.ann-status-pill--read {
  color: #047857;
  background: #ecfdf5;
}

.ann-status-pill--unread {
  color: #b91c1c;
  background: #fef2f2;
}

.ann-status-pill--stats {
  color: #0369a1;
  background: #e0f2fe;
}

.ann-card__preview-box {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
}

.ann-card__preview {
  display: block;
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
}

.ann-card__preview--amount {
  color: #0f172a;
  font-weight: 700;
  font-size: 13px;
}

.ann-num {
  font-family: "Vazirmatn FD", "Vazirmatn", Tahoma, sans-serif;
  font-size: 1.05em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.ann-card__date {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  font-family: "Vazirmatn FD", "Vazirmatn", Tahoma, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ann-card__chev {
  flex-shrink: 0;
  color: #cbd5e1;
  align-self: center;
}

.ann-card__more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-block-start: 10px;
  margin-inline-end: 10px;
  padding: 0;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ann-card__more:hover,
.ann-card.is-menu-open .ann-card__more {
  background: #fff;
  border-color: rgba(200, 169, 104, 0.4);
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.ann-card-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: transparent;
}

.ann-card-menu {
  position: fixed;
  z-index: 10061;
  min-width: 200px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(214, 169, 79, 0.28);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.ann-card-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #0f172a;
  font-family: Vazirmatn, inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  transition: background 0.15s;
}

.ann-card-menu__item:hover {
  background: #f7f9fc;
}

.ann-card-menu__item--danger {
  color: #dc2626;
}

.ann-card-menu__item--danger:hover {
  background: #fef2f2;
}

.ann-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: "Vazirmatn FD", Vazirmatn, Tahoma, sans-serif;
}

.ann-detail__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid #e8edf3;
}

.ann-detail__date {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f8fafc;
}

.ann-detail__pinned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fffbeb;
}

.ann-detail__intro {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.75;
  color: #0f172a;
}

.ann-detail__amount-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 52%, #0f172a 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.ann-detail__amount-box::before {
  content: "";
  position: absolute;
  inset-inline-end: -24px;
  top: -24px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.ann-detail__amount-label {
  position: relative;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #94a3b8;
}

.ann-detail__amount-value {
  position: relative;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.35;
  color: #e2e8f0;
  letter-spacing: -0.02em;
}

.ann-detail__amount-value .ann-num {
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.ann-detail__facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ann-detail__fact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e8edf3;
}

.ann-detail__fact-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.ann-detail__fact-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ann-detail__fact-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.ann-detail__fact-value {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #0f172a;
}

.ann-detail__extra {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #475569;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
}

.ann-detail__cta {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  color: #1e3a8a;
}

.ann-detail__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ann-detail__body p {
  margin: 0;
}

.ann-detail__amount-line {
  font-weight: 700;
  color: #111827;
}

.ann-detail__amount-line .ann-num {
  font-size: 1.06em;
  font-variant-numeric: tabular-nums;
}

.ann-num {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 721px) {
  .announcements-page__add-btn {
    width: auto;
    align-self: flex-start;
  }
}
