/* V197: remove gesture interception on the application package summary.
   Scrolling on iOS must be owned by the browser / page, not by the card.
   Keep the inline picker / success styles from the proven V196 UI. */
/* V196: vertical touch scroll must work even when the finger starts over a package.
   Prioritize page scroll over horizontal gestures on touch devices. */
@media (pointer: coarse) {
  section.apply[data-apply] [data-apply-package],
  section.apply[data-apply] [data-apply-package] *,
  #pakiety,
  #pakiety [data-package-select],
  #pakiety [data-package-select] *,
  #pakiety [class*="track"],
  #pakiety [class*="slider"],
  #pakiety [class*="scroll"],
  #pakiety [class*="carousel"] {
    touch-action: auto !important;
    overscroll-behavior-y: auto !important;
  }
  section.apply[data-apply],
  section.apply[data-apply] .apply__inner,
  section.apply[data-apply] .apply-form {
    touch-action: auto;
  }
}
section.apply[data-apply] [data-change-package] {
  cursor: pointer;
}

/* V194: avoid duplicated visible package selector under the selected-package card. */
.levelup-v194-package-field[hidden] { display:none !important; }
section.apply[data-apply] .levelup-v194-success-package,
section.apply[data-apply] [data-success-package] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 16px;
  margin: 8px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(201,154,83,.34);
  background: linear-gradient(180deg, rgba(255,248,238,1), rgba(248,239,224,1));
  color: #7a5723;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(94,74,35,.08);
}
section.apply[data-apply] .apply-success [data-success-package] {
  white-space: normal;
}
@media (max-width: 820px) {
  section.apply[data-apply] .levelup-v194-success-package,
  section.apply[data-apply] [data-success-package] {
    width: 100%;
    font-size: 15px;
  }
}


/* V196: reset touch interactions on EVERY ancestor of the package summary.
   In particular, iOS Safari must be able to start a page swipe on the entire card. */
@media (pointer: coarse) {
  html body section.apply[data-apply],
  html body section.apply[data-apply] .apply__inner,
  html body section.apply[data-apply] form[data-apply-form],
  html body section.apply[data-apply] .apply-package[data-apply-package],
  html body section.apply[data-apply] .apply-package[data-apply-package] *,
  html body section.apply[data-apply] .levelup-v196-choices,
  html body section.apply[data-apply] .levelup-v196-choices * {
    touch-action: auto !important;
    }
}

/* No secondary scrollbar: the expanded list is part of the DOCUMENT flow. */
section.apply[data-apply] .levelup-v196-choices[hidden] { display: none !important; }
section.apply[data-apply] .levelup-v196-choices {
  display: block;
  position: static;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: auto;
  touch-action: auto;
  margin: 12px 0 22px;
  padding: clamp(12px, 3.5vw, 20px);
  border-radius: 18px;
  border: 1px solid rgba(191,153,86,.34);
  background: linear-gradient(160deg, #ffffff, #f9f7f3);
  box-shadow: 0 8px 26px rgba(35,35,35,.06);
}
section.apply[data-apply] .levelup-v196-choices__heading {
  margin: 0 0 13px;
  font-size: 15px;
  font-weight: 800;
  color: #24272a;
}
section.apply[data-apply] .levelup-v196-choices__group + .levelup-v196-choices__group { margin-top: 13px; }
section.apply[data-apply] .levelup-v196-choices__group h4 {
  margin: 4px 2px 7px;
  font-size: 12px;
  letter-spacing: .025em;
  font-weight: 800;
  color: #937044;
}
section.apply[data-apply] button.levelup-v196-choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 12px 13px;
  border-radius: 11px;
  border: 1px solid rgba(52,57,62,.12);
  background: #fff;
  color: #24272a;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  touch-action: manipulation;
}
section.apply[data-apply] button.levelup-v196-choice + button.levelup-v196-choice { margin-top: 7px; }
section.apply[data-apply] .levelup-v196-choice__label { flex: 1; font-weight: 650; }
section.apply[data-apply] .levelup-v196-choice__price { flex: none; font-weight: 750; color: #af7d32; white-space: nowrap; }
section.apply[data-apply] button.levelup-v196-choice.is-selected {
  border-color: #c3974e;
  background: #fcf6eb;
}
section.apply[data-apply] button.levelup-v196-choice.is-selected .levelup-v196-choice__label::before {
  content: '✓ '; color: #b18036;
}
section.apply[data-apply] button.levelup-v196-choice:focus-visible {
  outline: 2px solid #a77727;
  outline-offset: 3px;
}
section.apply[data-apply] [data-change-package] {
  touch-action: auto !important;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width:820px) {
  section.apply[data-apply] .levelup-v196-choices { padding: 13px; margin-top: 10px; }
  section.apply[data-apply] button.levelup-v196-choice { min-height: 50px; font-size: 14px; }
}

/* V197: override all touch constraints between iOS viewport and the summary.
   Selected package may be tapped to open choices; dragging scrolls the page. */
@media (pointer: coarse) {
  html:has(section.apply[data-apply]),
  html:has(section.apply[data-apply]) body,
  html:has(section.apply[data-apply]) main,
  html:has(section.apply[data-apply]) section.apply[data-apply],
  section.apply[data-apply] .apply__inner,
  section.apply[data-apply] form[data-apply-form],
  section.apply[data-apply] [data-apply-package],
  section.apply[data-apply] [data-apply-package] *,
  section.apply[data-apply] .levelup-v196-choices,
  section.apply[data-apply] .levelup-v196-choices * {
    touch-action: auto !important;
  }
}
