/* Mobile form dialogs: one scrolling surface, visual viewport and safe areas. */
.tn-popup.tn-success #tn-popup-intro{margin-bottom:0}
.tn-popup.tn-success h2{margin-bottom:18px}
@media(max-width:767px){
 html.tp-form-modal-open{overflow:hidden!important;overscroll-behavior:none}
 html.tp-form-modal-open body{position:fixed!important;top:var(--tp-modal-page-top,0px)!important;left:0!important;right:0!important;width:100%!important;overflow:hidden!important}
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal[open]{
  position:fixed!important;inset:auto 8px auto!important;top:calc(var(--tp-modal-vtop,0px) + 8px)!important;
  width:calc(100% - 16px)!important;max-width:none!important;height:auto!important;min-height:0!important;
  max-height:calc(var(--tp-modal-vheight,100dvh) - 16px)!important;margin:0 auto!important;
  padding:20px 16px calc(24px + env(safe-area-inset-bottom))!important;
  box-sizing:border-box!important;overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior:contain;scroll-padding-block:56px 24px;-webkit-overflow-scrolling:touch;
 }
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .tn-trip-form,
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .ts-custom-form-wrap,
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .ts-native-form-slot,
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal #wte_enquiry_form_scroll_wrapper{
  display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
  overflow:visible!important;scrollbar-gutter:auto!important;
 }
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .tn-inquiry-close{
  position:sticky!important;top:0!important;right:auto!important;float:right!important;
  margin:0 0 8px 12px!important;z-index:10;
 }
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .ts-custom-intro{padding-right:0!important}
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .gform_page_footer,
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .gform_footer{position:static!important;bottom:auto!important}
 html body :is(#elementor-popup-modal-12427,#elementor-popup-modal-12428,.elementor-popup-modal).tp-form-modal{
  position:fixed!important;inset:auto 0 auto!important;top:var(--tp-modal-vtop,0px)!important;
  height:var(--tp-modal-vheight,100dvh)!important;max-height:var(--tp-modal-vheight,100dvh)!important;
  padding:8px!important;box-sizing:border-box!important;align-items:center!important;overflow:hidden!important;
 }
 html body :is(#elementor-popup-modal-12427,#elementor-popup-modal-12428,.elementor-popup-modal).tp-form-modal .dialog-widget-content{
  display:flex!important;flex-direction:column!important;min-height:0!important;height:auto!important;
  max-height:calc(var(--tp-modal-vheight,100dvh) - 16px)!important;max-width:100%!important;overflow:hidden!important;
 }
 html body :is(#elementor-popup-modal-12427,#elementor-popup-modal-12428,.elementor-popup-modal).tp-form-modal .dialog-message{
  min-height:0!important;height:auto!important;max-height:calc(var(--tp-modal-vheight,100dvh) - 16px)!important;
  overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;
  scroll-padding-block:56px 24px;-webkit-overflow-scrolling:touch;
  padding-bottom:env(safe-area-inset-bottom)!important;
 }
 html body :is(#elementor-popup-modal-12427,#elementor-popup-modal-12428,.elementor-popup-modal).tp-form-modal .dialog-message :is(.tn-trip-form,.ts-custom-form-wrap){
  height:auto!important;max-height:none!important;overflow:visible!important;
 }
 html body :is(#elementor-popup-modal-12427,#elementor-popup-modal-12428,.elementor-popup-modal).tp-form-modal .dialog-close-button{
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;z-index:10!important;
 }
 body .bwf_pp_overlay.tp-form-modal.show_popup_form{
  position:fixed!important;top:var(--tp-modal-vtop,0px)!important;bottom:auto!important;
  height:var(--tp-modal-vheight,100dvh)!important;padding:8px!important;overflow:hidden!important;
 }
 body .bwf_pp_overlay.tp-form-modal .bwf_pp_wrap{
  max-height:calc(var(--tp-modal-vheight,100dvh) - 16px)!important;min-height:0!important;
  overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  padding-bottom:env(safe-area-inset-bottom)!important;scroll-padding-block:56px 24px;
 }
 .tp-form-modal :is(input,select,textarea){scroll-margin-block:56px 24px}
}

/* Keep the close control above scrolled fields instead of overlapping their text. */
.tp-modal-toolbar{display:contents}
@media(max-width:767px){
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .tp-modal-toolbar{
  position:sticky;top:-20px;z-index:20;display:flex;justify-content:flex-end;
  box-sizing:border-box;min-height:44px;width:calc(100% + 32px);margin:-12px -16px 12px;padding:12px 16px 0;background:#fff;
 }
 html body :is(dialog#tn-inquiry-dialog,dialog.tn-dialog).tp-form-modal .tp-modal-toolbar>.tn-inquiry-close{
  position:static!important;float:none!important;margin:0!important;flex:none;
 }
}

/* Respect Gravity Forms textarea sizes, including in the shared inquiry popup.
   The legacy compact 96px rule must not shrink a Large field. */
html body :is(#gform_wrapper_2,#gform_wrapper_4,#gform_wrapper_5) :is(#gform_2,#gform_4,#gform_5) textarea.small{min-height:6rem!important;min-block-size:6rem!important}
html body :is(#gform_wrapper_2,#gform_wrapper_4,#gform_wrapper_5) :is(#gform_2,#gform_4,#gform_5) textarea.medium{min-height:12rem!important;min-block-size:12rem!important}
html body :is(#gform_wrapper_2,#gform_wrapper_4,#gform_wrapper_5) :is(#gform_2,#gform_4,#gform_5) textarea.large{min-height:18rem!important;min-block-size:18rem!important}

/* Half-height message fields requested for the shared inquiry forms. */
html body :is(#gform_wrapper_2,#gform_wrapper_4,#gform_wrapper_5) :is(#gform_2,#gform_4,#gform_5) textarea:is(#input_2_21,#input_4_21,#input_5_21,#input_4_53,#input_5_53){height:9rem;block-size:9rem;min-height:9rem!important;min-block-size:9rem!important}
