/* OPTIONAL MODULE: remove both HTML connections to disable. */
:root { --oo-card-explorer-enabled: 1; }

/* All changes are scoped to the module; the original layout stays intact. */
.oo-explorer-ready > .glass-card {
  transition: opacity 400ms ease, translate 400ms ease;
}
.oo-explorer-trigger {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}
.oo-explorer-trigger:focus-visible {
  outline: 2px solid #b3ffe8;
  outline-offset: 5px;
}
@media (hover: hover) and (pointer: fine) {
  .oo-explorer-trigger:hover {
    box-shadow: inset 0 0 18px rgb(0 255 195 / 15%), 0 0 22px rgb(0 255 195 / 20%);
  }
}
.oo-explorer-ready.oo-explorer-open > .glass-card {
  opacity: .24;
  translate: 0 -24px;
}
.oo-explorer-ready.oo-explorer-open > .glass-card.oo-explorer-selected {
  opacity: 0;
  translate: none;
}

/* Native dialog supplies focus isolation, including on mobile. */
.oo-explorer-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #f8fffc;
  font: inherit;
}
.oo-explorer-dialog::backdrop { background: rgb(0 20 16 / 15%); }
.oo-explorer-panel {
  position: absolute;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 28px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #9affdf;
  border-radius: 24px;
  background: linear-gradient(140deg, rgb(18 113 87 / 95%), rgb(0 37 30 / 98%) 65%);
  box-shadow: inset 0 1px 3px #d8ffed55, 0 0 28px #00e8ae38, 0 24px 70px #0007;
  transform-origin: top left;
  scrollbar-width: thin;
  scrollbar-color: #36aa8d #003b30;
}
.oo-explorer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #9affdf66;
  border-radius: 50%;
  background: #00382dcc;
  color: white;
  font: 26px/1 Arial, sans-serif;
  cursor: pointer;
}
.oo-explorer-close:focus-visible { outline: 2px solid #ffe584; outline-offset: 3px; }
.oo-explorer-panel .oo-explorer-image {
  display: block;
  width: 360px;
  height: 225px;
  max-width: 100%;
  margin: 0 auto 25px;
  object-fit: contain;
}
.oo-explorer-panel .oo-explorer-logo { height: 125px; }
.oo-explorer-panel .oo-explorer-title {
  margin: 0 0 14px;
  color: #f8fffc;
  font: 750 27px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: -.02em;
}
.oo-explorer-panel .oo-explorer-summary {
  margin: 0;
  color: #d6f0e5;
  font: 400 17px/1.55 Inter, system-ui, sans-serif;
}
.oo-explorer-details {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #8be9c838;
  color: #edf9f4;
  font: 400 16px/1.65 Inter, system-ui, sans-serif;
}
.oo-explorer-details p { margin: 0; }
@media (max-width: 720px) {
  .oo-explorer-panel { padding: 24px; }
  .oo-explorer-ready.oo-explorer-open > .glass-card { translate: 0 -12px; }
  .oo-explorer-ready.oo-explorer-open > .glass-card.oo-explorer-selected { translate: none; }
}
@media (prefers-reduced-motion: reduce) {
  .oo-explorer-ready > .glass-card { transition: none; }
}


/* Остальные карточки остаются на своих местах */
.oo-explorer-ready.oo-explorer-open > .glass-card {
  translate: none;
}

/* Золотистая подсветка при наведении */
.oo-explorer-trigger {
  transition: box-shadow 300ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .oo-explorer-trigger:hover {
    box-shadow:
      inset 0 0 0 1px rgba(255, 221, 112, .9),
      inset 0 0 18px rgba(255, 211, 72, .15),
      0 0 24px rgba(255, 194, 35, .35);
  }
}

/* Сохраняем фон без затемнения */
.oo-explorer-dialog::backdrop {
  background: transparent;
}

/* Плавное возвращение остальных карточек */
.oo-explorer-ready > .glass-card {
  transition: opacity 320ms ease;
}

/* Отключаем предыдущую мгновенную подсветку */
.oo-explorer-trigger:hover {
  box-shadow: none;
}

/* Золотая подсветка раскрывается сверху вниз */
.oo-explorer-trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background: linear-gradient(
    180deg,
    rgba(255, 220, 110, .12),
    rgba(255, 201, 60, .04)
  );

  box-shadow:
    inset 0 0 0 1px rgba(255, 225, 135, .95),
    inset 0 0 20px rgba(255, 202, 60, .20);

  clip-path: inset(0 0 100% 0 round 24px);
  opacity: 0;

  transition:
    clip-path 650ms cubic-bezier(.22, .61, .36, 1),
    opacity 250ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .oo-explorer-trigger:hover::before {
    clip-path: inset(0 0 0 0 round 24px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oo-explorer-trigger::before,
  .oo-explorer-ready > .glass-card {
    transition: none;
  }
}

/* Подготовка раскрываемой карточки к анимации */
.oo-explorer-panel {
  will-change: transform, opacity;
}


/* Увеличиваем иллюстрации в открытых карточках */
.oo-explorer-panel .oo-explorer-image:not(.oo-explorer-logo) {
    width: 360px;
    max-width: 100%;
    height: 225px;
    margin: 0 auto 20px;
    object-fit: contain;
}


/* Только наличные в открытой карточке */
.oo-explorer-panel .oo-explorer-image[src*="card"]  {
    transform: scale(1.5);
    transform-origin: center;
}
.oo-explorer-panel .oo-explorer-image[src*="cash"]  {
    transform: scale(1.5);
    transform-origin: center;
}