.club-vehicle-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.club-vehicle-gallery-modal.is-open { display: flex; }
.club-vehicle-gallery-modal__backdrop { position: absolute; inset: 0; background: rgba(4, 13, 27, .88); }
.club-vehicle-gallery-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  width: min(1180px, 100%);
  height: min(820px, calc(100dvh - 44px));
  outline: none;
}
.club-vehicle-gallery-modal__dialog > img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 164px);
  object-fit: contain;
  border-radius: 12px;
}
.club-vehicle-gallery-modal__close,
.club-vehicle-gallery-modal__arrow {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(58, 48, 40, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: #172033;
  cursor: pointer;
}
.club-vehicle-gallery-modal__close { top: 10px; right: 10px; }
.club-vehicle-gallery-modal__arrow { top: 50%; transform: translateY(-50%); }
.club-vehicle-gallery-modal__arrow.is-previous { left: 10px; }
.club-vehicle-gallery-modal__arrow.is-next { right: 10px; }
.club-vehicle-gallery-modal__counter { position: absolute; top: 12px; left: 12px; z-index: 3; padding: 7px 10px; border-radius: 999px; background: rgba(4, 13, 27, .74); color: #fff; font-size: 12px; font-weight: 800; }
.club-vehicle-gallery-modal__thumbnails { display: flex; width: min(100%, 960px); gap: 8px; overflow-x: auto; padding: 12px 58px 2px; scrollbar-width: thin; }
.club-vehicle-gallery-modal__thumbnail { flex: 0 0 72px; width: 72px; height: 52px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: #fff; cursor: pointer; opacity: .7; }
.club-vehicle-gallery-modal__thumbnail:hover,
.club-vehicle-gallery-modal__thumbnail:focus-visible,
.club-vehicle-gallery-modal__thumbnail.is-active { border-color: #ff6a00; opacity: 1; outline: none; }
.club-vehicle-gallery-modal__thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.club-vehicle-gallery-viewer__visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.club-vehicle-gallery-modal-open { position: fixed; width: 100%; overflow: hidden; }

@media (max-width: 640px) {
  .club-vehicle-gallery-modal { padding: 10px; }
  .club-vehicle-gallery-modal__dialog > img { max-height: calc(100vh - 24px); }
  .club-vehicle-gallery-modal__close { top: 4px; right: 4px; }
  .club-vehicle-gallery-modal__arrow { width: 40px; height: 40px; }
  .club-vehicle-gallery-modal__arrow.is-previous { left: 2px; }
  .club-vehicle-gallery-modal__arrow.is-next { right: 2px; }
}
