/* Corrida do Faturamento — tela em construção + item destacado no menu */

.nav-race {
  position: relative;
  isolation: isolate;
  overflow: visible;
  color: #fff !important;
  background:
    linear-gradient(115deg, rgba(255, 196, 54, 0.28), rgba(0, 140, 255, 0.18) 55%, rgba(255, 214, 90, 0.16)) !important;
  border: 1px solid rgba(255, 214, 90, 0.72) !important;
  box-shadow:
    0 0 0 1px rgba(51, 214, 255, 0.25),
    0 8px 22px rgba(255, 186, 40, 0.18);
  animation: raceGlow 2.2s ease-in-out infinite;
}

.nav-race::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.38) 48%, transparent 62%);
  background-size: 220% 100%;
  animation: raceSheen 2.6s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.side-nav a.nav-race {
  margin: 2px 0 6px;
  padding: 11px 12px;
  border-radius: 14px;
  align-items: center;
}

.nav-race__ico {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(4, 12, 24, 0.55);
  box-shadow: 0 0 14px rgba(255, 206, 70, 0.45);
  z-index: 1;
}

.nav-race__ico svg {
  width: 22px;
  height: 22px;
}

.nav-race__cloth {
  transform-origin: 6px 14px;
  animation: raceWave 0.72s ease-in-out infinite;
}

.nav-race__label {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.side-nav a.nav-race .nav-race__label {
  font-size: 0.8rem;
  padding: 2px 4px;
}

.nav-race__bits {
  position: absolute;
  inset: -6px -4px;
  pointer-events: none;
  z-index: 2;
}

.nav-race__bits i {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffe98a;
  box-shadow: 0 0 8px #ffe98a, 0 0 2px #fff;
  animation: raceOrbit 2.8s linear infinite;
}

.nav-race__bits i:nth-child(2) {
  width: 4px;
  height: 4px;
  background: #7ee7ff;
  box-shadow: 0 0 8px #7ee7ff;
  animation-duration: 3.4s;
  animation-delay: -1.1s;
}

.nav-race__bits i:nth-child(3) {
  width: 5px;
  height: 5px;
  animation-duration: 2.2s;
  animation-delay: -0.6s;
}

.nav-race__bits i:nth-child(4) {
  width: 3px;
  height: 3px;
  background: #fff;
  animation-duration: 3.8s;
  animation-delay: -1.8s;
}

@keyframes raceWave {
  0%, 100% { transform: rotate(-7deg) skewX(0deg); }
  50% { transform: rotate(9deg) skewX(-8deg); }
}

@keyframes raceGlow {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(255, 206, 70, 0.45),
      0 0 16px rgba(0, 180, 255, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(255, 206, 70, 0),
      0 0 26px rgba(255, 206, 70, 0.55);
  }
}

@keyframes raceSheen {
  0% { background-position: 140% 0; }
  100% { background-position: -80% 0; }
}

@keyframes raceOrbit {
  0% { top: -2px; left: 18%; }
  25% { top: 42%; left: calc(100% - 4px); }
  50% { top: calc(100% - 4px); left: 62%; }
  75% { top: 28%; left: -2px; }
  100% { top: -2px; left: 18%; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-race,
  .nav-race::before,
  .nav-race__cloth,
  .nav-race__bits i {
    animation: none;
  }
}

/* Tela */
.race-launch,
.race-page {
  background: #01060f;
}

#viewCorridaLaunch.race-launch {
  padding: 12px !important;
  gap: 0;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 88px);
}

html.is-mobile #viewCorridaLaunch.race-launch,
body.is-mobile #viewCorridaLaunch.race-launch {
  padding: 6px 6px calc(84px + env(safe-area-inset-bottom)) !important;
  min-height: calc(100dvh - 72px);
}

.race-page {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 12px;
  box-sizing: border-box;
}

.race-page__back {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5;
  color: #fff;
  text-decoration: none;
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(2, 8, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.race-launch__live {
  display: none;
  width: 100%;
  height: calc(100dvh - 96px);
  border: 0;
  background: #01060f;
  border-radius: 16px;
}

#viewCorridaLaunch.race-launch .race-launch__stage { display: none; }
#viewCorridaLaunch.race-launch.is-manutencao .race-launch__stage { display: block; }
#viewCorridaLaunch.race-launch.is-premiacao .race-launch__live { display: block; }

.race-launch__stage {
  position: relative;
  width: min(100%, calc((100dvh - 150px) * 941 / 1672));
  margin: 0 auto;
  container-type: inline-size;
}

html.is-desktop #viewCorridaLaunch .race-launch__stage,
.race-page .race-launch__stage {
  width: min(100%, calc((100dvh - 24px) * 941 / 1672));
}

@media (min-width: 961px) {
  html.is-desktop #viewCorridaLaunch .race-launch__stage,
  .race-page .race-launch__stage {
    width: min(100%, calc((100dvh - 48px) * 1672 / 941));
  }
}

.race-launch__art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  user-select: none;
  -webkit-user-drag: none;
}

.race-launch__art--desktop { display: none; }

@media (min-width: 961px) {
  .race-launch__art--mobile { display: none; }
  .race-launch__art--desktop { display: block; }
}

.race-launch__clock {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.race-launch__clock span {
  position: absolute;
  transform: translate(-50%, -52%);
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800;
  color: #f4fbff;
  letter-spacing: 0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 10px rgba(90, 214, 255, 0.95),
    0 2px 0 rgba(0, 10, 24, 0.55);
}

.race-launch__clock--mobile span { font-size: 4.4cqw; }
.race-launch__clock--mobile span[data-part="d"] { left: 21.89%; top: 69.02%; }
.race-launch__clock--mobile span[data-part="h"] { left: 40.54%; top: 69.02%; }
.race-launch__clock--mobile span[data-part="m"] { left: 59.19%; top: 69.02%; }
.race-launch__clock--mobile span[data-part="s"] { left: 78%; top: 69.02%; }

.race-launch__clock--desktop span { font-size: 3.05cqw; }
.race-launch__clock--desktop span[data-part="d"] { left: 34.03%; top: 72.8%; }
.race-launch__clock--desktop span[data-part="h"] { left: 44.56%; top: 72.8%; }
.race-launch__clock--desktop span[data-part="m"] { left: 55.32%; top: 72.8%; }
.race-launch__clock--desktop span[data-part="s"] { left: 66.09%; top: 72.8%; }

@media (max-width: 960px) {
  .race-launch__clock--desktop { display: none; }
}

@media (min-width: 961px) {
  .race-launch__clock--mobile { display: none; }
}

/* Popup da dashboard */
.race-pop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 16px;
}

.race-pop[hidden] { display: none !important; }

.race-pop__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(5px);
}

.race-pop__card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 28px));
}

.race-pop__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.race-pop__stage {
  position: relative;
  container-type: inline-size;
}

.race-pop__stage img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.race-pop__clock {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.race-pop__clock span {
  position: absolute;
  transform: translate(-50%, -52%);
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800;
  font-size: 3.35cqw;
  line-height: 1;
  color: #f4fbff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 8px rgba(90, 214, 255, 0.9),
    0 1px 0 rgba(0, 10, 24, 0.55);
}

.race-pop__clock span[data-part="d"] { left: 29.63%; top: 59.48%; }
.race-pop__clock span[data-part="h"] { left: 43.37%; top: 59.48%; }
.race-pop__clock span[data-part="m"] { left: 56.91%; top: 59.48%; }
.race-pop__clock span[data-part="s"] { left: 70.44%; top: 59.48%; }

.race-pop__x,
.race-pop__go {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.race-pop__x {
  left: 90.88%;
  top: 9.76%;
  width: 8.5%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.race-pop__go {
  left: 22.3%;
  top: 77.6%;
  width: 55.4%;
  height: 14.2%;
  border-radius: 999px;
}

body.race-pop-open { overflow: hidden; }
