/* Mood — карточки игр: только обложка, hover с логотипом провайдера и lift */

body.mood-layout-v2 .game-card--thumb-only .game-card-info,
body.mood-layout-v2 .game-card--strip .game-card-info {
  display: none !important;
}

body.mood-layout-v2 .game-card--thumb-only .game-card-inner,
body.mood-layout-v2 .game-card--strip .game-card-inner--thumb {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

body.mood-layout-v2 .game-card--thumb-only .game-card-img-wrap,
body.mood-layout-v2 .game-card--pinko .game-card-inner--thumb,
body.mood-layout-v2 .game-card--grid .game-card-inner--thumb {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s ease,
    border-color 0.22s ease;
  transform-origin: center center;
}

/* Полосы на главной: портрет 427:575, картинка целиком */
body.mood-layout-v2 .game-card--strip .game-card-img-wrap {
  aspect-ratio: 427 / 575;
}

body.mood-layout-v2 .game-card--strip .game-card-img img {
  object-fit: cover;
  object-position: center center;
}

/* Полосы на главной: крупные портретные превью 427:575 */
body.mood-layout-v2 .home-games-block .home-games-strip .game-card--strip,
body.mood-layout-v2 .home-hot-slots-strip-wrap .home-games-strip .game-card--strip {
  flex: 0 0 176px;
  width: 176px;
  max-width: 176px;
  overflow: visible;
}

@media (max-width: 640px) {
  body.mood-layout-v2 .home-games-block .home-games-strip .game-card--strip,
  body.mood-layout-v2 .home-hot-slots-strip-wrap .home-games-strip .game-card--strip {
    flex: 0 0 148px;
    width: 148px;
    max-width: 148px;
  }
}

body.mood-layout-v2 .game-card--has-hover {
  position: relative;
  z-index: 1;
}

body.mood-layout-v2 .game-card--has-hover .game-card-hover {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
  z-index: 6;
  padding: 12px 10px 10px;
  background: linear-gradient(180deg, rgba(8, 11, 16, 0.42) 0%, rgba(8, 11, 16, 0.84) 58%, rgba(8, 11, 16, 0.94) 100%);
}

body.mood-layout-v2 .game-card-hover-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 8px 0 6px;
}

body.mood-layout-v2 .game-card-hover-provider {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 78%;
  min-height: 20px;
  max-height: 26px;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

body.mood-layout-v2 .game-card-hover-provider img {
  display: block;
  max-height: 22px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(1.08);
}

body.mood-layout-v2 .game-card-hover-provider--text span,
body.mood-layout-v2 .game-card-hover-provider__fallback {
  font: 700 0.58rem/1.2 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.mood-layout-v2 .game-card-hover-provider__img--broken + .game-card-hover-provider__fallback[hidden] {
  display: block;
}

body.mood-layout-v2 .game-card .game-card-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 34px;
  height: 34px;
  opacity: 0;
  transform: scale(0.88);
}

body.mood-layout-v2 .game-card .game-card-fav-btn svg {
  width: 18px;
  height: 18px;
}

body.mood-layout-v2 .game-card .game-card-btn {
  min-width: 0;
  width: 100%;
  max-width: 148px;
  padding: 10px 14px;
  font-size: 0.8rem;
  transform: none;
}

body.mood-layout-v2 .game-card .game-card-btn--demo {
  max-width: 124px;
  padding: 8px 12px;
  font-size: 0.74rem;
}

body.mood-layout-v2 .game-card .game-card-btn-icon {
  font-size: 12px;
}

body.mood-layout-v2 .game-card--has-hover:hover .game-card-thumb-tags,
body.mood-layout-v2 .game-card--has-hover:focus-within .game-card-thumb-tags,
body.mood-layout-v2 .game-card--has-hover.is-touch-open .game-card-thumb-tags {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

body.mood-layout-v2 .game-card-thumb-tags {
  transition: opacity 0.18s ease;
}

/* Полосы: место для hover и сдвига соседей */
body.mood-layout-v2 .home-games-block {
  position: relative;
  z-index: 0;
  overflow: visible;
  isolation: isolate;
}

body.mood-layout-v2 .home-games-block-head {
  position: relative;
  z-index: 1;
}

body.mood-layout-v2 .home-games-block:has(.game-card--has-hover:hover),
body.mood-layout-v2 .home-games-block:has(.game-card--has-hover.is-touch-open) {
  z-index: 20;
}

body.mood-layout-v2 .home-games-strip-wrap {
  position: relative;
  z-index: 2;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 40px;
  padding-bottom: 40px;
  margin-top: -40px;
  margin-bottom: -40px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.mood-layout-v2 .home-games-strip {
  padding-top: 0;
  padding-bottom: 0;
}

body.mood-layout-v2 .home-games-strip > .game-card {
  overflow: visible !important;
}

body.mood-layout-v2 .home-games-strip .game-card--has-hover {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Desktop: аккуратный lift + соседи чуть расходятся */
@media (hover: hover) and (pointer: fine) {
  body.mood-layout-v2 .game-card--has-hover:hover {
    z-index: 30;
  }

  body.mood-layout-v2 .game-card--has-hover:hover .game-card-img-wrap {
    transform: scale(1.14) translateY(-10px);
    box-shadow:
      0 16px 32px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(68, 235, 213, 0.32);
    border-color: rgba(68, 235, 213, 0.38);
  }

  body.mood-layout-v2 .home-games-strip .game-card--has-hover:hover {
    transform: scale(1.14) translateY(-12px);
  }

  body.mood-layout-v2 .home-games-strip .game-card--has-hover:hover + .game-card--has-hover {
    transform: translateX(14px);
  }

  body.mood-layout-v2 .home-games-strip .game-card--has-hover:has(+ .game-card--has-hover:hover) {
    transform: translateX(-14px);
  }

  body.mood-layout-v2 .home-games-strip .game-card--has-hover:hover .game-card-img-wrap {
    transform: none;
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(68, 235, 213, 0.36);
    border-color: rgba(68, 235, 213, 0.42);
  }

  body.mood-layout-v2 .game-card--has-hover:hover .game-card-inner--thumb:not(:has(> .game-card-img-wrap)) {
    transform: scale(1.14) translateY(-10px);
    box-shadow:
      0 16px 32px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(68, 235, 213, 0.32);
    border-color: rgba(68, 235, 213, 0.38);
  }

  body.mood-layout-v2 .game-card--has-hover:hover .game-card-img img {
    transform: none;
    filter: brightness(0.48) saturate(1.1);
  }

  body.mood-layout-v2 .game-card--has-hover:hover .game-card-hover,
  body.mood-layout-v2 .game-card--has-hover:focus-within .game-card-hover {
    opacity: 1;
    pointer-events: auto;
  }

  body.mood-layout-v2 .game-card--has-hover:hover .game-card-fav-btn,
  body.mood-layout-v2 .game-card--has-hover:focus-within .game-card-fav-btn {
    opacity: 1;
    transform: scale(1);
  }
}

/* Touch: без скачка сетки, тап открывает панель действий */
@media (hover: none), (pointer: coarse) {
  body.mood-layout-v2 .game-card--has-hover:hover .game-card-img-wrap,
  body.mood-layout-v2 .game-card--has-hover:hover .game-card-inner--thumb {
    transform: none;
    box-shadow: none;
  }

  body.mood-layout-v2 .game-card--has-hover.is-touch-open {
    z-index: 14;
  }

  body.mood-layout-v2 .game-card--has-hover.is-touch-open .game-card-img-wrap,
  body.mood-layout-v2 .game-card--has-hover.is-touch-open .game-card-inner--thumb {
    transform: scale(1.06) translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
    border-color: rgba(68, 235, 213, 0.35);
  }

  body.mood-layout-v2 .game-card--has-hover.is-touch-open .game-card-hover {
    opacity: 1;
    pointer-events: auto;
  }

  body.mood-layout-v2 .game-card--has-hover.is-touch-open .game-card-fav-btn {
    opacity: 1;
    transform: scale(1);
  }

  body.mood-layout-v2 .game-card--has-hover.is-touch-open .game-card-img img {
    filter: brightness(0.48) saturate(1.08);
  }
}

/* Отключаем старый lift у mood-base для mood-карточек */
body.mood-layout-v2 .game-card--has-hover:hover .game-card-inner:not(.game-card-inner--thumb) {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

html[data-theme="light"] body.mood-layout-v2 .game-card--has-hover:hover .game-card-img-wrap,
html[data-theme="light"] body.mood-layout-v2 .game-card--has-hover:hover .game-card-inner--thumb {
  box-shadow:
    0 18px 36px rgba(16, 24, 40, 0.18),
    0 0 0 1px rgba(68, 235, 213, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  body.mood-layout-v2 .game-card--thumb-only .game-card-img-wrap,
  body.mood-layout-v2 .game-card--pinko .game-card-inner--thumb,
  body.mood-layout-v2 .game-card--grid .game-card-inner--thumb {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  @media (hover: hover) and (pointer: fine) {
    body.mood-layout-v2 .game-card--has-hover:hover .game-card-img-wrap,
    body.mood-layout-v2 .game-card--has-hover:hover .game-card-inner--thumb {
      transform: scale(1.06) translateY(-3px);
    }

    body.mood-layout-v2 .home-games-strip .game-card--has-hover:hover + .game-card--has-hover,
    body.mood-layout-v2 .home-games-strip .game-card--has-hover:has(+ .game-card--has-hover:hover) {
      transform: none;
    }
  }
}
