/* 9wicket pre-bundle first-paint loader (CSP-safe external stylesheet).
   Matches Original 9Wickets Exchange branding: warm gold (#ffb80c), near-black rail (#1e1e1e),
   slate (#455e68), light grey canvas (#ececec), white exchange panel (#ffffff),
   sharp 3px corners, Tahoma typography, and Back (#72bbef) / Lay (#faa9ba) odds strip. */
html,
body {
  margin: 0;
  padding: 0;
  background: #ececec;
  color: #1e1e1e;
  font-family: Tahoma, Helvetica, Arial, sans-serif;
}

.nw-boot-screen {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background: #ececec;
  box-sizing: border-box;
}

.nw-exchange-loader {
  width: min(352px, calc(100vw - 24px));
  background: #ffffff;
  border: 1px solid #b9c0c4;
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  text-align: left;
}

.nw-exchange-loader__rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #1e1e1e;
  border-top: 3px solid #ffb80c;
  border-bottom: 1px solid #2a3a43;
}

.nw-exchange-loader__rail-title {
  color: #ffb80c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nw-exchange-loader__badge {
  display: inline-block;
  padding: 2px 8px;
  background: #ffb80c;
  color: #1e1e1e;
  font-size: 10px;
  font-weight: 700;
  border-radius: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nw-exchange-loader__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 18px 18px;
}

.nw-exchange-loader__brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  width: 100%;
  background: linear-gradient(180deg, #2a3a43 0%, #1e1e1e 100%);
  border: 1px solid #455e68;
  border-radius: 3px;
  box-sizing: border-box;
}

.nw-exchange-loader__logo {
  width: 138px;
  max-width: 54vw;
  height: auto;
  aspect-ratio: 143 / 40;
  object-fit: contain;
  display: block;
}

.nw-exchange-loader__stumps {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: block;
}

.nw-exchange-loader__wordmark-fallback {
  display: inline-flex;
  align-items: baseline;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nw-exchange-loader__nine {
  color: #ffb80c;
  font-size: 23px;
  margin-right: 1px;
}

.nw-exchange-loader__wicket {
  color: #ffffff;
}

.nw-exchange-loader__odds-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.nw-exchange-loader__cell {
  height: 22px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #1e1e1e;
  animation: nwExchangeCellPulse 1.2s ease-in-out infinite;
}

.nw-exchange-loader__cell--back-deep {
  background: #beddf4;
  border: 1px solid #96c7ec;
  animation-delay: 0s;
}

.nw-exchange-loader__cell--back {
  background: #72bbef;
  border: 1px solid #52a4df;
  animation-delay: 0.16s;
}

.nw-exchange-loader__cell--lay {
  background: #faa9ba;
  border: 1px solid #ec899e;
  animation-delay: 0.32s;
}

.nw-exchange-loader__cell--lay-deep {
  background: #f3dce2;
  border: 1px solid #e2bec7;
  animation-delay: 0.48s;
}

.nw-exchange-loader__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding-top: 4px;
  border-top: 1px solid #e3e6e8;
  color: #455e68;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.nw-exchange-loader__spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #cfd5d8;
  border-top-color: #ffb80c;
  border-right-color: #455e68;
  animation: nwExchangeSpin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes nwExchangeSpin {
  to { transform: rotate(360deg); }
}

@keyframes nwExchangeCellPulse {
  0%, 100% { opacity: 0.62; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .nw-exchange-loader__cell,
  .nw-exchange-loader__spinner {
    animation: none !important;
    opacity: 1;
  }
}
