/* ══ OpEx ticker module ══════════════════════════════════════════════
   Bottom-of-page scrolling ticker for OpEx principles. Drop the
   stylesheet + script into a page and the script injects markup at
   end-of-body. Self-contained — swap the principle list in ticker.js. */

.opex-ticker{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(6,9,22,.92);
  border-top: 1px solid rgba(27,42,107,.4);
  padding: 7px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.opex-ticker__label{
  font-size: 7px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #C1392B;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(193,57,43,0.55), 0 0 18px rgba(193,57,43,0.3);
}

.opex-ticker__track{
  flex: 1;
  overflow: hidden;
  /* fade the edges so items scroll in and out smoothly */
  mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}

.opex-ticker__content{
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: opexTickerSlide 42s linear infinite;
  will-change: transform;
}

.opex-ticker__item{
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  text-shadow: 0 0 6px rgba(255,255,255,0.18);
}

.opex-ticker__num{
  color: rgba(212,160,23,.9);
  font-weight: 400;
  margin-right: 6px;
  text-shadow: 0 0 8px rgba(212,160,23,0.5), 0 0 16px rgba(212,160,23,0.3);
}

@keyframes opexTickerSlide{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Pause animation when the user prefers reduced motion. */
@media (prefers-reduced-motion: reduce){
  .opex-ticker__content{ animation: none; }
}

/* Compact phone styling */
@media (max-width: 480px){
  .opex-ticker{
    padding: 5px 12px;
    gap: 12px;
  }
  .opex-ticker__label{ font-size: 6px; }
  .opex-ticker__item{ font-size: 7px; }
}

/* Tighter inset on devices with safe-area (iOS home indicator). */
@supports(padding:max(0px)){
  .opex-ticker{
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }
}

/* Reserve bottom space so the ticker doesn't cover the last UI row.
   `box-sizing:border-box` is set globally in the app pages so this
   shrinks the inner content area rather than pushing it offscreen.
   Pages that already pad their bottom edge get a no-op here. */
body.has-opex-ticker{
  padding-bottom: 32px;
}
@media (max-width:480px){
  body.has-opex-ticker{ padding-bottom: 28px; }
}
