/* Gita — How to Buy Ticket : Guide, guide version v14 */

:root {
  --gita-guide-accent: #e63955;
  --gita-guide-accent-strong: #c92342;
  --gita-guide-ink: #172033;
  --gita-guide-muted: #64748b;
  --gita-guide-surface: rgba(255, 255, 255, .97);
  --gita-guide-border: rgba(15, 23, 42, .13);
  --gita-guide-shadow: 0 28px 90px rgba(15, 23, 42, .28), 0 0 0 1px rgba(255, 255, 255, .35);
}

html[data-theme="dark"] {
  --gita-guide-accent: #ff536c;
  --gita-guide-accent-strong: #f33d59;
  --gita-guide-ink: #f8fafc;
  --gita-guide-muted: #aebbd0;
  --gita-guide-surface: rgba(17, 22, 34, .98);
  --gita-guide-border: rgba(255, 255, 255, .16);
  --gita-guide-shadow: 0 30px 100px rgba(0, 0, 0, .52), 0 0 0 1px rgba(255, 255, 255, .08);
}

html.gita-buy-guide-open,
body.gita-buy-guide-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* Shared home entry point: a compact, always-available chip just below the cover. */
.gita-buy-guide-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 3px;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}
.gita-buy-guide-home-cta {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid rgba(230, 57, 85, .34);
  border-radius: 999px;
  padding: .62rem 1.05rem;
  background: rgba(255, 255, 255, .72);
  color: var(--gita-guide-accent-strong);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  cursor: pointer;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.2;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.gita-buy-guide-home-cta__icon {
  width: 1.05rem;
  height: 1.05rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.gita-buy-guide-home-cta__icon svg { width: 100%; height: 100%; fill: currentColor; }
.gita-buy-guide-home-cta:hover,
.gita-buy-guide-home-cta:focus-visible {
  border-color: var(--gita-guide-accent);
  background: rgba(255, 241, 244, .94);
  box-shadow: 0 10px 26px rgba(230, 57, 85, .15);
  outline: none;
}
.gita-buy-guide-home-cta:active { transform: scale(.98); }
html[data-theme="dark"] .gita-buy-guide-home-cta {
  background: rgba(22, 28, 42, .9);
  border-color: rgba(255, 83, 108, .42);
  color: #ffd5dc;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}
html[data-theme="dark"] .gita-buy-guide-home-cta:hover,
html[data-theme="dark"] .gita-buy-guide-home-cta:focus-visible {
  background: rgba(73, 27, 42, .9);
}

/* Keep the guide chip inside the cover's lower edge at every resolution and
   align its center with the artwork's Buy Ticket landmark. */
body.rdm-home-page .gita-buy-guide-cta-row {
  box-sizing: border-box;
  height: 64px;
  margin-top: -64px;
  padding: 0 0 14px;
  align-items: flex-end;
  justify-content: flex-start;
  position: relative;
  z-index: 4;
  pointer-events: none;
}

body.rdm-home-page .gita-buy-guide-home-cta {
  position: relative;
  left: var(--gita-guide-anchor-x, 50%);
  transform: translateX(-50%);
  pointer-events: auto;
}

body.rdm-home-page .gita-buy-guide-home-cta:active {
  transform: translateX(-50%) scale(.98);
}

/* Mobile keeps the chip clear of the artwork's final caption line and hugs
   the cover edge so the entry point does not create extra page height. */
@media (max-width: 767px) {
  body.rdm-home-page .gita-buy-guide-cta-row {
    padding-bottom: 1px;
  }

  body.rdm-home-page .gita-buy-guide-home-cta {
    gap: .35rem;
    padding: .48rem .78rem;
    font-size: .78rem;
  }

  body.rdm-home-page .gita-buy-guide-home-cta__icon {
    width: .95rem;
    height: .95rem;
  }
}

/* Overlay and dialog. Mobile home screens reserve the fixed app chrome so the
   guide never tucks under the top navigation or bottom navigation bar. */
.gita-buy-guide-root,
.gita-buy-guide-root[hidden] { display: none; }
.gita-buy-guide-root.is-open {
  --gita-guide-top-inset: max(12px, env(safe-area-inset-top));
  --gita-guide-bottom-inset: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
  padding: var(--gita-guide-top-inset) max(12px, env(safe-area-inset-right)) var(--gita-guide-bottom-inset) max(12px, env(safe-area-inset-left));
  overflow: hidden;
  overscroll-behavior: contain;
  z-index: 10020;
}
.gita-buy-guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, .54);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: gita-guide-fade-in .2s ease both;
}
.gita-buy-guide-dialog {
  position: relative;
  inset: auto;
  width: min(620px, 100%);
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  box-sizing: border-box;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gita-guide-border);
  border-radius: 26px;
  background: var(--gita-guide-surface);
  color: var(--gita-guide-ink);
  box-shadow: var(--gita-guide-shadow);
  overscroll-behavior: contain;
  animation: gita-guide-dialog-in .28s cubic-bezier(.2,.8,.2,1) both;
}
.gita-buy-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem .85rem 1.1rem;
  border-bottom: 1px solid var(--gita-guide-border);
  flex: 0 0 auto;
}
.gita-buy-guide-heading { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.gita-buy-guide-heading__icon {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--gita-guide-accent), var(--gita-guide-accent-strong));
  box-shadow: 0 7px 16px rgba(230, 57, 85, .2);
}
.gita-buy-guide-heading__icon svg { width: 22px; height: 22px; fill: currentColor; }
.gita-buy-guide-kicker { display: block; color: var(--gita-guide-muted); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.gita-buy-guide-heading h2 { margin: .05rem 0 0; font-size: clamp(1rem, 2.8vw, 1.28rem); line-height: 1.15; }
.gita-buy-guide-close {
  width: 38px; height: 38px; flex: 0 0 auto;
  border: 1px solid var(--gita-guide-border); border-radius: 50%;
  display: grid; place-items: center; color: var(--gita-guide-ink);
  background: transparent; cursor: pointer;
}
.gita-buy-guide-close:hover, .gita-buy-guide-close:focus-visible { color: var(--gita-guide-accent-strong); background: rgba(230, 57, 85, .09); outline: none; }
.gita-buy-guide-close svg { width: 21px; height: 21px; fill: currentColor; }
.gita-buy-guide-viewport { flex: 1 1 auto; align-self: stretch; width: 100%; height: auto; aspect-ratio: 1170 / 1480; min-height: 0; max-height: 100%; overflow: hidden; touch-action: pan-y; background: rgba(148, 163, 184, .08); }
.gita-buy-guide-track { height: 100%; min-height: 0; display: flex; transition: transform .34s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.gita-buy-guide-slide { width: 100%; height: 100%; flex: 0 0 100%; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.gita-buy-guide-slide img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; object-position: center; user-select: none; -webkit-user-drag: none; }
.gita-buy-guide-footer { flex: 0 0 auto; padding: .8rem 1rem 1rem; border-top: 1px solid var(--gita-guide-border); background: color-mix(in srgb, var(--gita-guide-surface) 90%, transparent); }
.gita-buy-guide-progress-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .7rem; }
.gita-buy-guide-dots { display: flex; align-items: center; gap: .42rem; }
.gita-buy-guide-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--gita-guide-muted); opacity: .42; cursor: pointer; transition: width .2s ease, opacity .2s ease, background .2s ease; }
.gita-buy-guide-dot.is-active { width: 23px; opacity: 1; background: var(--gita-guide-accent); }
.gita-buy-guide-dot:focus-visible { outline: 3px solid rgba(230, 57, 85, .22); outline-offset: 3px; }
.gita-buy-guide-progress { color: var(--gita-guide-muted); font-size: .78rem; font-weight: 800; }
.gita-buy-guide-controls { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.gita-buy-guide-control { min-height: 42px; border-radius: 12px; padding: .65rem .8rem; display: inline-flex; align-items: center; justify-content: center; gap: .42rem; font: inherit; font-size: .86rem; font-weight: 800; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, opacity .2s ease; }
.gita-buy-guide-control svg { width: 18px; height: 18px; fill: currentColor; }
.gita-buy-guide-back { color: var(--gita-guide-muted); border: 1px solid var(--gita-guide-border); background: transparent; }
.gita-buy-guide-back:not(:disabled):hover, .gita-buy-guide-back:not(:disabled):focus-visible { color: var(--gita-guide-ink); background: rgba(148, 163, 184, .12); outline: none; }
.gita-buy-guide-back:disabled { opacity: .42; cursor: not-allowed; }
.gita-buy-guide-next { color: #fff; border: 1px solid transparent; background: linear-gradient(135deg, var(--gita-guide-accent), var(--gita-guide-accent-strong)); box-shadow: 0 7px 18px rgba(230, 57, 85, .2); }
.gita-buy-guide-next:hover, .gita-buy-guide-next:focus-visible { filter: brightness(1.05); outline: none; }

@keyframes gita-guide-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gita-guide-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 639px) {
  body.rdm-home-page .gita-buy-guide-root.is-open {
    --gita-guide-top-inset: calc(var(--gita-navbar-h, 72px) + env(safe-area-inset-top));
    --gita-guide-bottom-inset: calc(68px + env(safe-area-inset-bottom));
    padding-left: 8px;
    padding-right: 8px;
  }
  .gita-buy-guide-dialog {
    inset: auto;
    width: 100%;
    max-width: 100%;
    max-height: none;
    border-radius: 22px;
  }
  .gita-buy-guide-header { padding: .7rem .7rem .65rem .8rem; }
  .gita-buy-guide-heading__icon { width: 34px; height: 34px; border-radius: 10px; }
  .gita-buy-guide-heading h2 { font-size: 1rem; }
  .gita-buy-guide-close { width: 34px; height: 34px; }
  .gita-buy-guide-viewport {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
  }
  .gita-buy-guide-slide { padding: 0; }
  .gita-buy-guide-footer { padding: .65rem .7rem .75rem; }
  .gita-buy-guide-control { min-height: 40px; }
}

/* Phone/tablet overlays should end immediately after the action row. Do not
   let the flex column expand its footer to the remaining root height. */
@media (max-width: 900px) {
  .gita-buy-guide-dialog {
    display: grid;
    grid-template-rows: auto auto auto;
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    flex: none;
  }
  .gita-buy-guide-viewport {
    grid-row: 2;
    flex: none;
    height: auto !important;
    min-height: 0;
    max-height: none !important;
    aspect-ratio: 1170 / 1480;
  }
  .gita-buy-guide-footer {
    grid-row: 3;
    height: auto !important;
    min-height: 0;
    flex: none;
    padding-bottom: .45rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gita-buy-guide-backdrop, .gita-buy-guide-dialog, .gita-buy-guide-track { animation: none; transition: none; }
}
