/* ============================================================
   VeloPulse · "PulseRoute" App-Simulation
   Präfix: vp- · Design-Maß 392×812 px (Skalierung via Parent)
   ============================================================ */

.vp-phone,
.vp-phone * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.vp-phone {
  position: relative;
  width: 392px;
  height: 812px;
  font-family: var(--font-sans, 'Montserrat', -apple-system, sans-serif);
  color: var(--ink, #F5F1E8);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Rahmen & Screen ---------- */

.vp-shell {
  position: absolute;
  inset: 0;
  border-radius: 56px;
  padding: 5px;
  background: linear-gradient(155deg, #46403A 0%, #1A1712 35%, #0E0C09 62%, #322C22 100%);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .55),
    0 6px 18px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .07);
}

.vp-screen {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 51px;
  overflow: hidden;
  background: var(--bg, #0A0908);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .85);
}

.vp-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 32px;
  border-radius: 16px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
  z-index: 6;
}

/* ---------- Statusbar ---------- */

.vp-statusbar {
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
}

.vp-status-glyphs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink, #F5F1E8);
}

.vp-status-glyphs svg { display: block; }

/* ---------- Content & Tab-Crossfade ---------- */

.vp-content {
  position: relative;
  flex: 1;
  min-height: 0;
}

.vp-tab {
  position: absolute;
  inset: 0;
  padding: 12px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  scrollbar-width: none;
}

.vp-tab::-webkit-scrollbar { display: none; }

.vp-tab--active {
  opacity: 1;
  pointer-events: auto;
}

.vp-hidden { display: none !important; }

/* ---------- Typo-Bausteine ---------- */

.vp-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold, #D4B36A);
  margin: 6px 2px 2px;
}

.vp-sep {
  color: var(--ink-muted, #8F887A);
  font-weight: 400;
  margin: 0 5px;
}

.vp-fineprint {
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted, #8F887A);
  letter-spacing: .03em;
  margin-top: 2px;
}

/* ---------- Karten-Grundstil ---------- */

.vp-card {
  background: var(--surface, #1B1713);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, .08));
  border-radius: 18px;
}

/* ---------- Formularfelder & Autocomplete ---------- */

.vp-field { position: relative; }

.vp-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted, #8F887A);
  margin: 0 2px 7px;
}

.vp-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  color: var(--ink, #F5F1E8);
  background: var(--bg-raise, #14110E);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, .08));
  border-radius: 13px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.vp-input::placeholder { color: var(--ink-muted, #8F887A); }

.vp-input:focus {
  border-color: var(--gold, #D4B36A);
  box-shadow: 0 0 0 3px rgba(212, 179, 106, .16);
}

.vp-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #201B15;
  border: 1px solid var(--border-soft, rgba(255, 255, 255, .08));
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.vp-dropdown.vp-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.vp-suggestion {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  text-align: left;
  color: var(--ink-soft, #C9C2B4);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.vp-suggestion + .vp-suggestion {
  border-top: 1px solid rgba(255, 255, 255, .05);
}

.vp-suggestion:hover,
.vp-suggestion:focus-visible {
  background: rgba(255, 255, 255, .06);
  color: var(--ink, #F5F1E8);
}

.vp-suggestion:active { background: rgba(212, 179, 106, .12); }

.vp-suggestion strong {
  color: var(--gold-bright, #E8CD8F);
  font-weight: 600;
}

/* ---------- Buttons ---------- */

.vp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s ease, filter .2s ease, background .2s ease, box-shadow .2s ease;
}

.vp-btn:active { transform: scale(.97); }

.vp-btn:focus-visible {
  outline: 2px solid var(--gold-bright, #E8CD8F);
  outline-offset: 2px;
}

.vp-btn--gold {
  color: #171310;
  background: linear-gradient(135deg, var(--gold-bright, #E8CD8F), var(--gold, #D4B36A));
  box-shadow: 0 8px 22px rgba(212, 179, 106, .22);
}

.vp-btn--gold:hover {
  filter: brightness(1.07);
  box-shadow: 0 10px 26px rgba(212, 179, 106, .3);
}

.vp-btn--ghost {
  color: var(--gold, #D4B36A);
  background: transparent;
  border: 1px solid rgba(212, 179, 106, .5);
}

.vp-btn--ghost:hover { background: rgba(212, 179, 106, .1); }

.vp-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft, #C9C2B4);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .15s ease;
}

.vp-iconbtn:hover {
  background: rgba(255, 255, 255, .07);
  color: var(--ink, #F5F1E8);
}

.vp-iconbtn:active { transform: scale(.92); }

/* ---------- Tab "Routen": Suche & Ergebnis ---------- */

.vp-route-search,
.vp-route-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vp-result-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 -2px -8px;
}

.vp-result-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}

.vp-map-wrap {
  background: var(--bg-raise, #14110E);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, .08));
  border-radius: 18px;
  overflow: hidden;
}

.vp-map {
  display: block;
  width: 100%;
  height: auto;
}

.vp-map-label {
  fill: var(--ink-soft, #C9C2B4);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}

/* Routenpfad zeichnet sich beim Einblenden auf */
.vp-route-path {
  stroke: var(--gold-bright, #E8CD8F);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: vp-draw 1.2s ease-out .15s forwards;
  filter: drop-shadow(0 0 6px rgba(212, 179, 106, .45));
}

@keyframes vp-draw {
  to { stroke-dashoffset: 0; }
}

.vp-map-start,
.vp-map-end {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

.vp-map-start { animation: vp-pop .35s ease-out .2s forwards; }
.vp-map-end   { animation: vp-pop .35s ease-out 1.25s forwards; }

@keyframes vp-pop {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: 1; transform: none; }
}

/* Ergebnis-Elemente steigen gestaffelt auf */
.vp-route-result > * { animation: vp-rise .4s ease-out both; }
.vp-route-result > :nth-child(2) { animation-delay: .05s; }
.vp-route-result > :nth-child(3) { animation-delay: .45s; }
.vp-route-result > :nth-child(4) { animation-delay: .55s; }
.vp-route-result > :nth-child(5) { animation-delay: .7s; }
.vp-route-result > :nth-child(6) { animation-delay: .85s; }

@keyframes vp-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.vp-stats {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-top: 2px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
}

.vp-via {
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted, #8F887A);
  letter-spacing: .03em;
  margin-top: -8px;
}

.vp-instruction {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
}

.vp-instruction-caption {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted, #8F887A);
}

.vp-instruction-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vp-turn-icon {
  flex: 0 0 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: rgba(212, 179, 106, .14);
  color: var(--gold-bright, #E8CD8F);
}

.vp-instruction-text {
  flex: 1;
  font-size: 15px;
  color: var(--ink-soft, #C9C2B4);
}

.vp-instruction-text strong {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink, #F5F1E8);
}

.vp-instruction-glyph {
  display: inline-flex;
  color: var(--ink-soft, #C9C2B4);
}

/* ---------- Trikot-Glyphe & Schulterpunkte ---------- */

.vp-jersey { display: block; }

.vp-shoulder-dot {
  fill: var(--gold, #D4B36A);
  transform-box: fill-box;
  transform-origin: center;
}

/* Rechter Punkt in der Anweisungs-Karte: dauerhafter Puls */
.vp-dot--pulse {
  fill: var(--gold-bright, #E8CD8F);
  animation: vp-dotpulse 1s ease-in-out infinite;
}

.vp-dot-ring {
  fill: none;
  stroke: var(--gold, #D4B36A);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: vp-ring 1s ease-out infinite;
}

/* Vibrationstest: beide Punkte pulsieren */
.vp-pulsing .vp-shoulder-dot {
  fill: var(--gold-bright, #E8CD8F);
  animation: vp-dotpulse 1s ease-in-out infinite;
}

@keyframes vp-dotpulse {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.45); }
}

@keyframes vp-ring {
  0%   { transform: scale(1); opacity: .7; }
  80%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- Tab "Trikot" ---------- */

.vp-device-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.vp-device-glyph {
  display: inline-flex;
  color: var(--ink-soft, #C9C2B4);
}

.vp-device-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vp-device-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
}

.vp-device-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft, #C9C2B4);
}

.vp-device-status .vp-sep { margin: 0 1px; }

.vp-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green, #4ADE80);
  box-shadow: 0 0 8px rgba(74, 222, 128, .7);
}

.vp-module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vp-module {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
}

.vp-batt { color: var(--green, #4ADE80); }

.vp-module-name {
  font-size: 12.5px;
  color: var(--ink-muted, #8F887A);
  letter-spacing: .02em;
}

.vp-module-pct {
  font-size: 18px;
  font-weight: 700;
}

/* Vibrationstest: Shake des gesamten Rahmens */
.vp-shake { animation: vp-shake .5s ease-in-out; }

@keyframes vp-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-3px, 1px); }
  20% { transform: translate(3px, -1px); }
  30% { transform: translate(-3px, 0); }
  40% { transform: translate(3px, 1px); }
  50% { transform: translate(-2px, -1px); }
  60% { transform: translate(2px, 1px); }
  70% { transform: translate(-2px, 0); }
  80% { transform: translate(2px, 0); }
  90% { transform: translate(-1px, 0); }
}

/* ---------- Tab "Benutzer" ---------- */

.vp-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 2px;
}

.vp-avatar {
  flex: 0 0 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--gold-bright, #E8CD8F);
  background: radial-gradient(circle at 30% 25%, #2A241B, #16120D);
  border: 1.5px solid rgba(212, 179, 106, .55);
}

.vp-profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vp-profile-name {
  font-size: 16px;
  font-weight: 700;
}

.vp-profile-tier {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold, #D4B36A);
}

.vp-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.vp-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 8px;
  text-align: center;
  align-items: center;
}

.vp-stat-value {
  font-size: 19px;
  font-weight: 700;
}

.vp-stat-label {
  font-size: 11.5px;
  color: var(--ink-muted, #8F887A);
  letter-spacing: .06em;
}

.vp-list {
  display: flex;
  flex-direction: column;
  background: var(--surface, #1B1713);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, .08));
  border-radius: 18px;
  overflow: hidden;
}

.vp-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 16px;
  font: inherit;
  font-size: 14.5px;
  text-align: left;
  color: var(--ink, #F5F1E8);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background .18s ease;
}

.vp-list-row + .vp-list-row {
  border-top: 1px solid rgba(255, 255, 255, .05);
}

.vp-list-row:hover { background: rgba(255, 255, 255, .05); }
.vp-list-row:active { background: rgba(255, 255, 255, .08); }

.vp-list-row svg {
  flex: 0 0 auto;
  color: var(--ink-muted, #8F887A);
}

.vp-list-note {
  color: var(--green, #4ADE80);
  font-weight: 600;
}

/* ---------- Bottom-Navigation ---------- */

.vp-tabbar {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  padding: 8px 14px 20px;
  background: rgba(20, 17, 14, .88);
  border-top: 1px solid var(--border-soft, rgba(255, 255, 255, .08));
}

/* Home-Indicator */
.vp-tabbar::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 128px;
  height: 4.5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .22);
}

.vp-tabbtn {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 50px;
  padding-top: 6px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink-muted, #8F887A);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color .2s ease, transform .15s ease;
}

.vp-tabbtn:hover { color: var(--ink-soft, #C9C2B4); }
.vp-tabbtn:active { transform: scale(.93); }

.vp-tabbtn::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  width: 22px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--gold, #D4B36A);
  transform: translateX(-50%) scaleX(.4);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.vp-tabbtn--active { color: var(--gold, #D4B36A); }
.vp-tabbtn--active:hover { color: var(--gold-bright, #E8CD8F); }

.vp-tabbtn--active::before {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

/* ---------- Toast ---------- */

.vp-toast {
  position: absolute;
  left: 50%;
  bottom: 108px;
  z-index: 40;
  transform: translateX(-50%) translateY(10px);
  padding: 12px 20px;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--gold-bright, #E8CD8F);
  background: rgba(27, 23, 19, .96);
  border: 1px solid rgba(212, 179, 106, .45);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.vp-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
