/**
 * hv-lightbox — общая модалка-лайтбокс (галерея и карточки Handball Games).
 *
 * Классы `.galleryModal*` сохранены как публичный контракт: их использует
 * `plugins/gallery/public/gallery-public.js` и React-карточка игрока.
 * Раньше правила жили в `plugins/gallery/gallery-public.css`; вынесены в общий
 * слой, чтобы карточка игрока не зависела от ассетов чужого плагина.
 */

.galleryModal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(0 0 0 / .82);
}

.galleryModal__panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: 100%;
}

.galleryModal__content img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
}

.galleryModal__content iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.galleryModal__close,
.galleryModal__prev,
.galleryModal__next {
  position: absolute;
  z-index: 2;
  border: 0;
  color: #fff;
  background: rgb(0 0 0 / .62);
  cursor: pointer;
  font: inherit;
}

.galleryModal__close {
  top: 16px;
  right: 16px;
  padding: 8px 12px;
}

.galleryModal__prev { left: 8px; top: 50%; transform: translateY(-50%); padding: 14px; }
.galleryModal__next { right: 8px; top: 50%; transform: translateY(-50%); padding: 14px; }

/* Опциональный низ модалки: счётчик и/или подпись. */
.galleryModal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  color: #cbd5e1;
  font-size: .9rem;
  line-height: 1.35;
}

.galleryModal__counter {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .galleryModal {
    padding: 8px;
  }

  .galleryModal__close {
    top: 8px;
    right: 8px;
  }

  .galleryModal__prev { left: 4px; }
  .galleryModal__next { right: 4px; }
}
