/* ── Backdrop ── */

.vt-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
  animation: vt-fade-in 0.2s ease;
}

@keyframes vt-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.vt-mobile-open {
  overflow: hidden;
}

/* ── Mobile bottom-sheet ── */

@media (max-width: 639px) {
  .vt-sheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    z-index: 9999 !important;
    max-height: 70vh;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    /* Tailwind v4 implements -translate-x-1/2 via CSS 'translate' property
       (not 'transform'). Reset the custom properties so the computed
       translate value becomes 0 — animation still overrides translate
       directly, so it is unaffected. */
    --tw-translate-x: 0 !important;
    --tw-translate-y: 0 !important;
    transform: none !important;
    animation: vt-slide-up 0.25s ease-out;
  }

  @keyframes vt-slide-up {
    from { translate: 0 100%; }
    to   { translate: 0 0%; }
  }

  .vt-sheet-handle {
    width: 40px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 12px auto 8px;
    flex-shrink: 0;
  }

  .vt-sheet-header {
    flex-shrink: 0;
    padding: 0 16px 12px;
    border-bottom: 1px solid #e5e7eb;
  }

  .vt-sheet-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .vt-sheet-title {
    font-size: 15px;
    font-weight: 600;
    color: #191A1C;
  }

  .vt-sheet-counter {
    font-size: 12px;
    color: #A6ACBB;
  }

  .vt-sheet-search {
    width: 100%;
    border: 0.5px solid #A6ACBB;
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 14px;
    color: #191A1C;
    outline: none;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
  }

  .vt-sheet [data-vehicle-tagify-target="panelContent"] {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 16px;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Mobile version list (steps 6–7) ── */

  .vt-version-list-mobile .vt-version-row-mobile {
    min-height: 48px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .vt-version-list-mobile .vt-version-row-mobile:active {
    background: rgba(215, 223, 242, 0.4);
    border-radius: 6px;
  }

  .vt-version-list-mobile .vt-version-row-mobile .vt-vr-name {
    font-size: 14px;
    font-weight: 600;
    color: #191A1C;
    line-height: 1.3;
  }

  .vt-version-list-mobile .vt-version-row-mobile .vt-vr-specs {
    font-size: 12px;
    color: #c51d54;
  }
}
