/* ==========================================================================
   [speedo-preview] — Live Interactive SVG Speedometer Preview
   Scoped to .msp-* so theme post typography never interferes.
   ========================================================================== */

.msp-standalone {
  width: 100%;
  margin: 18px auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.msp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 310px;
  background:
    radial-gradient(circle at 74% 66%, rgba(139, 92, 246, 0.14), transparent 52%),
    radial-gradient(circle at 22% 24%, rgba(34, 211, 238, 0.06), transparent 46%),
    #0b0b12;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.2;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

.msp-stage *,
.msp-stage *::before,
.msp-stage *::after {
  box-sizing: border-box;
}

/* ================= LEFT /SPEEDO PICKER MENU ================= */
.msp-menu {
  position: absolute;
  top: 24px;
  left: 22px;
  width: min(226px, 42%);
  background: rgba(11, 11, 18, 0.94);
  border: 1px solid #23232f;
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.72);
  overflow: hidden;
  z-index: 6;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.msp-stage--album .msp-menu {
  left: 52px;
  width: min(220px, 39%);
}

.msp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 31px;
  padding: 0 10px;
  background: #0e0e16;
  border-bottom: 1px solid #23232b;
}

.msp-title {
  font-size: 11px;
  font-weight: 700;
  color: #e8e8f0;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msp-cmd {
  font-size: 9.5px;
  font-weight: 700;
  color: #a78bfa;
  background: #050509;
  border: 1px solid #23232f;
  border-radius: 3px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  flex-shrink: 0;
}

.msp-body {
  padding: 9px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.msp-sec {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #7d7d96;
  text-transform: uppercase;
  margin-top: 1px;
  padding-left: 2px;
}

.msp-row {
  position: relative;
  width: 100%;
  height: 28px;
  margin: 0 !important;
  padding: 0 10px 0 12px !important;
  border-radius: 3px !important;
  background: #050509 !important;
  border: 1px solid #23232f !important;
  color: #c5cbda !important;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  outline: none;
  box-shadow: none !important;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.msp-row::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  bottom: 4px;
  width: 2.5px;
  border-radius: 1.5px;
  background: #8b5cf6;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.msp-row:hover {
  background: #15151f !important;
  border-color: #34364a !important;
  color: #ffffff !important;
}

.msp-row.is-active {
  background: #15151d !important;
  border-color: #3a3d56 !important;
  color: #ffffff !important;
}

.msp-row.is-active::before {
  opacity: 1;
}

.msp-row-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msp-chk {
  font-size: 10px;
  font-weight: 800;
  color: #8b5cf6;
  opacity: 0;
  flex: none;
  transition: opacity 0.12s ease;
}

.msp-row.is-active .msp-chk {
  opacity: 1;
}

.msp-foot {
  padding: 5px 10px 6px;
  border-top: 1px solid #23232b;
  background: #0b0b12;
  font-size: 9px;
  color: #7d7d96;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ================= RIGHT LIVE SVG SPEEDOMETER ================= */
.msp-dial-wrap {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: min(300px, 50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msp-stage--album .msp-dial-wrap {
  right: 48px;
  width: min(286px, 46%);
}

.msp-svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.8));
}

.msp-num {
  fill: #fff;
  font-family: 'Segoe UI Light', 'Inter', sans-serif;
  font-size: 58px;
  font-weight: 200;
  text-anchor: middle;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.msp-unit {
  fill: rgba(255, 255, 255, 0.65);
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
  letter-spacing: 0.42em;
}

.msp-odo {
  fill: rgba(255, 255, 255, 0.85);
  font-family: 'Segoe UI', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

/* ================= BOTTOM QUICK-SELECT BAR WITH AUTO-CYCLE PROGRESS ================= */
.msp-bar {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border-radius: 7px;
  background: rgba(11, 11, 18, 0.9);
  border: 1px solid #23232f;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: calc(100% - 24px);
}

.msp-pill {
  position: relative;
  overflow: hidden;
  margin: 0 !important;
  padding: 5px 10px 6px !important;
  border-radius: 4px !important;
  background: #050509 !important;
  border: 1px solid #23232f !important;
  color: #9a9ab0 !important;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  box-shadow: none !important;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.msp-pill:hover {
  background: #15151f !important;
  color: #ffffff !important;
}

.msp-pill.is-active {
  background: #15151d !important;
  border-color: rgba(139, 92, 246, 0.72) !important;
  color: #ffffff !important;
}

.msp-pill-prog {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
  opacity: 0;
  pointer-events: none;
}

.msp-stage.is-auto .msp-pill.is-active .msp-pill-prog {
  opacity: 1;
  animation: mspAutoProg 4.5s linear forwards;
}

.msp-stage.is-paused .msp-pill.is-active .msp-pill-prog {
  animation-play-state: paused;
}

@keyframes mspAutoProg {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ================= RESPONSIVE MOBILE ================= */
@media (max-width: 620px) {
  .msp-stage {
    aspect-ratio: auto;
    min-height: 0;
    padding: 16px 14px 44px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
  }

  .msp-stage--album {
    padding: 16px 46px 46px;
  }

  .msp-menu,
  .msp-stage--album .msp-menu {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 260px;
  }

  .msp-dial-wrap,
  .msp-stage--album .msp-dial-wrap {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 260px;
  }

  .msp-foot {
    display: none;
  }
}
