/* Shared guardrails for narrow screens and touch input. */
:root{--alert-blue:#597f97;--alert-ink:#183251;--alert-muted:#697985;--alert-border:#e3e9ee;--alert-danger:#a5464c}
*,*::before,*::after{box-sizing:border-box}
html{width:100%;overflow-x:clip;-webkit-text-size-adjust:100%}
body{width:100%;min-width:320px;max-width:100%;overflow-x:clip}
img,svg,video,canvas{max-width:100%;height:auto}
input,select,textarea,button{max-width:100%;font:inherit}
button,a,[role=button]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
main,.admin-main,.customer-content,.admin-card,.customer-booking-card,.customer-placeholder,.payment-card,.flight-card{min-width:0;max-width:100%}
.table-wrap{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.table-wrap table{min-width:620px}
td,th,p,small,strong,a,label{overflow-wrap:break-word;word-break:normal}
.alert,.admin-alert,.customer-notice{max-width:100%;overflow-wrap:anywhere}
.swal2-container{padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))!important}
.swal2-popup{width:min(32em,calc(100vw - 24px))!important;max-width:100%;border-radius:16px!important;font-size:1rem!important}
.swal2-title{font-size:clamp(1.2rem,5vw,1.6rem)!important;overflow-wrap:anywhere}
.swal2-html-container{overflow-wrap:anywhere;white-space:pre-line}
.swal2-actions{width:100%;gap:10px}
.swal2-actions button{min-height:46px;min-width:min(120px,40%);max-width:100%;margin:0!important;touch-action:manipulation}
.swal2-styled.swal2-confirm{border:1px solid var(--alert-blue)!important;border-radius:8px!important;background:var(--alert-blue)!important;color:#fff!important;box-shadow:none!important}
.swal2-styled.swal2-confirm:hover{border-color:var(--alert-ink)!important;background:var(--alert-ink)!important}
.swal2-styled.swal2-cancel{border:1px solid var(--alert-border)!important;border-radius:8px!important;background:#edf3f6!important;color:var(--alert-ink)!important;box-shadow:none!important}
.swal2-styled.swal2-cancel:hover{border-color:#c4d0d9!important;background:#dfe8ee!important}
.swal2-styled.swal2-deny{border:1px solid var(--alert-danger)!important;border-radius:8px!important;background:var(--alert-danger)!important;color:#fff!important;box-shadow:none!important}
.swal2-styled.swal2-deny:hover{border-color:#85383e!important;background:#85383e!important}
.swal2-styled:focus-visible{outline:3px solid rgb(89 127 151 / 32%)!important;outline-offset:2px!important;box-shadow:none!important}
.swal2-close:hover{color:var(--alert-blue)!important}
.swal2-input:focus,.swal2-textarea:focus,.swal2-select:focus{border-color:var(--alert-blue)!important;box-shadow:0 0 0 3px rgb(89 127 151 / 17%)!important}
@media(max-width:600px){
  .swal2-popup{padding:1.1em .9em!important}
  .swal2-actions{flex-wrap:wrap}
  .swal2-actions button{flex:1 1 120px}
  input,select,textarea,button{font-size:16px}
  .table-wrap{border-radius:8px}
}
@media(max-width:360px){
  .swal2-actions button{flex-basis:100%;width:100%}
}

:where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid rgb(89 127 151 / 42%);outline-offset:2px}
:where(.admin-button,.small-button,.booking-button,.seat-button,.payment-button,.customer-primary,.ticket-print-button):focus-visible{outline-color:rgb(24 50 81 / 45%)}

/* Shared toast grid keeps long messages clear of the icon and close button. */
.swal2-popup.swal2-toast.aerobook-toast{width:100%!important;max-width:440px;min-width:0;display:grid!important;grid-template-columns:2em minmax(0,1fr) 44px;column-gap:10px;row-gap:4px;padding:14px!important;color:var(--alert-ink);font-family:inherit;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow:hidden}
.swal2-popup.swal2-toast.aerobook-toast .swal2-icon{grid-column:1;grid-row:1/3;align-self:start;margin:5px 0 0!important;flex-shrink:0}
.swal2-popup.swal2-toast.aerobook-toast .swal2-title{grid-column:2;grid-row:1;min-width:0;margin:0!important;padding:4px 0 0;font-size:1rem!important;line-height:1.4;font-weight:750;white-space:normal;overflow-wrap:anywhere;text-align:left}
.swal2-popup.swal2-toast.aerobook-toast .swal2-html-container{grid-column:2;grid-row:2;min-width:0;max-width:100%;max-height:min(35vh,240px);margin:0!important;padding:0 0 4px;overflow:auto;overscroll-behavior:contain;white-space:pre-line;overflow-wrap:anywhere;word-break:normal;font-size:.88rem;line-height:1.5;text-align:left}
.swal2-popup.swal2-toast.aerobook-toast .swal2-close{grid-column:3;grid-row:1/3;align-self:start;justify-self:end;width:44px;height:44px;min-width:44px;min-height:44px;margin:0!important;padding:0;font-size:1.7rem;line-height:1;touch-action:manipulation}
.swal2-popup.swal2-toast.aerobook-toast .swal2-close:focus-visible{outline:2px solid var(--alert-blue);outline-offset:-3px}
@media(max-width:600px){
  .swal2-popup.swal2-toast.aerobook-toast{max-width:none;grid-template-columns:2em minmax(0,1fr) 44px;column-gap:8px;margin:0!important;padding:12px!important}
  .swal2-popup.swal2-toast.aerobook-toast .swal2-title{font-size:.92rem!important}
  .swal2-popup.swal2-toast.aerobook-toast .swal2-html-container{font-size:.84rem}
}
@media print{.swal2-container{display:none!important}}

/* Override SweetAlert's centered-toast transform as well as its fixed width. */
body .swal2-container.aerobook-toast-container{position:fixed!important;inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) auto auto!important;width:min(440px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;min-width:0;margin:0!important;padding:0!important;transform:none!important;display:flex!important;align-items:flex-start!important;justify-content:flex-end!important;z-index:1100;box-sizing:border-box;pointer-events:none}
body .swal2-container.aerobook-toast-container .aerobook-toast{box-sizing:border-box;width:100%!important;max-width:100%!important;margin:0!important;border:1px solid var(--alert-border);border-radius:12px!important;background:#fff;box-shadow:0 8px 24px rgb(24 50 81 / 18%)!important;pointer-events:auto;overflow-x:hidden;overflow-y:auto}
.swal2-popup.swal2-toast.aerobook-toast .swal2-timer-progress-bar{background:var(--alert-blue)!important}
.swal2-popup.swal2-toast.aerobook-toast .swal2-close{color:var(--alert-muted)}
@media(max-width:820px){
  body .swal2-container.aerobook-toast-container{inset:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) auto max(10px,env(safe-area-inset-left))!important;width:auto!important;max-width:none!important;transform:none!important;justify-content:center!important}
  body .swal2-container.aerobook-toast-container .aerobook-toast{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:12px!important;grid-template-columns:32px minmax(0,1fr) 44px;gap:6px 8px}
  .swal2-popup.swal2-toast.aerobook-toast .swal2-icon{grid-row:1;width:2em;height:2em}
  .swal2-popup.swal2-toast.aerobook-toast .swal2-close{grid-row:1}
  .swal2-popup.swal2-toast.aerobook-toast .swal2-title{align-self:center;padding:0;font-size:.92rem!important;max-height:25vh;overflow:auto}
  .swal2-popup.swal2-toast.aerobook-toast .swal2-html-container{grid-column:1/-1;grid-row:2;padding:0 0 4px;font-size:.86rem;max-height:45vh;max-height:45dvh}
}
@media(max-width:360px){body .swal2-container.aerobook-toast-container .aerobook-toast{padding:10px!important;column-gap:6px}.swal2-popup.swal2-toast.aerobook-toast .swal2-title{font-size:.88rem!important}}
@media print{body .swal2-container.aerobook-toast-container{display:none!important}}

/* Keep form text large enough to avoid automatic focus zoom on mobile. */
@media(max-width:820px){body :is(.customer-app,.admin-shell,.auth-card) :is(.auth-form,.flight-search-form,.booking-form,.payment-form,.seat-selection-form,.admin-form,.inline-form,.review-actions,.table-wrap) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px}}

/* Give phone-sized form controls one shared box model, regardless of native
   select sizing, long option text, or page-specific desktop minimum widths. */
@media screen and (max-width:600px){
  body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]),select,textarea):not([hidden]){
    box-sizing:border-box;
    display:block;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:44px;
    margin:0!important;
    padding:10px 36px 10px 12px;
    font-size:16px;
    line-height:1.4;
  }
  body :is(form,.table-wrap,.admin-table-toolbar,.admin-pagination,.dashboard-trend-filter) select:not([multiple]){
    appearance:none;
    -webkit-appearance:none;
    background-image:linear-gradient(45deg,transparent 50%,#466078 50%),linear-gradient(135deg,#466078 50%,transparent 50%);
    background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;
    background-size:5px 5px;
    background-repeat:no-repeat;
    text-overflow:ellipsis;
    white-space:nowrap;
    overflow:hidden;
  }
  body :is(form,.table-wrap,.admin-table-toolbar,.admin-pagination,.dashboard-trend-filter) :is(label,fieldset){min-width:0;max-width:100%}
  body :is(.flight-search-form,.admin-form,.passenger-fields,.payment-form){grid-template-columns:minmax(0,1fr)}
  body .admin-table-toolbar>label{flex:1 1 100%;min-width:0}
  body :is(.inline-form,.admin-pagination label){flex-direction:column;align-items:stretch;width:100%;min-width:0;gap:8px}
  body .inline-form select{flex:none}
  body .passenger-count-label{width:100%;max-width:none}
  body .dashboard-trend-filter{display:grid;width:100%;min-width:0;gap:6px}
}

/* Customer phone forms: remove remaining wrapper caps and use identical
   control dimensions even when a module loads its own stylesheet later. */
@media screen and (max-width:600px){
  body .customer-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=range]):not([type=color]):not([type=image]),select,textarea):not([hidden]){
    box-sizing:border-box;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:10px 36px 10px 12px!important;
    font-size:16px!important;
    line-height:1.4!important;
  }
  body .customer-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=range]):not([type=color]):not([type=image]),select):not([hidden]){min-height:48px;height:48px}
  body .customer-content :is(form,fieldset,label,.seat-selection-form>section,.seat-passenger-list,.seat-passenger-row>span,.aircraft-map){min-width:0;max-width:100%}
  body .customer-content :is(.passenger-count-label,.active-passenger-label){width:100%;max-width:none}
  body .customer-content :is(.flight-search-form,.passenger-fields,.payment-form,.seat-passenger-row){grid-template-columns:minmax(0,1fr);gap:12px}
  body .customer-content :is(.seat-selection-form,.seat-passenger-list){grid-template-columns:minmax(0,1fr)}
}
