/* pdVerse announcement banner — slim bar above the main nav. Self-contained and reusable:
   drop the same <section class="pdv-announce" data-pdv-announce="ID">...</section> markup
   plus this stylesheet and announcement-banner.js onto any page. Uses only existing design
   tokens (--dark, --dark-soft, --green, --glow) from theme-green.css — no new brand colours.
   Deliberately uses --dark, not --ink: --ink is a text-ink colour that FLIPS to near-white in
   dark mode (see theme-green.css), which would turn this banner's background white. --dark is
   the token the site already uses for panels that stay dark in both themes (e.g. the
   career-roadmap hero panel). */

.pdv-announce {
  --pdv-announce-h: 48px;
  position: relative;
  z-index: 1001; /* above the sticky header (1000) so it isn't clipped while both are on screen */
  min-height: var(--pdv-announce-h);
  display: flex;
  align-items: center;
  background: var(--dark, #012f1f);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pdv-announce[hidden] { display: none; }

.pdv-announce-row {
  width: min(100% - 32px, var(--container, 1160px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
}

.pdv-announce-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  color: #f8fafc;
}

.pdv-announce-icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--ps-hero-panel-kicker, #7fd79b); /* already used for on-dark accents elsewhere */
}

.pdv-announce-text {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Short text is the default everywhere; the full text + subtext only switch on once there's
   genuinely enough row width for both (tied to one breakpoint so they never fight each other
   for space -- see the 768px screenshot bug this fixes in PR review). */
.pdv-announce-text--full { display: none; }

.pdv-announce-sub {
  font-weight: 400;
  font-size: 12.5px;
  color: var(--dark-soft, #a9c2b4);
  white-space: nowrap;
  display: none;
}

@media (min-width: 860px) {
  .pdv-announce-text--full { display: inline; }
  .pdv-announce-text--short { display: none; }
  .pdv-announce-sub { display: inline; }
  .pdv-announce-sub::before { content: '·'; margin-right: 8px; color: var(--dark-soft, #a9c2b4); opacity: 0.6; }
}

.pdv-announce-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdv-announce-cta {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: var(--radius-sm, 8px);
  background: var(--green, #107a37);
  /* White, not the --btn-primary dark-ink/green pair used elsewhere on the site: that pairing
     is ~3.6:1 contrast, which only clears WCAG AA at large text sizes. At this banner's 13px
     button size white-on-green (~5.4:1) is needed to pass AA. White-on-green already exists
     in the design system (innovus-landing.css .btn-primary, index.html .btn-green badge). */
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--green, #107a37);
  cursor: pointer;
  animation: pdv-announce-pulse 2s ease-in-out 3;
}

.pdv-announce-cta:hover,
.pdv-announce-cta:focus-visible {
  background: var(--green-hover, #0c6630);
  border-color: var(--green-hover, #0c6630);
}

.pdv-announce-cta:focus-visible,
.pdv-announce-close:focus-visible {
  outline: 2px solid var(--ps-hero-panel-kicker, #7fd79b);
  outline-offset: 2px;
}

@keyframes pdv-announce-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--glow, rgba(19, 136, 62, 0.45)); }
  50% { box-shadow: 0 0 0 7px rgba(19, 136, 62, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .pdv-announce-cta { animation: none; }
}

.pdv-announce-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--dark-soft, #a9c2b4);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.pdv-announce-close:hover { background: rgba(255, 255, 255, 0.1); color: #f8fafc; }

.pdv-announce-cta-short { display: none; }

@media (max-width: 480px) {
  .pdv-announce-row { gap: 8px; }
  .pdv-announce-left { gap: 6px; }
  .pdv-announce-icon { display: none; } /* decorative (aria-hidden); first to go when space is tight */
  .pdv-announce-text { font-size: 12px; }
  .pdv-announce-actions { gap: 2px; }
  .pdv-announce-cta { padding: 6px 9px; font-size: 12px; }
  .pdv-announce-cta-full { display: none; }
  .pdv-announce-cta-short { display: inline; }
  .pdv-announce-close { width: 24px; height: 24px; font-size: 16px; }
}
