﻿@import "../styles.css?v=20260316-02";

/* Safety overrides for games modal and arrows on index page */
.games-arrows.is-hidden,
.games-arrows[hidden] {
  display: none !important;
}

.game-slide__more {
  margin-top: auto;
  width: 160px;
  max-width: 100%;
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 0 15px 0 15px;
  background: #8b76a0;
  color: #fff;
  font-family: "Philosopher", serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  line-height: normal;
  cursor: pointer;
  transition:
    background-color 0.3s ease-in-out,
    border-radius 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out,
    transform 0.2s ease;
}

.game-slide__more:hover,
.game-slide__more:focus-visible {
  background: #6f5787;
  border-radius: 15px 0 15px 0;
  box-shadow: 0 8px 20px rgba(83, 56, 109, 0.26);
}

.game-slide__more:active {
  transform: translateY(1px);
}

.game-details-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.game-details-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.game-details-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 6, 18, 0.64);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.game-details-modal.is-open .game-details-modal__backdrop {
  opacity: 1;
}

.game-details-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  background: #f7f7fa;
  border-radius: 0 20px 0 20px;
  padding: 22px;
  overflow: auto;
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.28s ease;
}

.game-details-modal.is-open .game-details-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.game-details-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(231, 119, 47, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: transparent;
  font-size: 0;
  line-height: 0;
  padding: 0;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.35s ease,
    border-color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.game-details-modal__close::before,
.game-details-modal__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #d55c58;
  transform-origin: center;
  transition: background-color 0.3s ease, transform 0.35s ease;
}

.game-details-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.game-details-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (hover: hover) and (pointer: fine) {
  .game-details-modal__close:hover,
  .game-details-modal__close:focus-visible {
    transform: rotate(180deg) scale(1.04);
    border-color: rgba(255, 255, 255, 0.95);
    background: rgba(214, 92, 88, 0.85);
    box-shadow: 0 8px 20px rgba(15, 3, 23, 0.35);
  }

  .game-details-modal__close:hover::before,
  .game-details-modal__close:hover::after,
  .game-details-modal__close:focus-visible::before,
  .game-details-modal__close:focus-visible::after {
    background-color: #ffffff;
  }
}

.game-details-modal__title {
  margin: 0 42px 14px 0;
  font-family: "Philosopher", serif;
  font-size: 34px;
  line-height: 1.1;
  color: #3b1d4f;
}

.game-details-modal__gallery-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.game-details-modal__gallery {
  width: 100%;
  height: 430px;
  background: #e4e4ea;
  border-radius: 0 14px 0 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.game-details-modal__gallery img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover !important;
  object-position: center center;
  transform: translateZ(0);
}

.game-details-modal__arrow {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: #7a618f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.game-details-modal__arrow img {
  width: 9px;
  height: 16px;
}

.game-details-modal__arrow.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.game-details-modal__dots {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.game-details-dot {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 999px;
  background: #c6c6cf;
  cursor: pointer;
}

.game-details-dot.is-active {
  background: #e47a2e;
}

.game-details-modal__text {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.55;
  color: #2c2832;
  white-space: pre-line;
}

@media (max-width: 780px) {
  .game-details-modal__dialog {
    width: min(920px, calc(100vw - 20px));
    padding: 16px;
    max-height: calc(100vh - 20px);
    margin: 10px auto;
  }

  .game-details-modal__title {
    font-size: 26px;
    margin-right: 44px;
  }

  .game-details-modal__gallery-wrap {
    grid-template-columns: 1fr;
  }

  .game-details-modal__gallery {
    width: 100%;
    height: 280px;
  }

  .game-details-modal__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
  }

  .game-details-modal__arrow--prev {
    left: 8px;
  }

  .game-details-modal__arrow--next {
    right: 8px;
  }
}



