.page.is-vehicle-detail .page__top {
  display: none;
}

.page.is-vehicle-detail .page-body {
  margin-top: 0;
}

.page.is-vehicle-detail:has(.vd-location),
.page.is-vehicle-detail:has(.vd-trips) {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
  padding-bottom: 32px;
}

.page.is-vehicle-detail:has(.vd-location) .page-body,
.page.is-vehicle-detail:has(.vd-trips) .page-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.page.is-vehicle-detail:has(.vd-location) .vd-shell,
.page.is-vehicle-detail:has(.vd-trips) .vd-shell {
  flex: 1;
  min-height: 0;
}

.vd-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.vd-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.vd-crumb {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}

.vd-crumb--current {
  color: var(--text);
  font-weight: 500;
}

.vd-crumb-sep {
  color: var(--muted);
}

.vd-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.vd-header__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.vd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vd-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 2px 8px;
  border: 1px solid #b0b9c4;
  border-radius: 4px;
  background: #edeff2;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #1b232a;
}

.vd-badge--cam {
  gap: 4px;
  border-color: #5ed18f;
  background: #cffce3;
  color: #085e2a;
}

.vd-tabs {
  display: inline-flex;
  gap: 40px;
  padding-right: 20px;
}

.vd-tab {
  position: relative;
  padding: 12px 0;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}

.vd-tab.is-active {
  color: var(--brand);
}

.vd-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand);
}

.vd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.vd-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vd-card {
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(29, 42, 52, 0.06);
}

.vd-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.vd-card__head-main {
  flex: 1;
  min-width: 0;
}

.vd-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.vd-card__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vd-card__divider {
  width: 1px;
  height: 26px;
  background: var(--hairline);
  flex-shrink: 0;
}

.vd-chevron {
  flex-shrink: 0;
  display: block;
}

.vd-section-toggle {
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.vd-section.is-collapsed .vd-section-body {
  display: none;
}

.vd-section.is-collapsed .vd-card__head {
  margin-bottom: 0;
}

.vd-inline-link {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.vd-inline-link--icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}

/* Hero */
.vd-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vd-hero__img-wrap {
  display: flex;
  justify-content: center;
  padding: 16px 0;
  width: 100%;
}

.vd-hero__img {
  display: block;
  width: 292px;
  max-width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: bottom;
}

.vd-hero__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding-bottom: 4px;
}

.vd-prndl {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vd-badge-off {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #808c9a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: #fff;
}

.vd-badge-disabled {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 4px 8px;
  border: 1px solid #cc0300;
  border-radius: 4px;
  background: #cc0300;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: #fff;
}

.vd-prndl__divider {
  width: 1px;
  height: 26px;
  background: var(--hairline);
}

.vd-prndl__gears {
  display: flex;
  gap: 4px;
}

.vd-gear {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.vd-gear.is-active {
  border: 1px solid var(--muted);
  background: var(--white);
  color: var(--text);
}

.vd-hero__refresh-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vd-hero__refresh {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.vd-refresh-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}

.vd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.vd-btn--outline {
  height: 48px;
  border: 1px solid var(--brand);
  background: var(--white);
  color: var(--brand);
}

.vd-btn--primary {
  border: 1px solid var(--border);
  background: var(--brand);
  color: var(--white);
}

.vd-remote {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.vd-remote.is-open {
  z-index: 40;
}

.vd-remote__panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  z-index: 41;
  width: max-content;
  max-width: calc(100vw - 48px);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(12, 17, 20, 0.14);
  transform: translateX(-50%);
}

.vd-remote__panel[hidden] {
  display: none;
}

.vd-remote.is-open .vd-btn--outline img {
  transform: rotate(180deg);
}

.vd-remote__grid {
  display: flex;
  gap: 48px;
  padding: 16px;
}

.vd-remote__col {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.vd-remote__cmd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.vd-remote__cmd:disabled {
  cursor: default;
}

.vd-remote__cmd:hover:not(:disabled):not(.is-loading):not(.is-success) .vd-remote__cmd-icon {
  background: #d6ecff;
}

.vd-remote__cmd-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f0f6ff;
}

.vd-remote__cmd-icon > img:first-child {
  display: block;
}

.vd-remote__cmd-loader {
  display: none;
  position: absolute;
  inset: 50% auto auto 50%;
  width: 62px;
  height: 62px;
  transform: translate(-50%, calc(-50% - 2px));
  pointer-events: none;
}

.vd-remote__cmd-loader img {
  display: block;
  width: 62px;
  height: 62px;
  animation: vd-remote-spin 0.9s linear infinite;
}

.vd-remote__cmd.is-loading .vd-remote__cmd-icon {
  background: transparent;
}

.vd-remote__cmd.is-loading .vd-remote__cmd-icon > img:first-child {
  visibility: hidden;
}

.vd-remote__cmd.is-loading .vd-remote__cmd-loader {
  display: block;
}

.vd-remote__cmd.is-success .vd-remote__cmd-icon {
  background: #f0fff7;
}

.vd-remote__cmd.is-success .vd-remote__cmd-icon > img:first-child {
  visibility: visible;
  filter: brightness(0) saturate(100%) invert(27%) sepia(98%) saturate(1500%) hue-rotate(113deg) brightness(93%) contrast(101%);
}

.vd-remote__cmd-label {
  color: #525e6d;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.vd-remote__cmd-label[hidden],
.vd-remote__cmd-sent[hidden] {
  display: none;
}

.vd-remote__cmd-sent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #008035;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.vd-remote__cmd-sent img {
  display: block;
  flex-shrink: 0;
}

.vd-remote__panel.is-busy .vd-remote__cmd:not(.is-loading):not(.is-success) {
  opacity: 0.55;
}

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

.vd-remote__faq {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
  background: var(--input);
  border-radius: 0 0 8px 8px;
}

.vd-remote__faq-link {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}

.vd-details-modal__foot {
  justify-content: flex-end;
  border-top: none;
}

.vd-details-modal__foot .btn-primary:disabled {
  border-color: transparent;
  background: var(--grey-200);
  color: #b0b9c4;
  opacity: 1;
  cursor: default;
}

.vd-details-modal .field--select {
  position: relative;
  padding-right: 36px;
}

.vd-details-modal .field--select select {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  outline: none;
  appearance: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.vd-details-modal .field__chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

#vd-details-modal-host[hidden] {
  display: none;
}

/* Drive block */
.vd-drive-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  text-align: center;
}

.vd-drive-block__lock {
  opacity: 0.8;
}

.vd-drive-block__title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.vd-drive-block__body {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.vd-drive-block-active {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
}

.vd-drive-block-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 500px;
  height: 48px;
  margin: 0;
  padding: 0 32px 0 28px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--white);
  color: var(--brand);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.vd-drive-block-action:hover {
  background: var(--brand-100);
}

.vd-drive-block-action:focus-visible {
  background: var(--brand-100);
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.vd-drive-block-action img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.vd-section[data-vd-section="drive"] .vd-card__head {
  margin-bottom: 20px;
}

.vd-section[data-vd-section="drive"] .vd-section-body {
  padding-top: 0;
}

/* Recalls */
.vd-recalls-empty {
  margin: 0;
  padding: 8px 0 16px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--text);
}

.vd-recalls-empty .vd-inline-link {
  font-size: 14px;
}

.vd-recall-table {
  display: flex;
  flex-direction: column;
}

.vd-recall-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
  line-height: 1.6;
}

.vd-recall-row:last-child {
  border-bottom: none;
}

.vd-recall-row__date {
  flex: 0 0 82px;
  color: var(--text);
}

.vd-recall-row__title {
  flex: 1;
  font-weight: 500;
}

/* Fuel */
.vd-fuel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.vd-fuel__level-head {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vd-fuel__pct {
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
}

.vd-fuel__fuel-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.vd-fuel__range {
  text-align: right;
}

.vd-fuel__range-num {
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
}

.vd-fuel__range-unit {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.vd-fuel__range-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.vd-fuel__bar {
  width: 100%;
  height: 40px;
  margin-bottom: 16px;
  border: 1px solid rgba(12, 17, 20, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: #edeff2;
}

.vd-fuel__bar-fill {
  display: block;
  height: 100%;
  background: #29ab5f;
}

.vd-fuel__stats {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.vd-fuel-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 14px;
}

.vd-fuel-stat + .vd-fuel-stat {
  border-top: 1px solid var(--hairline);
}

.vd-fuel-stat__label {
  color: var(--muted);
}

.vd-fuel-stat__value {
  font-weight: 500;
}

/* Details */
.vd-details {
  display: flex;
  flex-direction: column;
}

.vd-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
  line-height: 1.6;
}

.vd-detail-row:last-child {
  border-bottom: none;
}

.vd-detail-row__label {
  color: var(--muted);
}

.vd-detail-row__value {
  font-weight: 500;
  text-align: right;
}

.vd-detail-row__value .vd-inline-link {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.vd-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vd-oil-life {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vd-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.vd-link-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.vd-muted {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Diagnostics */
.vd-tires {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 0 24px;
}

.vd-tires__title {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.vd-tires__diagram {
  display: grid;
  grid-template-columns: 54px auto 54px;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  justify-items: center;
  column-gap: 14px;
  row-gap: 0;
}

.vd-tires__img {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.vd-tires__psi {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.vd-tires__psi--fl {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  padding-top: 22px;
}

.vd-tires__psi--rl {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  padding-bottom: 22px;
}

.vd-tires__psi--fr {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  padding-top: 22px;
}

.vd-tires__psi--rr {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  padding-bottom: 22px;
}

.vd-tires__rec {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.vd-diag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}

.vd-diag-row__label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vd-diag-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.vd-diag-row__value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.vd-diag-row.is-warn .vd-diag-row__value {
  color: #f2b50d;
}

.vd-diag-row.is-danger .vd-diag-row__value {
  color: #cc0300;
}

.vd-diag-row.is-muted .vd-diag-row__value {
  color: var(--muted);
  font-weight: 400;
}

.vd-placeholder,
.vd-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
}

/* Location tab */
.vd-location {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.vd-location__stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(29, 42, 52, 0.06);
  background: #e8eaed;
}

.vd-location__base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.vd-location__marker {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.vd-location__crosshair-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  transform: rotate(43deg);
}

.vd-location__crosshair {
  display: block;
  width: 64px;
  height: 64px;
}

.vd-location__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: #33404c;
  box-shadow: 0 4px 6px rgba(12, 17, 20, 0.1);
  transform: rotate(-43deg);
}

.vd-location__pin img {
  width: 16px;
  height: 16px;
}

.vd-location__controls {
  z-index: 3;
}

.vd-location-card {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  width: 320px;
  padding: 12px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(29, 42, 52, 0.06);
}

.vd-location-card__block + .vd-location-card__block {
  margin-top: 8px;
}

.vd-location-card__label {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.vd-location-card__value {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

/* Trips tab — Figma V2 build (5645:14150) */
.vd-trips {
  flex: 1;
  min-height: 0;
}

.vd-trips__split {
  display: grid;
  grid-template-columns: 500px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(29, 42, 52, 0.06);
}

.vd-trips__history {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 12px 0 0 12px;
  overflow: hidden;
}

.vd-trips__history--empty {
  padding-bottom: 16px;
}

.vd-trips__hero {
  padding: 8px 16px;
}

.vd-trips__date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.vd-trips__date-main {
  display: flex;
  align-items: center;
  min-width: 0;
}

.vd-trips__date-nav {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.vd-trips__calendar-btn,
.vd-trips__date-btn {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  padding: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.vd-trips__calendar-btn {
  width: 40px;
  height: 40px;
}

.vd-trips__date-label {
  padding: 0 4px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.vd-trips__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 16px 24px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.vd-trips__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
}

.vd-trips__stat-value {
  font-weight: 500;
  color: var(--text);
}

.vd-trips__stat-label {
  font-weight: 400;
  color: var(--muted);
}

.vd-trips__summary-divider {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  height: 40px;
}

.vd-trips__list {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 2px 4px;
}

.vd-trip-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border: none;
  border-bottom: 1px solid var(--hairline);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.vd-trip-card.is-selected {
  background: #f0f6ff;
}

.vd-trip-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.vd-trip-card__main {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.vd-trip-card__rail {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  width: 38px;
  padding-bottom: 27px;
}

.vd-trip-pin {
  position: relative;
  width: 38px;
  height: 47px;
}

.vd-trip-pin__shadow {
  display: block;
  width: 38px;
  height: 47px;
}

.vd-trip-pin__num {
  position: absolute;
  top: 8px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  transform: translateX(-50%);
}

.vd-trip-card__connector {
  flex: 1;
  width: 100%;
  min-height: 24px;
  position: relative;
}

.vd-trip-card__connector img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vd-trip-card__end-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
}

.vd-trip-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.vd-trip-address {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
}

.vd-trip-address__line {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vd-trip-address__time {
  flex-shrink: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  white-space: nowrap;
}

.vd-trip-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vd-trip-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 2px 8px;
  border: 1px solid #b0b9c4;
  border-radius: 4px;
  background: var(--white);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.vd-trip-badge--video {
  border-color: #7457e9;
  background: #ebe5ff;
  color: #7457e9;
}

.vd-trip-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-left: 40px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.vd-trip-card__metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vd-trip-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding-left: 40px;
  font-size: 14px;
  line-height: 1.6;
}

.vd-trip-footer__label {
  color: var(--muted);
}

.vd-trip-footer__score {
  color: var(--ink);
  font-weight: 500;
}

.vd-trip-footer__divider {
  display: inline-flex;
  align-items: center;
  height: 16px;
}

.vd-trips-unavailable {
  margin: 0;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.vd-trips__map {
  min-height: 0;
  border-radius: 0 12px 12px 0;
  overflow: hidden;
}

.vd-trips__map-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #e8eaed;
}

.vd-trips__map-edge {
  position: absolute;
  top: 0;
  left: -9px;
  z-index: 3;
  width: 10px;
  height: 100%;
  background: #f9f8f1;
  box-shadow: 0 0 8px 4px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.vd-trips__map-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.vd-trips__route {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vd-trips__map-pin {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.vd-trips__map-pin--start {
  width: 38px;
  height: 47px;
  transform: translate(-50%, -100%);
}

.vd-trips__map-pin--start img {
  display: block;
  width: 38px;
  height: 47px;
}

.vd-trips__map-pin-num {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 28px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--white);
  text-align: center;
  transform: translateX(-50%);
}

.vd-trips__map-pin--end {
  width: 18px;
  height: 18px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 2px 4px rgba(12, 17, 20, 0.15);
  transform: translate(-50%, -50%);
}

.vd-trips__map-event {
  position: absolute;
  z-index: 4;
  width: 28px;
  height: 28px;
  border: 4px solid var(--white);
  border-radius: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.vd-trips__map-event--warning {
  background: #f2b50d;
}

.vd-trips__map-event--severe {
  background: #cc0300;
}

.vd-trips__map-event--info {
  background: #525e6d;
}

.vd-trips__detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px 0 0 12px;
  background: var(--white);
}

.vd-trips__detail-nav {
  flex-shrink: 0;
  padding: 16px 16px 8px;
}

.vd-trips__back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.vd-trips__back:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.vd-trips__detail-scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.vd-trip-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 16px 16px;
}

.vd-trips__detail-divider {
  flex-shrink: 0;
  width: 100%;
  line-height: 0;
}

.vd-trips__detail-divider img {
  display: block;
  width: 100%;
  height: 1px;
}

.vd-trip-event {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--hairline);
}

.vd-trip-event__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vd-trip-event__title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.vd-trip-event__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.vd-trip-event__name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
}

.vd-trip-event__time {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
  white-space: nowrap;
}

.vd-trip-event__address {
  margin: 0;
  padding-left: 28px;
  padding-right: 65px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vd-trip-event__metric {
  padding-left: 28px;
  padding-right: 65px;
}

.vd-trip-event__metric-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.vd-trip-event__metric-value {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
}

.vd-trip-event__video {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 28px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.vd-trip-event__video-frame {
  position: relative;
  aspect-ratio: 312 / 166;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.vd-trip-event__video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.vd-trip-event__video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.vd-trip-event__video-console {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(27, 35, 42, 0.9);
}

.vd-trip-event__video-time {
  font-size: 8px;
  line-height: 1;
  color: var(--white);
}

.vd-trip-event__video-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 0 0 8px 8px;
  background: var(--white);
}

.vd-trip-event__video-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  cursor: pointer;
}

.vd-trips__controls {
  z-index: 4;
}

@media (max-width: 1100px) {
  .vd-grid {
    grid-template-columns: 1fr;
  }

  .vd-trips__split {
    grid-template-columns: 1fr;
  }

  .vd-trips__history {
    border-radius: 12px 12px 0 0;
  }

  .vd-trips__map {
    border-radius: 0 0 12px 12px;
  }

  .vd-trips__map-stage {
    min-height: 360px;
  }

  .vd-trips__summary {
    flex-wrap: wrap;
    height: auto;
    gap: 12px;
    justify-content: flex-start;
  }

  .vd-trips__summary-divider {
    display: none;
  }
}
