/* Announcements layer (Phase 1): site-wide banners + one-time modal.
   Reuses Kiln design tokens from portal-layout.css where available, with
   safe fallbacks so this works even if a token is missing. */

/* ---- Banners ------------------------------------------------------------ */
.bd-announce-banners {
  display: flex;
  flex-direction: column;
}

.bd-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  font-size: 13px;
  line-height: 1.4;
  color: #1f2937;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.bd-banner-msg { flex: 1; }
.bd-banner-msg strong { font-weight: 600; }

.bd-banner--info {
  background: #eff6ff;
  color: #1e3a8a;
  border-bottom-color: #bfdbfe;
}
.bd-banner--warn {
  background: #fffbeb;
  color: #92400e;
  border-bottom-color: #fde68a;
}
.bd-banner--critical {
  background: #fef2f2;
  color: #991b1b;
  border-bottom-color: #fecaca;
}

.bd-banner-cta {
  flex: 0 0 auto;
  font-weight: 600;
  text-decoration: underline;
  color: inherit;
}

.bd-banner-x {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.7;
}
.bd-banner-x:hover { opacity: 1; }

/* ---- One-time modal ----------------------------------------------------- */
.bd-announce-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
  padding: 20px;
}
.bd-announce-overlay.active { display: flex; }

.bd-modal-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  max-width: 440px;
  width: 100%;
  padding: 28px;
}

.bd-modal-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.bd-modal-body {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
}

.bd-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.bd-modal-cta,
.bd-modal-close {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}

.bd-modal-cta {
  background: #1e3a8a;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.bd-modal-cta:hover { background: #1c3578; }

.bd-modal-close {
  background: #fff;
  color: #4b5563;
  border-color: #d1d5db;
}
.bd-modal-close:hover { background: #f3f4f6; }
