/* Keep the mobile crash announcement in the header, clear of live prices. */
.mobile-market-crash {
  display: none;
}

body .mobile-market-view.market-crashing:not(.event-closed) {
  grid-template-rows: auto minmax(0, 1fr);
  animation: none;
}

body .mobile-market-view.market-crashing:not(.event-closed) .mobile-deal-strip,
body .mobile-market-view.market-crashing:not(.event-closed) .mobile-crash-timer {
  display: none;
}

body .mobile-market-view.market-crashing:not(.event-closed) .mobile-status-row {
  grid-template-columns: minmax(0, 1fr);
}

body .mobile-market-view.market-crashing:not(.event-closed)::before,
body .mobile-market-view.market-crashing:not(.event-closed)::after {
  content: none;
  animation: none;
}

body .mobile-market-view .mobile-market-hero .mobile-live-pill,
body .mobile-market-view .mobile-market-hero .mobile-crash-timer {
  text-align: center;
}

body .mobile-market-view.market-crashing:not(.event-closed) .mobile-crash-timer {
  animation: none;
}

body .mobile-market-view.market-crashing:not(.event-closed) .mobile-market-crash {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  padding: 19px 34px;
  overflow: hidden;
  background: #d8142f;
  color: #fff;
  text-align: center;
  animation: mobileCrashStripFlash 1.2s steps(1, end) infinite;
}

.mobile-market-crash::before,
.mobile-market-crash::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 4px;
  background: repeating-linear-gradient(-45deg, #090b0c 0 7px, transparent 7px 14px);
  pointer-events: none;
}

.mobile-market-crash::before { top: 0; }
.mobile-market-crash::after { bottom: 0; }

body .mobile-market-view .mobile-market-crash strong {
  display: block;
  max-width: 100%;
  margin: 0;
  color: inherit;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(21px, 6.5vw, 30px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-align: center;
}

body .mobile-market-view .mobile-market-crash span {
  display: block;
  max-width: 100%;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  text-align: center;
  text-transform: none;
}

.mobile-market-crash .mobile-crash-arrow {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes mobileCrashStripFlash {
  0%, 100% { background-color: #d8142f; }
  50% { background-color: #871225; }
}

@media (max-height: 500px) {
  body .mobile-market-view.market-crashing:not(.event-closed) .mobile-market-hero {
    gap: 6px;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  body .mobile-market-view.market-crashing .mobile-brand img { max-height: 30px; }
  body .mobile-market-view.market-crashing .mobile-market-hero h1 { font-size: 22px; }
  body .mobile-market-view.market-crashing .mobile-venue-label { font-size: 12px; }
  body .mobile-market-view.market-crashing .mobile-live-pill { min-height: 30px; padding-block: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  body .mobile-market-view.market-crashing:not(.event-closed) .mobile-market-crash,
  body .mobile-market-view.market-crashing .mobile-just-crashed {
    animation: none;
  }
}
