/* Keep the previous 3D navigation dimensions on every signed-in screen. */
body:not(.auth-screen),
body.charging-screen.ev-charge-layout-r10:not(.auth-screen) {
  --nav: calc(78px + env(safe-area-inset-bottom, 0px));
}

body:not(.auth-screen) #tabs button,
body.charging-screen.ev-charge-layout-r10:not(.auth-screen) #tabs button {
  min-height: 44px;
  font-size: clamp(10px, 2.75vw, 14px);
}

body:not(.auth-screen) #tabs .ev-nav-art,
body.charging-screen.ev-charge-layout-r10:not(.auth-screen) #tabs .ev-nav-art {
  flex: 0 0 44px;
  width: 48px;
  height: 44px;
  margin-block: 0;
  transform: none;
}

/* On shorter phones R35 compacted the entire connector card. Restore the
   pre-compaction sizing while the list itself remains scrollable. */
@media (max-width: 520px) and (min-height: 480px) and (max-height: 760px) {
  .ev-station-reference-surface :is(.sheet-ports, .detail-connectors) {
    min-height: 64px;
    gap: 6px;
    overflow-y: auto;
    scroll-padding-block: 4px;
  }

  .ev-station-reference-surface .sheet-port.connector-row.ev-port-row {
    --ev-port-photo-size: 62px;
    --ev-port-price-width: 70px;
    --ev-port-badge-width: 74px;
    min-height: 64px;
    padding: 5px 9px;
    column-gap: 6px;
    row-gap: 7px;
  }

  .ev-station-reference-surface .ev-port-row .connector-visual {
    width: var(--ev-port-photo-size);
    height: 54px;
  }

  .ev-station-reference-surface .ev-port-row .connector-content > .connector-primary,
  .ev-station-reference-surface .sheet-port.connector-row.ev-port-row .connector-number {
    font-size: 16px;
  }

  .ev-station-reference-surface .ev-port-row .ev-port-meta {
    margin-top: 4px;
    font-size: 14px;
  }

  .ev-station-reference-surface .ev-port-row .connector-price .connector-tariff {
    font-size: 13px;
  }

  .ev-station-reference-surface .ev-port-row .connector-tariff-unit {
    font-size: .85em;
  }
}

@media (max-width: 380px) and (min-height: 480px) and (max-height: 760px) {
  .ev-station-reference-surface .sheet-port.connector-row.ev-port-row {
    --ev-port-price-width: 58px;
    --ev-port-badge-width: 68px;
    column-gap: 4px;
    row-gap: 6px;
  }
}

.ev-station-reference-surface .sheet-port.connector-row.ev-port-row {
  --ev-port-price-width: clamp(62px, 16.5vw, 84px);
  --ev-port-badge-width: clamp(80px, 20vw, 98px);
}

.ev-station-reference-surface .sheet-port.connector-row.ev-port-row .badge {
  box-sizing: border-box;
  padding: 3px 4px;
  font-size: clamp(11px, 2.85vw, 13px);
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.ev-station-reference-surface .sheet-port.connector-row.ev-port-row:has(.ev-port-neighbor) {
  row-gap: 3px;
}

.ev-station-reference-surface .ev-port-row .connector-price .connector-tariff {
  font-size: clamp(14px, 3.5vw, 16px);
  line-height: 1.15;
}

.ev-station-reference-surface .ev-port-row .connector-price .connector-tariff-unit {
  font-size: .83em;
}

.ev-station-reference-surface .ev-port-row .ev-port-neighbor {
  font-size: clamp(12px, 3.2vw, 14px);
  line-height: 1.2;
}

@media (max-width: 520px) {
  .ev-station-reference-surface .sheet-port.connector-row.ev-port-row {
    --ev-port-photo-size: 46px;
  }
}

@media (max-width: 380px) {
  .ev-station-reference-surface .sheet-port.connector-row.ev-port-row {
    --ev-port-badge-width: 74px;
    column-gap: 4px;
  }
}

.ev-station-reference-surface .ev-port-row .connector-visual {
  width: var(--ev-port-photo-size);
}
