/* ── Provider games page ── */
.provider-games-page {
  position: relative;
  padding: 0.5rem 0 1.5rem;
}

.provider-games-page__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.provider-games-page__back {
  position: fixed;
  left: 0;
  top: 75%;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 0 999px 999px 0;
  background: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.provider-games-page__back:hover {
  transform: translateY(-50%) translateX(2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
  background: #fafafa;
}

.provider-games-page__back:active {
  transform: translateY(-50%) translateX(0);
}

.provider-games-page__back-icon {
  display: block;
  width: 30px;
  height: 30px;
  margin-right: 5px;
  object-fit: contain;
}

@media (min-width: 901px) {
  .provider-games-page__back {
    left: var(--sidebar-width, 240px);
  }
}

.provider-games-page__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.provider-games-page__title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--accent-gold, #ffc107);
}

.provider-games-page__count {
  margin: 0;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(59, 158, 255, 0.12);
  color: #7ec3ff;
  font-size: 0.75rem;
  font-weight: 700;
}

.provider-games-search {
  position: relative;
  display: block;
}

.provider-games-search__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.provider-games-search__input {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.9rem 0.6rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #fff);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.provider-games-search__input:focus {
  border-color: rgba(255, 193, 7, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.provider-games-search__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.provider-games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 50px;
}

.provider-games-card {
  min-width: 0;
}

.provider-games-card__shell {
  --pgc-footer-height: 58px;
  --pgc-favorite-slant: 12px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.provider-games-card__button {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  display: block;
}

.provider-games-card__shell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.provider-games-card--maintenance .provider-games-card__shell {
  cursor: not-allowed;
}

.provider-games-card--maintenance .provider-games-card__shell:hover,
.provider-games-card--maintenance .provider-games-card__shell:active {
  transform: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.provider-games-card--maintenance .provider-games-card__button {
  cursor: not-allowed;
}

.provider-games-card__media {
  position: relative;
  aspect-ratio: 242 / 192;
  overflow: hidden;
  background: linear-gradient(160deg, #2a2a2a, #111);
}

.provider-games-card__badge {
  position: absolute;
  top: 3px;
  left: 0px;
  z-index: 2;
  width: 60px;
  height: auto;
  max-width: 60px;
  padding: 0;
  background: none;
  transform: none;
  box-shadow: none;
  pointer-events: none;
  object-fit: contain;
}

.provider-games-card__media > img:not(.provider-games-card__badge) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.28s ease;
}

.provider-games-card:not(.provider-games-card--maintenance)
  .provider-games-card__shell:hover
  .provider-games-card__media
  > img:not(.provider-games-card__badge) {
  filter: brightness(1.3);
}

.provider-games-card__play-btn {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 3;
  transform: translate(-50%, 8px);
  min-width: 12rem;
  padding: 0.72rem 1.65rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd54d 0%, #f7c113 52%, #f57c00 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  transition:
    top 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.provider-games-card:not(.provider-games-card--maintenance)
  .provider-games-card__shell:hover
  .provider-games-card__play-btn {
  top: 50%;
  transform: translate(-50%, -50%);
}

.provider-games-card__media--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18%;
  box-sizing: border-box;
}

.provider-games-card__media--fallback img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.9;
}

.provider-games-card__footer {
  position: relative;
  height: var(--pgc-footer-height);
  min-height: var(--pgc-footer-height);
  background: #0a0a0a;
}

.provider-games-card__footer-info {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: var(--pgc-footer-height);
  padding: 8px 2.6rem 6px 10px;
  background: linear-gradient(180deg, #ffe082 0%, #ffb300 55%, #ff8f00 100%);
  box-sizing: border-box;
}

.provider-games-card__title {
  margin: 0;
  min-width: 0;
}

.provider-games-card__title-row {
  display: flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  color: #1a1200;
}

.provider-games-card__provider {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 700;
}

.provider-games-card__divider {
  flex-shrink: 0;
  margin: 0 5px 0 3px;
  font-weight: 400;
}

.provider-games-card__name-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.provider-games-card__name-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.provider-games-card__title.is-scrollable .provider-games-card__name-text {
  display: inline-block;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.provider-games-card__shell:hover .provider-games-card__title.is-scrollable .provider-games-card__name-text {
  animation: provider-games-title-marquee var(--title-duration, 4s) ease-in-out infinite;
}

@keyframes provider-games-title-marquee {
  0%,
  12% {
    transform: translateX(0);
  }

  45%,
  55% {
    transform: translateX(var(--title-shift, 0));
  }

  88%,
  100% {
    transform: translateX(0);
  }
}

.provider-games-card__stats {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: #111;
  margin-top: 5px;
}

.provider-games-card__stat-icon {
  flex-shrink: 0;
  width: 30px;
  height: 25px;
  object-fit: contain;
  display: block;
}

.provider-games-card__stat-count {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.provider-games-card__favorite {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 26%;
  min-width: 38px;
  height: var(--pgc-footer-height);
  max-height: var(--pgc-footer-height);
  padding: 0;
  border: none;
  background: #0a0a0a;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(
    var(--pgc-favorite-slant) 0,
    100% 0,
    100% 100%,
    0 100%
  );
  transition: color 0.18s ease, background 0.18s ease;
}

.provider-games-card__favorite:hover {
  color: #ffffff;
  background: #141414;
}

.provider-games-card__favorite.is-favorited {
  color: #ed14e2;
}

.provider-games-card__favorite.is-favorited:hover {
  color: #ed14e2;
}

.provider-games-card__heart-icon {
  display: block;
  width: 30px;
  height: 30px;
  fill: currentColor;
  stroke: none;
}

.provider-games-card__favorite.is-favorited .provider-games-card__heart-icon {
  fill: currentColor;
}

.provider-games-card__name {
  font-size: clamp(0.52rem, 1.2vw, 0.68rem);
  font-weight: 700;
  line-height: 1.2;
  color: #f1f1f1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.provider-games-page__loading,
.provider-games-page__empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 220px;
  padding: 2rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  text-align: center;
}

.provider-games-page__loading p,
.provider-games-page__empty p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.provider-games-page__empty h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.provider-games-page__empty-icon {
  font-size: 2rem;
}

.provider-games-page__empty--error {
  border-color: rgba(239, 68, 68, 0.25);
}

.provider-games-page__lobby-btn {
  margin-top: 0.75rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.provider-games-page__lobby-btn:hover {
  filter: brightness(1.05);
}

.provider-games-page__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-gold, #ffc107);
  border-radius: 50%;
  animation: providerGamesSpin 0.8s linear infinite;
}

@keyframes providerGamesSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .provider-games-card__badge {
    top: 2px;
    width: 45px;
    max-width: 45px;
  }
}

@media (min-width: 1024px) {
  .provider-games-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .provider-games-page {
    padding-top: 0.75rem;
  }
}

/* ── Full-screen game player (iframe + loading) ── */
.bmp-game-player {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
}

.bmp-game-player__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.bmp-game-player__loading[hidden],
.bmp-game-player__stage[hidden],
.bmp-game-player__panel--hidden {
  display: none !important;
}

.bmp-game-player__loading-logo {
  width: min(220px, 58vw);
  height: auto;
  object-fit: contain;
}

.bmp-game-player__stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.bmp-game-player__frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.bmp-game-player__back {
  position: fixed;
  left: 2px;
  top: max(100px, env(safe-area-inset-top, 0px));
  z-index: 1510;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  cursor: pointer;
  transform: none;
}

.bmp-game-player__back:hover,
.bmp-game-player__back:active {
  background: none;
  box-shadow: none;
  transform: none;
}

.bmp-game-player__back-icon {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0;
  object-fit: contain;
  mix-blend-mode: screen;
}

body.bmp-game-active {
  overflow: hidden;
}

body.bmp-game-active .bottom-nav,
body.bmp-game-active .lang-cluster {
  display: none;
}
