/* RC114 — checkout mobile: isolated presentation rules, no transaction changes. */
@media (max-width:760px), (max-height:500px) {
  /* Keep the complete booking header and footer inside the dynamic viewport. */
  html body dialog#mr92Booking.mr92-booking {
    inset:0!important; margin:auto!important;
    width:calc(100% - 12px)!important; max-width:940px!important;
    max-height:calc(100vh - 12px)!important;
    max-height:calc(100dvh - 12px)!important;
    overflow:hidden!important; overscroll-behavior:contain;
  }
  html body dialog#mr92Booking.mr92-booking[open] {
    display:flex!important; flex-direction:column!important;
  }
  html body dialog#mr92Booking.mr92-booking:not([open]) {display:none!important}
  html body #mr92Booking.mr92-booking > .mr92-head {
    position:relative!important; top:auto!important; flex:0 0 auto;
    min-height:48px!important; padding:7px 46px 7px 10px!important;
  }
  html body #mr92Booking.mr92-booking .mr92-head > div {min-width:0;overflow-wrap:anywhere}
  html body #mr92Booking.mr92-booking .mr92-head h1 {font-size:16px!important;line-height:1.2!important}
  html body #mr92Booking.mr92-booking .mr92-head .mr92-close {
    width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;
    max-width:38px!important;max-height:38px!important;
    padding:3px 5px 0 0!important;font:700 20px/1 system-ui,sans-serif!important;
    background:#b22424!important;color:#fff!important;text-indent:0!important;text-decoration:none!important;
  }
  html body #mr92Booking.mr92-booking .mr92-head .mr92-close:is(:hover,:focus-visible){background:#951e1e!important}
  html body #mr92Booking.mr92-booking > #mr92CreateForm {
    display:flex!important;flex-direction:column!important;flex:1 1 auto;
    min-height:0!important;min-width:0;overflow:hidden!important;
  }
  html body #mr92Booking.mr92-booking .mr92-body {
    flex:1 1 auto;min-height:0!important;min-width:0;overflow-y:auto!important;
    overflow-x:hidden!important;overscroll-behavior:contain;
    scrollbar-width:thin;scrollbar-color:#7895a3 #edf3f6;
    padding:9px!important;
  }
  html body #mr92Booking.mr92-booking .mr92-body::-webkit-scrollbar{width:6px}
  html body #mr92Booking.mr92-booking .mr92-body::-webkit-scrollbar-thumb{background:#7895a3}
  html body #mr92Booking.mr92-booking .mr92-body::-webkit-scrollbar-track{background:#edf3f6}
  html body #mr92Booking.mr92-booking .mr92-grid,
  html body #mr92Booking.mr92-booking .mr92-fields {grid-template-columns:minmax(0,1fr)!important}
  html body #mr92Booking.mr92-booking .mr92-field input {font-size:16px!important;min-height:40px!important;height:40px!important;max-height:none!important}
  html body #mr92Booking.mr92-booking .mr92-phone input {min-height:40px!important;height:40px!important}
  html body #mr92Booking.mr92-booking .mr92-row > * {min-width:0;overflow-wrap:anywhere}
  html body #mr92Booking.mr92-booking .mr92-foot {
    position:relative!important;bottom:auto!important;flex:0 0 auto;min-width:0;
    display:grid!important;grid-template-columns:minmax(0,1fr);gap:5px!important;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px))!important;
  }
  html body #mr92Booking.mr92-booking .mr92-foot > span {font-size:11px;line-height:1.2;text-align:center}
  html body #mr92Booking.mr92-booking .mr92-actions {
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:stretch!important;gap:5px!important;width:100%;min-width:0;margin:0!important;
  }
  html body #mr92Booking.mr92-booking .mr92-actions > * {min-width:0;max-width:100%;margin:0!important}
  html body #mr92Booking.mr92-booking .mr92-actions > form {grid-column:1/-1;width:100%}
  html body #mr92Booking.mr92-booking .mr92-foot .mr92-btn {
    min-height:38px!important;height:auto!important;max-height:none!important;
    font-size:13px!important;line-height:1.2!important;padding:6px 8px!important;
    white-space:normal!important;overflow-wrap:anywhere;max-width:100%;
  }
  html body #mr92Booking.mr92-booking .mr92-actions .mr92-mp {
    min-height:48px!important;width:100%!important;grid-column:1/-1;
    font-size:15px!important;gap:8px!important;overflow:visible!important;
  }
  html body #mr92Booking.mr92-booking .mr92-mp img {width:70px;max-width:70px;height:auto;max-height:25px;flex:0 0 auto}
  html body #mr92Booking.mr92-booking[data-mr92-stage=create] .mr92-actions {grid-template-columns:minmax(0,.65fr) minmax(0,1.65fr)}
  html body #mr92Booking.mr92-booking[data-mr92-stage=create] .mr92-actions .mr92-mp {grid-column:auto}
  html body #mr92Booking.mr92-booking[data-mr92-stage=create] .mr92-actions > .mr92-btn {min-height:48px!important}
  html body #mr92Booking.mr92-booking[data-mr92-stage=ready] .mr92-foot > a,
  html body #mr92Booking.mr92-booking[data-mr92-stage=ready] .mr92-actions > a {width:100%;grid-column:1/-1}
  html body #mr92Booking.mr92-booking .mr92-timer {justify-content:center;flex-wrap:wrap;white-space:normal}
  html body #mr92Booking.mr92-booking .mr92-info {grid-template-columns:repeat(2,minmax(0,1fr))}
  html body #mr92Booking.mr92-booking .mr92-alert[hidden] {display:none!important}
  /* Payment resumption links in private reservation and guide subscriptions. */
  html body :is(.fo-ticket-actions,.excursionista-shell) .fo-mp-pay-btn {
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;
    min-width:0!important;min-height:48px!important;height:auto!important;
    grid-template-columns:minmax(0,32%) minmax(0,1fr)!important;
    border-radius:3px!important;box-shadow:none!important;transform:none!important;
  }
  html body :is(.fo-ticket-actions,.excursionista-shell) .fo-mp-pay-btn :is(.fo-mp-pay-logo,.fo-mp-pay-text) {
    min-width:0;min-height:48px!important;height:auto!important;padding:5px 7px!important;
  }
  html body :is(.fo-ticket-actions,.excursionista-shell) .fo-mp-pay-btn .fo-mp-pay-text {font-size:14px!important;line-height:1.2!important;overflow-wrap:anywhere;white-space:normal!important}
  html body :is(.fo-ticket-actions,.excursionista-shell) .fo-mp-pay-logo img {max-width:100%;height:auto;object-fit:contain}
  html body .fo-ticket-actions > form {min-width:0;width:100%;max-width:100%}
  html body .fo-ticket-actions {display:grid;grid-template-columns:minmax(0,1fr)}
  /* Advertising gateway (existing open/closed state and checkout link preserved). */
  html body.mr-advertiser-panel .anunciante-shell #payModal {box-sizing:border-box;padding:6px!important}
  html body.mr-advertiser-panel .anunciante-shell #payModal .advw-paydialog {
    box-sizing:border-box;width:min(520px,100%)!important;max-width:100%!important;
    max-height:calc(100vh - 12px)!important;max-height:calc(100dvh - 12px)!important;
    overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#7895a3 #edf3f6;
  }
  html body.mr-advertiser-panel .anunciante-shell #payModal .advw-modalhead {padding:8px 46px 8px 10px!important;min-height:48px;overflow-wrap:anywhere}
  html body.mr-advertiser-panel #payModal .advw-paydialog #closePayModal {
    width:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important;
    min-width:38px!important;max-width:38px!important;box-sizing:border-box!important;
    padding:3px 5px 0 0!important;display:flex!important;align-items:flex-start!important;justify-content:flex-end!important;
    background:#b22424!important;color:#fff!important;font:700 20px/1 system-ui,sans-serif!important;
  }
  html body.mr-advertiser-panel .anunciante-shell #payModal .advw-paybox {padding:10px!important;min-width:0;overflow-wrap:anywhere}
  html body.mr-advertiser-panel .anunciante-shell #payModal #goMercadoPago {
    box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
    min-height:48px!important;height:auto!important;padding:7px 8px!important;gap:8px!important;
    font-size:14px!important;white-space:normal!important;line-height:1.2!important;
  }
  html body.mr-advertiser-panel .anunciante-shell #payModal #goMercadoPago img {width:72px;height:auto;max-height:27px;object-fit:contain;flex:none}
  html body.mr-advertiser-panel .anunciante-shell #payModal #goMercadoPago span {min-width:0;overflow-wrap:anywhere}
  html body.mr-advertiser-panel .anunciante-shell #payModal .advw-paytotal {flex-wrap:wrap;gap:5px;overflow-wrap:anywhere}
  html body.mr-advertiser-panel .anunciante-shell .mr95-choice-actions {display:flex;flex-wrap:wrap;gap:6px}
  html body.mr-advertiser-panel .anunciante-shell .mr95-choice-actions > a {max-width:100%;min-width:0;white-space:normal!important;overflow-wrap:anywhere;text-align:center}
  html body .excursionista-shell #mrExcContractForm > button {width:100%;max-width:100%;min-height:48px!important;white-space:normal!important;overflow-wrap:anywhere;text-align:center}
}
@media (max-width:420px) {
  html body #mr92Booking.mr92-booking[data-mr92-stage=create] .mr92-actions {grid-template-columns:minmax(0,1fr)}
  html body #mr92Booking.mr92-booking[data-mr92-stage=create] .mr92-actions > .mr92-btn:not(.mr92-mp) {min-height:34px!important}
  html body #mr92Booking.mr92-booking .mr92-info {grid-template-columns:minmax(0,1fr)}
  html body .excursionista-shell .mr99-config .mr-exc-quote {grid-template-columns:minmax(0,1fr)!important}
  html body.mr-advertiser-panel .anunciante-shell .mr95-choice-actions > a {width:100%}
}
/* Very short landscape/keyboard view: allow the whole dialog to scroll rather than hiding controls. */
@media (max-height:340px) {
  html body dialog#mr92Booking.mr92-booking[open] {display:block!important;overflow-y:auto!important}
  html body #mr92Booking.mr92-booking > #mr92CreateForm {display:block!important;overflow:visible!important}
  html body #mr92Booking.mr92-booking .mr92-body {overflow:visible!important}
  html body #mr92Booking.mr92-booking > .mr92-head {position:sticky!important;top:0!important}
}

/* Legacy administrative advertising payment dialog: same mobile fit, no change to its flow. */
@media (max-width:760px), (max-height:500px) {
  html body #adwPayModal {padding:6px!important;box-sizing:border-box!important}
  html body #adwPayModal .adw-pay-modal-dialog {
    width:min(520px,100%)!important;max-width:100%!important;
    max-height:calc(100vh - 12px)!important;max-height:calc(100dvh - 12px)!important;
    box-sizing:border-box;overflow:auto!important;border-radius:3px!important;
    scrollbar-width:thin;scrollbar-color:#7895a3 #edf3f6;
  }
  html body #adwPayModal .adw-pay-modal-head {padding:8px 46px 8px 10px!important;gap:8px;flex-direction:row!important;align-items:center!important}
  html body #adwPayModal .adw-pay-modal-head img {max-width:84px;height:auto;object-fit:contain;flex:none}
  html body #adwPayModal #adwPayModalClose {
    top:0!important;right:0!important;left:auto!important;bottom:auto!important;
    width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;
    max-width:38px!important;max-height:38px!important;box-sizing:border-box!important;
    display:flex!important;align-items:flex-start!important;justify-content:flex-end!important;
    padding:3px 5px 0 0!important;margin:0!important;border:0!important;border-radius:0!important;
    background:#b22424!important;color:white!important;font:700 20px/1 system-ui,sans-serif!important;
    clip-path:polygon(0 0,100% 0,100% 100%);box-shadow:none!important;transform:none!important;
  }
  html body #adwPayModal .adw-pay-modal-body {padding:9px!important;overflow-wrap:anywhere}
  html body #adwPayModal .adw-pay-modal-summary {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px}
  html body #adwPayModal .adw-pay-modal-summary > div {min-width:0;padding:6px}
  html body #adwPayModal #adwPayModalGo {box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px!important;height:auto!important;padding:7px 8px!important;border-radius:3px!important;white-space:normal!important;text-align:center;gap:6px}
  html body #adwPayModal #adwPayModalGo img {width:72px;height:auto;max-height:26px;flex:none;object-fit:contain}
  html body #adwPayModal #adwPayModalGo span {min-width:0;overflow-wrap:anywhere;font-size:13px;line-height:1.2}
}
