/* Source-photo gallery shared by parking cards and detail dialog. */
.cbp-gallery {
  min-width: 0;
  color: var(--ink);
}
.cbp-gallery__stage {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}
.cbp-gallery--card .cbp-gallery__stage { aspect-ratio: 1.65; }
.cbp-gallery--detail .cbp-gallery__stage { aspect-ratio: 1.15; }
.cbp-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
}
.cbp-gallery--card .cbp-gallery__image { object-fit: cover; }
.cbp-gallery--detail .cbp-gallery__image { object-fit: contain; }
.cbp-gallery__controls {
  position: absolute;
  inset: 50% var(--space-2) auto;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}
.cbp-gallery__control {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, #fff);
  background: #fffffff0;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  transition: background .2s ease, color .2s ease;
}
.cbp-gallery__control svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: miter; stroke-width: 1.75; }
.cbp-gallery__control:hover { background: var(--ink); color: #fff; }
.cbp-gallery__thumbs {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.cbp-gallery__thumb {
  flex: 0 0 72px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface);
  cursor: pointer;
}
.cbp-gallery__thumb.is-active { border-color: var(--accent); }
.cbp-gallery__thumb-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.cbp-gallery__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.cbp-gallery__control:focus-visible,
.cbp-gallery__thumb:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 759px) {
  .cbp-gallery--detail .cbp-gallery__stage { aspect-ratio: 1.4; }
  .cbp-gallery__thumb { flex-basis: 64px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .cbp-gallery__control { transition: none; }
}
