/**
 * SEO Solution X Taxi Loader — brand progress + taxi (page load only, fast).
 * https://seosolutionx.com
 */

:root {
  --stl-blue: #0c2c4c;
  --stl-blue-deep: #14406e;
  --stl-navy: #0c2c4c;
  --stl-track: #e8eef6;
  --stl-track-border: #1e3a5f;
}

/* —— Page preloader: blur + progress bar taxi —— */
.stl-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow: hidden;
}

.stl-preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stl-preloader__glow {
  display: none;
}

.stl-stage {
  position: relative;
  width: min(88vw, 340px);
  padding: 8px 4px;
  text-align: center;
  z-index: 1;
}

.stl-sky {
  display: none;
}

/* Progress track */
.stl-road {
  position: relative;
  height: 18px;
  margin: 42px auto 0;
  border-radius: 999px;
  background: var(--stl-track);
  border: 3px solid var(--stl-track-border);
  box-shadow: none;
  overflow: visible;
}

.stl-road__line {
  display: none;
}

.stl-road__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 999px;
  background: repeating-linear-gradient(
    -55deg,
    var(--stl-blue) 0 6px,
    #1a5384 6px 12px
  );
  animation: stl-fill 1.15s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
  z-index: 1;
}

.stl-road__knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--stl-blue);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(23, 125, 255, 0.45);
  animation: stl-knob 1.15s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
  z-index: 3;
}

.stl-taxi {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  width: 72px;
  height: 34px;
  margin-left: -36px;
  animation: stl-knob 1.15s cubic-bezier(0.4, 0.05, 0.2, 1) infinite;
  will-change: left;
  z-index: 4;
}

.stl-taxi--ghost {
  display: none;
}

.stl-taxi__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 3px 4px rgba(3, 45, 77, 0.2));
}

.stl-taxi__body {
  fill: var(--stl-blue);
}

.stl-taxi__wheel {
  transform-origin: center;
  transform-box: fill-box;
  animation: stl-spin 0.45s linear infinite;
}

@keyframes stl-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes stl-fill {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

@keyframes stl-knob {
  0% {
    left: 0%;
  }
  100% {
    left: 100%;
  }
}

.stl-preloader__text {
  margin: 18px 0 0;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--stl-blue);
  animation: none;
}

@keyframes stl-fade-text {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* —— Button loading: mini taxi (only while sending) —— */
.stl-btn-loading,
.afm-submit.stl-btn-loading,
button.stl-btn-loading,
input.stl-btn-loading {
  position: relative !important;
  pointer-events: none !important;
  color: transparent !important;
}

.stl-btn-loading .afm-submit__spin,
.stl-btn-loading .afm-submit__label,
.afm-submit.stl-btn-loading .afm-submit__spin,
.afm-submit.stl-btn-loading .afm-submit__label {
  visibility: hidden !important;
  opacity: 0 !important;
  color: transparent !important;
}

.afm-submit.stl-btn-loading .afm-submit__spin {
  display: none !important;
  animation: none !important;
}

.stl-btn-track {
  position: absolute !important;
  left: 12px !important;
  right: 12px !important;
  top: 50% !important;
  height: 22px !important;
  margin-top: -11px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: transparent !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

.stl-btn-taxi {
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  width: 48px !important;
  height: 22px !important;
  margin-top: -11px !important;
  animation: stl-btn-drive 1.1s cubic-bezier(0.4, 0.05, 0.2, 1) infinite !important;
  will-change: transform;
  z-index: 6 !important;
}

.stl-btn-taxi svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

@keyframes stl-btn-drive {
  0% {
    transform: translate3d(-48px, 0, 0);
  }
  100% {
    transform: translate3d(360px, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stl-road__fill,
  .stl-road__knob,
  .stl-taxi,
  .stl-taxi__wheel,
  .stl-btn-taxi {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .stl-taxi,
  .stl-road__knob {
    left: 50% !important;
  }

  .stl-road__fill {
    width: 50% !important;
  }

  .stl-preloader {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.92);
  }
}

@media screen and (max-width: 380px) {
  .stl-taxi {
    width: 64px;
    height: 30px;
    margin-left: -32px;
  }

  .stl-road {
    height: 16px;
  }
}
