/* iOS-safe sticky CTA + FAB clearance on /ordenes/ */
.catalog{padding-bottom:160px}
#mobileSelectionBar.mobile-selection-bar{display:none}
#mobileSelectionBar.mobile-selection-bar.active{
  display:flex !important;
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  z-index:10050 !important;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  padding:12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border:1px solid #dce9f4;
  border-radius:20px 20px 0 0;
  background:rgba(255,255,255,.98);
  box-shadow:0 -12px 40px rgba(10,39,68,.22);
  box-sizing:border-box;
}
#mobileSelectionBar.mobile-selection-bar.active .btn{width:100%}
#migo-root .chat-widget{
  position:fixed !important;
  right:max(16px, env(safe-area-inset-right, 0px)) !important;
  bottom:max(16px, env(safe-area-inset-bottom, 0px)) !important;
  z-index:10040 !important;
}
body.mog-mobile-bar-active #migo-root .chat-widget{
  bottom:max(168px, calc(env(safe-area-inset-bottom, 0px) + 156px)) !important;
}

/* RT 2026-09-15 desktop P0: skip Preparando overlay; keep canonical selection+CTA in view */
@media (min-width: 1280px) {
  #deepLinkFallback,
  .deep-link-fallback,
  html.deep-link-pending .deep-link-fallback,
  body.deep-link-pending .deep-link-fallback,
  .deep-link-fallback.is-visible,
  html.deep-link-pending .deep-link-fallback[hidden],
  .deep-link-fallback.is-visible[hidden] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }
  .catalog-shell { overflow: visible; }
  .catalog-shell .detail {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 104px);
    overflow: auto;
    z-index: 8;
    background: linear-gradient(180deg,#fff,#f6faf8);
  }
  .catalog-shell .detail-inner { position: sticky; top: 0; }
}

/* RT P1 2026-09-16 (~18:33 CL): sticky Generar CTA on mobile identity/confirm.
   North star = sticky pack selection. Captcha (.human) stays in document flow ABOVE
   .actions so it can scroll into view above the sticky bar. Does not touch contribution
   modal / Flow aporte path (.contribution-actions). */
@media (max-width: 720px) {
  .drawer.open .drawer-card {
    padding-bottom: 0;
  }
  .drawer.open .drawer-body {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .drawer.open [data-pane="confirm"]:not(.hidden) .actions,
  .drawer.open .pane[data-pane="confirm"]:not(.hidden) .actions {
    position: sticky !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    z-index: 30 !important;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid #dce9f4;
    box-shadow: 0 -12px 40px rgba(10, 39, 68, 0.18) !important;
  }
  .drawer.open [data-pane="confirm"]:not(.hidden) .actions .btn,
  .drawer.open .pane[data-pane="confirm"]:not(.hidden) .actions .btn {
    width: 100%;
  }
  /* Keep captcha reachable above sticky Generar — never cover #fallbackCaptcha / Turnstile */
  .drawer.open [data-pane="confirm"] .human {
    position: relative;
    z-index: 6;
    margin-bottom: 12px;
    scroll-margin-bottom: 120px;
  }
  .drawer.open [data-pane="confirm"] #orderError {
    scroll-margin-bottom: 120px;
  }
}
