/* Extend the existing tokens; native containers own insets only when declared. */
:root {
  --tp-shell-safe-left: env(safe-area-inset-left, 0px);
  --tp-shell-safe-right: env(safe-area-inset-right, 0px);
  --tp-keyboard-offset: 0px;
}
html.tp-native-insets {
  --tp-shell-safe-left: 0px;
  --tp-shell-safe-right: 0px;
}
.tp-journey :is(.tp-button, .tp-icon-button, .tp-menu-button, .tp-bottom-nav > a, .tp-bottom-nav > button) {
  transition: transform 120ms ease, opacity 120ms ease;
}
.tp-journey :is(.tp-button, .tp-icon-button, .tp-menu-button, .tp-bottom-nav > a, .tp-bottom-nav > button):active:not(:disabled):not([aria-disabled="true"]) {
  opacity: .76;
}
.tp-journey :is(button, .tp-button):disabled,
.tp-journey .tp-button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.tp-journey :is(button, .tp-button)[aria-busy="true"] { cursor: progress; opacity: .7; }
/* Opaque surfaces avoid compositing a live page through fixed controls. */
.tp-journey :is(.tp-bottom-nav, .tp-destination-sheet__actions) {
  background: var(--tp-surface); backdrop-filter: none;
}
/* The measured request bar already includes its bottom safe-area padding. */
body.tp-journey .tp-experience-detail {
  padding-bottom: calc(var(--tp-experience-request-bar-height, 128px) + 24px);
}
@media (max-width: 1023px) {
  html { scroll-padding-block: calc(64px + var(--tp-shell-safe-top)) calc(var(--tp-bottom-nav-height, 72px) + var(--tp-shell-safe-bottom) + 16px); }
  .tp-journey :is(input, select, textarea) { scroll-margin-block: 16px; }
  /* 16px prevents focus zoom in iOS without restricting user zoom. */
  .tp-journey :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: max(16px, 1em); }
  .tp-journey :is(.tp-drawer__topbar button, .tp-drawer-cover-camera, .tp9-text-action) {
    min-width: 44px !important; min-height: 44px !important;
  }
  .tp-journey .tp-auth-layout { padding-top: var(--tp-unified-header-height); }
  .tp-journey .tp-bottom-nav {
    padding-inline: max(4px, var(--tp-shell-safe-left)) max(4px, var(--tp-shell-safe-right));
  }
  .tp-journey :is(.tp-appbar, .tp-stage4-topbar, .tp-auth-topbar, .tp-comm-titlebar) {
    padding-inline: max(var(--tp-shell-padding-inline), var(--tp-shell-safe-left)) max(var(--tp-shell-padding-inline), var(--tp-shell-safe-right)) !important;
  }
  html.tp-keyboard-open .tp-bottom-nav { visibility: hidden; pointer-events: none; }
  html.tp-keyboard-open :is(.tp-sheet, .tp11-sheet),
  html.tp-keyboard-open #tp-destination-sheet.tp-sheet {
    bottom: var(--tp-keyboard-offset);
    max-height: calc(var(--tp-visible-height, 100dvh) - 16px);
  }
  html.tp-keyboard-open :is(.tp11-filter-sheet, .tp11-language-sheet) { top: auto; }
  html.tp-keyboard-open .tp-experience-request-bar { visibility: hidden; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tp-journey *, .tp-journey *::before, .tp-journey *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto !important; }
}
