/* Fonts are bundled in ./fonts/ and referenced relatively: @font-face URLs
 * resolve against this stylesheet, so the package renders identically on an
 * air-gapped playout box — no network at render time. Licence in fonts/. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;          /* variable axis — one file covers every weight */
  font-display: block;           /* block, not swap: never flash a fallback on air */
  src: url('./fonts/Inter-Variable.woff2') format('woff2-variations');
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* The graphic's own root. `position: absolute; inset: 0` fills whatever box the
 * renderer hands us: in an iframe mount that is the frame, and inside a shadow
 * root or a positioned container it is that container. `position: fixed` would
 * escape to the browser viewport in the second case. The package never styles
 * `body` — the renderer owns the document, not the graphic. */
.breaking-news-root {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.breaking {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, sans-serif;
  opacity: 0;
}

.breaking.visible {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.breaking.out {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.breaking-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.breaking-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: 0 48px;
}

.breaking-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #dc2626;
  padding: 10px 28px;
  border-radius: 4px;
  margin-bottom: 32px;
  transform: scaleX(0);
  transform-origin: center;
}

.breaking.visible .breaking-badge {
  transform: scaleX(1);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.breaking.out .breaking-badge {
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}

.breaking-badge-dot {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  animation: badgePulse 1.5s ease infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.breaking-badge-text {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.breaking-headline {
  font-size: 42px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
  letter-spacing: -0.02em;
  transform: translateY(20px);
  opacity: 0;
}

.breaking.visible .breaking-headline {
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s,
    opacity 0.5s ease 0.4s;
}

.breaking.out .breaking-headline {
  transform: translateY(-20px);
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 0.3s ease;
}

/* Red line accent under headline */
.breaking-line {
  width: 80px;
  height: 3px;
  background: #dc2626;
  margin: 24px auto 0;
  transform: scaleX(0);
}

.breaking.visible .breaking-line {
  transform: scaleX(1);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

.breaking.out .breaking-line {
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}
