/* London Baby 2026 — Card detail modal fixed-exit repair
   Keeps the individual-card X visible in iPhone Safari at every scroll depth. */

body.detail-modal-open {
  overflow: hidden !important;
}

/* Once the detail modal is portaled to body, this is a real viewport overlay. */
body > .detail-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)) !important;
  background: rgba(0,0,0,.62) !important;
  overflow: hidden !important;
  touch-action: none !important;
}

body > .detail-backdrop[hidden] {
  display: none !important;
}

body > .detail-backdrop .detail-sheet {
  position: relative !important;
  width: min(100%, 860px) !important;
  max-height: calc(100dvh - max(18px, env(safe-area-inset-top, 0px)) - max(18px, env(safe-area-inset-bottom, 0px))) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
  background: #fff !important;
  border-radius: 30px !important;
}

/* The close control must not belong to the sheet scroll position. */
body > .detail-backdrop .detail-global-close,
body > .detail-backdrop #closeDetail {
  position: fixed !important;
  top: max(14px, calc(env(safe-area-inset-top, 0px) + 12px)) !important;
  right: max(14px, calc(env(safe-area-inset-right, 0px) + 12px)) !important;
  z-index: 2147483647 !important;
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  min-height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  border: 2px solid rgba(255,255,255,.98) !important;
  background: rgba(255,255,255,.98) !important;
  color: #002d87 !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.38), 0 0 0 1px rgba(0,45,135,.12) !important;
  font-size: 38px !important;
  line-height: .9 !important;
  font-weight: 950 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

body > .detail-backdrop .detail-global-close::before,
body > .detail-backdrop #closeDetail::before {
  content: "" !important;
  position: absolute !important;
  inset: -14px !important;
  border-radius: 999px !important;
}

body > .detail-backdrop .detail-hero h2 {
  right: 24px !important;
}

@media (min-width: 700px) {
  body > .detail-backdrop {
    align-items: center !important;
  }

  body > .detail-backdrop .detail-global-close,
  body > .detail-backdrop #closeDetail {
    top: max(20px, calc(env(safe-area-inset-top, 0px) + 18px)) !important;
    right: max(20px, calc(env(safe-area-inset-right, 0px) + 18px)) !important;
  }
}

/* South Bank + Tate Modern contextual action groups 20260517 */
.detail-action-group {
  width: 100%;
  margin: 0.45rem 0 0.75rem;
}
.detail-action-group-title {
  color: #0b3b8f;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 0.45rem 0.15rem;
}
.detail-action-group-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
@media (max-width: 640px) {
  .detail-action-group-buttons { gap: 0.55rem; }
  .detail-action-group-title { font-size: 0.78rem; }
}
