/* cos-announce.css — Public popup/announcement overlay
   No external dependencies. Dark by default, light with html.light.
   ------------------------------------------------------------------ */

/* ── Keyframes ── */
@keyframes cos-an-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes cos-an-slide-up {
  from { opacity: 0; transform: scale(.94) translateY(14px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

/* ── Overlay ── */
.cos-an-overlay {
  position: fixed;
  inset: 0;
  z-index: 14000;
  background: rgba(0, 0, 0, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: cos-an-fade-in .25s ease both;
}

/* ── Dialog ── */
.cos-an-dialog {
  position: relative;
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3);
  overflow: hidden;
  animation: cos-an-slide-up .3s cubic-bezier(.22, .68, 0, 1.2) both;
  background: #1a1a2e;
  color: #e8e2d4;
}

/* Size variants */
.cos-an--sm { max-width: 380px; }
.cos-an--md { max-width: 520px; }
.cos-an--lg { max-width: 720px; }

/* Light mode overrides */
html.light .cos-an-dialog {
  background: #ffffff;
  color: #111111;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .12);
}

/* ── Close button ── */
.cos-an-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
}

.cos-an-close:hover {
  background: rgba(0, 0, 0, .65);
  transform: scale(1.1);
}

html.light .cos-an-close {
  background: rgba(0, 0, 0, .18);
  color: #111;
}
html.light .cos-an-close:hover {
  background: rgba(0, 0, 0, .3);
}

/* ── Top image ── */
.cos-an-img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Body section ── */
.cos-an-body {
  padding: 26px 30px 28px;
}

@media (max-width: 480px) {
  .cos-an-body { padding: 20px 20px 22px; }
}

/* ── Title ── */
.cos-an-title {
  margin: 0 0 12px;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.01em;
}

/* ── Rich text area ── */
.cos-an-text {
  margin: 0 0 20px;
  font-size: .95rem;
  line-height: 1.65;
  color: inherit;
  opacity: .88;
}

.cos-an-text:empty { display: none; }

/* Reset common rich-text child elements */
.cos-an-text p    { margin: 0 0 .6em; }
.cos-an-text p:last-child { margin-bottom: 0; }
.cos-an-text ul, .cos-an-text ol { margin: 0 0 .6em 1.4em; padding: 0; }
.cos-an-text strong { font-weight: 800; }

/* ── CTA button(s) ── */
.cos-an-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.cos-an-btn-icon {
  margin-right: 6px;
  font-style: normal;
}

.cos-an-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 26px;
  border-radius: 10px;
  border: none;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter .18s, transform .15s;
  line-height: 1;
}

.cos-an-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.cos-an-btn:active {
  transform: translateY(0);
  filter: brightness(.95);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .cos-an-overlay { animation: none; }
  .cos-an-dialog  { animation: none; }
  .cos-an-btn     { transition: none; }
  .cos-an-close   { transition: none; }
}
