/* eSIM checkout: the shared saved-passenger picker (base/includes/payment/
   saved_passengers*.html, styled by /static/css/base/payment/saved_passengers.css)
   on the eSIM user cards. Only layout glue lives here; the chips, the popup
   and the "Save this passenger" box keep the tour checkout's look. */

/* Card head: "1. eSIM user" + chips + "Select Passenger" on one line, as on
   the tour; "This eSIM is for me" drops to its own line under it. */
.esim-traveller-head {
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 0;
}
.esim-traveller-head > .esim-traveller-title {
    flex: 0 0 auto;
}
.esim-traveller-head > .saved-pax-inline {
    flex: 1 1 0;
    min-width: 0;
}
.esim-traveller-head > .esim-traveller-self {
    flex: 0 0 100%;
    margin-left: 0 !important;
    padding-left: 0;
}
.esim-traveller-head .saved-pax-chip {
    max-width: 100%;
}
.esim-traveller-head .saved-pax-inline > .btn {
    white-space: nowrap;
}
.esim-traveller .saved-pax-keep {
    padding: 4px 0 0;
}
.esim-traveller .saved-pax-keep .form-check-input {
    float: none;
    margin: 0;
}
.esim-pwa-traveller .saved-pax-keep {
    padding: 2px 0 6px;
}

/* App shell (no Bootstrap JS / modal CSS): the same popup as a bottom sheet. */
.esim-pwa-paxsheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    background: rgba(10, 10, 16, 0.45);
}
.esim-pwa-paxsheet.is-open {
    display: block;
}
body:has(.esim-pwa-paxsheet.is-open) {
    overflow: hidden;
}
body:has(.esim-pwa-paxsheet.is-open) .cookie-alert,
body:has(.esim-pwa-paxsheet.is-open) .woot-widget-bubble,
body:has(.esim-pwa-paxsheet.is-open) .woot-widget-holder,
body:has(.esim-pwa-paxsheet.is-open) .woot--bubble-holder,
body:has(.esim-pwa-paxsheet.is-open) .pwa-back-to-top {
    display: none !important;
}
.esim-pwa-paxsheet .saved-pax-modal {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    opacity: 1;
    pointer-events: none;
}
.esim-pwa-paxsheet .saved-pax-modal .modal-dialog {
    max-width: none;
    margin: 0;
    transform: none;
    pointer-events: none;
}
.esim-pwa-paxsheet .saved-pax-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    max-height: 85dvh;
    border-radius: 20px 20px 0 0;
    background: #fff;
    pointer-events: auto;
}
.esim-pwa-paxsheet .saved-pax-modal .modal-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 14px 14px 0;
}
.esim-pwa-paxsheet .saved-pax-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
}
.esim-pwa-paxsheet .saved-pax-modal .btn-close {
    position: relative;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
}
.esim-pwa-paxsheet .saved-pax-modal .btn-close::before,
.esim-pwa-paxsheet .saved-pax-modal .btn-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #4b5563;
}
.esim-pwa-paxsheet .saved-pax-modal .btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.esim-pwa-paxsheet .saved-pax-modal .btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.esim-pwa-paxsheet .saved-pax-header-add {
    width: 40px;
    height: 40px;
}
.esim-pwa-paxsheet .saved-pax-person {
    min-height: 56px;
}
/* With the "+" hidden on the create view, the close button still sits right. */
.esim-pwa-paxsheet .saved-pax-modal .modal-header .btn-close {
    margin-left: auto;
}
/* "Add New Passenger" form: the app shell's own field look (.esim-pwa-field). */
.esim-pwa-paxsheet .saved-pax-create .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}
.esim-pwa-paxsheet .saved-pax-create .row > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
}
.esim-pwa-paxsheet .saved-pax-create .form-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: #4a4f57;
}
.esim-pwa-paxsheet .saved-pax-create .form-control,
.esim-pwa-paxsheet .saved-pax-create .form-select {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #e3e5ea;
    border-radius: 12px;
    background-color: #fff;
    font-size: 16px;
    color: #1c1c24;
    -webkit-appearance: none;
    appearance: none;
}
.esim-pwa-paxsheet .saved-pax-create .form-control.is-invalid,
.esim-pwa-paxsheet .saved-pax-create .form-select.is-invalid {
    border-color: #dc3545;
}
.esim-pwa-paxsheet .saved-pax-create .invalid-feedback {
    display: none;
    margin-top: 4px;
    font-size: 12px;
    color: #dc3545;
}
.esim-pwa-paxsheet .saved-pax-create .is-invalid ~ .invalid-feedback,
.esim-pwa-paxsheet .saved-pax-create .invalid-feedback.d-block {
    display: block;
}
.esim-pwa-paxsheet .saved-pax-create-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
}
.esim-pwa-paxsheet .saved-pax-create-actions .btn-light {
    border-color: #e3e5ea;
    background: #f3f4f6;
    color: #1c1c24;
}
.esim-pwa-paxsheet .saved-pax-create-actions .btn:disabled {
    opacity: 0.6;
}

/* App shell: no Bootstrap button / spacing utilities there, so the tour's
   outlined small "Select Passenger" button and the head spacing are spelled
   out for the PWA cards. */
.esim-pwa-traveller .esim-traveller-head {
    margin-bottom: 14px;
}
.esim-pwa-traveller .esim-traveller-title {
    font-size: 15px;
    font-weight: 700;
}
.esim-pwa-traveller .saved-pax-inline > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #6c757d;
    border-radius: 8px;
    background: #fff;
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}
.esim-pwa-traveller .saved-pax-inline > .btn:active {
    background: #6c757d;
    color: #fff;
}

/* App shell checkout: the chat bubble (Chatwoot, bottom-left) rides above the
   fixed pay bar instead of covering "amount to pay"; the bar's height comes
   from the page (--esim-paybar-h). The bar then no longer needs the left
   gutter it kept free for the bubble. */
body.esim-pwa-pay-page:has(.esim-pwa-paybar) .woot-widget-bubble,
body.esim-pwa-pay-page:has(.esim-pwa-paybar) .woot--bubble-holder .woot-widget-bubble {
    bottom: calc(var(--esim-paybar-h, 96px) + 12px) !important;
}
.esim-pwa-pay-page .esim-pwa-paybar {
    padding-left: 14px;
}
/* ...and the page ends a bubble's height (64px + gap) higher, so its last
   lines can always be scrolled clear of the bubble. */
.esim-pwa-pay-page .esim-pwa-pay {
    padding-bottom: calc(var(--esim-paybar-h, 96px) + 88px + env(safe-area-inset-bottom));
}
