.wt-popup {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 100000;
    padding: 40px 20px;
    box-sizing: border-box;
    animation: wt-popup-fadein 0.3s ease-out;
}

.wt-popup.wt-popup--stack-above-backstage {
    z-index: 1000001 !important;
}

.wt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0000006e;
}

.wt-wrapper {
    background: #1D1D1F;
    border-radius: 12px;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    position: relative;
    z-index: 1;
    padding: 30px;
    margin: 0 auto;
    color: #fff;
    box-shadow: 0px 30px 40px #000000;
    box-sizing: border-box;
}

.wt-popup ::-webkit-scrollbar {
    background: transparent;
    width: 8px;
}

.wt-popup ::-webkit-scrollbar-thumb {
    background: var(--event-primary-color, #4323FF);
    border-radius: 5px;
}

.wt-wrapper .cbs-popup-close {
    position: absolute;
    background: #1d1d20;
    width: 40px;
    height: 40px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 5px;
    right: 5px;
    cursor: pointer;
    border: none;
    padding: 0;
    border-radius: 5px;
    font: inherit;
    font-weight: bold;
    z-index: 10;
}

.wt-wrapper .cbs-popup-close:hover {
    color: var(--event-secondary-color, #4FF6B1);
}

.wt-header {
    color: #fff;
    text-align: left;
    margin-bottom: 20px;
    padding-right: 40px;
}

.wt-header h2 {
    font-size: 24px;
    font-family: var(--event-font-family, "DM Sans"), sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 6px;
    color: #fff;
}

.wt-header p {
    font-size: 14px;
    color: #777E90;
    margin: 0;
    line-height: 1.4;
}

.wt-hotel-info {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: transparent;
    border-radius: 8px;
    border: 1px solid var(--event-secondary-color, #4FF6B1);
}

.wt-image {
    flex-shrink: 0;
    width: 88px;
    height: 66px;
    border-radius: 8px;
    overflow: hidden;
}

.wt-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wt-hotel-details {
    flex: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.wt-hotel-details .hotel_name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.wt-room-info {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: #777E90;
    font-style: normal;
}

.wt-room-info strong {
    color: var(--event-secondary-color, #4FF6B1);
    font-weight: 600;
    margin-right: 6px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.room-name-highlight {
    color: #fff;
    font-weight: 500;
}

/* Disclaimer Banner */
.wt-disclaimer {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.wt-disclaimer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #ffc107;
}

/* Form Styling */
.wt-hotel-form-wrapper {
    width: 100%;
}

.wt-form-group {
    margin-bottom: 20px;
}

/* Labels and controls follow the mockup: a muted 13px label over a dark filled box
   with a hairline border. The same values are passed to Skyflow as labelStyles /
   inputStyles in waitlist-popup.js for the hosted card fields, which cannot be
   reached from here — change them together or the two steps drift apart. */
.wt-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 400;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.wt-required {
    color: #ff6b6b;
}

.wt-hotel-form input:not([type="checkbox"]),
.wt-hotel-form select,
.wt-hotel-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 13px 14px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wt-hotel-form input:not([type="checkbox"]),
.wt-hotel-form select {
    height: 46px;
}

.wt-hotel-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    flex-shrink: 0;
    accent-color: var(--event-secondary-color, #4FF6B1);
    cursor: pointer;
}

.wt-hotel-form input:not([type="checkbox"]):focus,
.wt-hotel-form select:focus,
.wt-hotel-form textarea:focus {
    outline: none;
    border-color: #4FF6B1;
    background: rgba(0, 0, 0, 0.35);
}

.wt-hotel-form input::placeholder,
.wt-hotel-form textarea::placeholder {
    color: #777E90;
    opacity: 1;
}

.wt-hotel-form textarea {
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
}

/* The chevron is the accent colour in the mockup. It has to be a literal inside the
   data URI — a CSS variable cannot be read from there — which is the same trade-off
   the checkbox accent-color and the terminal-screen buttons in this file already
   make; #4FF6B1 is what --event-accent-color falls back to. */
.wt-hotel-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234FF6B1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.wt-hotel-form select option {
    background: #1D1D1F;
    color: #fff;
}

/* Layout helpers */
.wt-full {
    width: 100%;
}

.wt-form-group.wt-full {
    clear: both;
}

.wt-half {
    width: calc(50% - 10px);
    float: left;
}

.wt-half.first-half {
    margin-right: 20px;
}

/* Side-by-side fields (dates, rooms/guests) — flex row prevents float collapse when errors grow */
.wt-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    clear: both;
    margin-bottom: 4px;
}

.wt-form-row .wt-form-group.wt-half {
    float: none;
    flex: 1 1 calc(50% - 10px);
    width: auto;
    min-width: 0;
    margin-right: 0;
}

.wt-form-row .wt-form-group.wt-half.first-half {
    margin-right: 0;
}

.wt-form-row .wt-form-group::after {
    display: none;
}

.wt-form-group::after {
    content: "";
    display: table;
    clear: both;
}

.wt-popup .datepicker-component {
    position: relative;
}

/* DatePicker overrides for dark theme inside waitlist modal.
 *
 * !important throughout: DatePicker.css paints the input for the light booking pages
 * (#f9fafb on #d1d5db) and loads after this file.
 *
 * The trailing calendar mark is the mockup's, drawn as a background image because the
 * component renders no icon element of its own and its markup comes from
 * getDatePickerHtml() in waitlist-popup.js — see the select chevron above for why the
 * accent colour is a literal here. */
.wt-popup .datepicker__input,
.wt-popup .datepicker__input[readonly] {
    background-color: rgba(0, 0, 0, 0.28) !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234FF6B1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2'/%3e%3cline x1='16' y1='2' x2='16' y2='6'/%3e%3cline x1='8' y1='2' x2='8' y2='6'/%3e%3cline x1='3' y1='10' x2='21' y2='10'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    padding: 13px 40px 13px 14px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    height: 46px !important;
    -webkit-text-fill-color: #fff !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.wt-popup .datepicker__input:focus,
.wt-popup .datepicker__input:hover {
    border-color: #4FF6B1 !important;
    background-color: rgba(0, 0, 0, 0.35) !important;
}

/* initializeDatePickers() falls back to native date inputs when CustomDatePicker is
   not on the page; those draw their own picker indicator, so drop ours rather than
   stacking two calendar icons. */
.wt-popup .datepicker__input[type="date"] {
    background-image: none !important;
    padding-right: 14px !important;
}

.wt-popup .datepicker__input::placeholder {
    color: #777E90 !important;
    -webkit-text-fill-color: #777E90 !important;
}

/* Ensure datepicker calendar popups appear above the waitlist modal.
 *
 * BS-4081: DatePicker.js relocates the calendar to document.body when it opens
 * (see its openCalendar()), so it leaves .wt-popup and any rule scoped to the modal
 * stops matching. Inside the modal that left the calendar with no surface — the day
 * numbers rendered over the form behind it.
 *
 * The surface colour is hardcoded, deliberately, matching DatePicker.css:67-77 which
 * does the same for every other calendar in the app. An earlier revision used
 * var(--event-surface-secondary-color, #2F2F31) here, which is a trap: because these
 * selectors carry ID specificity they OUTRANK DatePicker.css's hardened rule, so if the
 * token is ever defined-but-empty the declaration becomes invalid at computed-value time
 * and background-color falls back to `transparent` — it does not yield to the rule this
 * one displaced. A themed calendar is not worth reintroducing an invisible one; theme the
 * surface here only once the token is guaranteed non-empty at the point the calendar
 * renders (it is emitted by htms_echo_event_visual_branding_variables(), which does not
 * run on every surface that can open this dialog).
 *
 * .wt-datepicker__popup is carried by the element itself, so it keeps matching after the
 * move to <body> even if the ID scheme changes; the IDs stay for specificity.
 *
 * height: max-content is the real fix for the "calendar has no background" report, which
 * was never a colour problem — the surface was always painted. In this dialog the popup box
 * collapsed to 42px (its padding + border, zero content) while the calendar, a normal
 * in-flow static child 359px tall, overflowed below it via overflow:visible. Only the 42px
 * nav strip had the dark surface; the day grid rendered on the bare modal. DatePicker.css
 * sizes the popup with `height:auto; min-height:fit-content`, and in THIS context (the
 * calendar is first laid out inside a display:none two-step panel) both resolve to the
 * empty box and never recover — a display none→block reflow does not fix it. The explicit
 * intrinsic keyword `height:max-content` forces the engine to measure the children and is
 * the only value that grows the box (verified live: max-content/fit-content → full height,
 * auto/min-height:fit-content/flex/inline-block → stuck at 42px). ID specificity is what
 * lets this beat DatePicker.css's own `height:auto !important`.
 *
 * z-index 1000100 (not 100002): Change Hotel stacks the waitlist dialog at 1000001
 * (.wt-popup--stack-above-backstage), so the relocated calendar must sit above that. */
#wt-checkin-date-calendar,
#wt-checkout-date-calendar,
html body .wt-datepicker__popup,
html body body > .wt-datepicker__popup {
    z-index: 1000100 !important;
    background: #2F2F31 !important;
    background-color: #2F2F31 !important;
    background-image: none !important;
    opacity: 1 !important;
    height: -webkit-max-content !important;
    height: max-content !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45) !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.wt-hotel-form input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.wt-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.wt-submit-btn.cbs-button,
.wt-submit-btn {
    width: auto;
    min-width: 180px;
    background: var(--event-primary-color, #4323FF);
    border: 2px solid var(--event-primary-color, #4323FF);
    border-radius: 8px;
    padding: 12px 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
}

.wt-submit-btn.cbs-button:hover:not(:disabled),
.wt-submit-btn:hover:not(:disabled) {
    background: transparent;
    color: #fff;
    transform: none;
    box-shadow: none;
}

.wt-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state spinner */
.wt-submit-btn:disabled::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: wt-spinner 1s linear infinite;
    margin-left: 8px;
}

/* Error Messages */
.wt-errors {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
}

.wt-error {
    color: #ff6b6b;
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wt-error:last-child {
    margin-bottom: 0;
}

.wt-field-error-message {
    display: block;
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.35;
}

/* Input field error styling */
.wt-form-group input.wt-error,
.wt-form-group textarea.wt-error,
.wt-form-group select.wt-error,
.wt-form-group .datepicker__input.wt-error {
    border: 2px solid #e74c3c !important;
    background: rgba(231, 76, 60, 0.1) !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
    animation: shake 0.5s ease-in-out;
}

.wt-form-group input.wt-error:focus,
.wt-form-group textarea.wt-error:focus,
.wt-form-group select.wt-error:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

.wt-form-group input:not([type="checkbox"]):not(.wt-error):focus,
.wt-form-group textarea:not(.wt-error):focus,
.wt-form-group select:not(.wt-error):focus {
    border-color: #4FF6B1 !important;
    box-shadow: 0 0 0 3px rgba(79, 246, 177, 0.1) !important;
}

/* Success Message */
.wt-success-message {
    text-align: center;
    padding: 40px 20px;
    color: #fff;
}

.wt-success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4FF6B1, #06D77B);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    color: #000;
    margin: 0 auto 20px;
}

.wt-success-message h3 {
    font-size: 24px;
    margin: 0 0 15px 0;
    color: #fff;
}

.wt-success-message p {
    font-size: 16px;
    color: #777E90;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.wt-success-close {
    background: transparent;
    border: 2px solid #4FF6B1;
    color: #4FF6B1;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-success-close:hover {
    background: #4FF6B1;
    color: #000;
}

/* BS-4081: waitlist-limit-reached terminal screen. Same terminal layout as the success
   screen; the icon is a neutral dark disc (not the success green) with a red prohibition
   mark, matching the mockup, and the Close button reuses the event CTA styling. */
.wt-limit-message {
    text-align: center;
    padding: 40px 20px;
    color: #fff;
}

.wt-limit-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.wt-limit-message h3 {
    font-size: 24px;
    margin: 0 0 15px 0;
    color: #fff;
}

.wt-limit-message p {
    font-size: 16px;
    color: #777E90;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.wt-limit-close {
    background: transparent;
    border: 2px solid #4FF6B1;
    color: #4FF6B1;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-limit-close:hover {
    background: #4FF6B1;
    color: #000;
}

/* Terms and Conditions Section */
.wt-terms-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.wt-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.wt-terms-checkbox input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #4FF6B1;
    cursor: pointer;
}

.wt-terms-checkbox label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.4;
    flex: 1;
}

.wt-terms-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    max-height: 120px;
    overflow-y: auto;
}

.wt-terms-text {
    color: #CCCCCC;
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-custom {
    display: none;
}

/* Animations */
@keyframes wt-popup-fadein {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wt-spinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Skyflow Card Fields
 *
 * Height budget: label 22px + input 46px = 68px of visible field, plus 20px for the error line
 * Skyflow renders INSIDE the frame ("Name on Card is required", "Invalid card number") — 4px
 * margin + the 16px line-height pinned in errorStyles in waitlist-popup.js — and 6px of slack.
 * The frame is cross-origin, so its content cannot be measured and the height cannot follow
 * the error appearing: the room has to be reserved up front. At 84px it was not, and every
 * error came out sliced in half through the middle of the text.
 *
 * The reserve is transparent and doubles as the gap between stacked fields, which is why they
 * carry no bottom margin: adding one on top of the reserve would push the fields apart, and a
 * negative one would put the error text under the next field's label. */
.wt-skyflow-field {
    margin-bottom: 0;
    min-height: 94px;
}

.wt-skyflow-field iframe {
    width: 100% !important;
    height: 94px !important;
}

/* ==========================================================================
   BS-4081: request dialog redesign

   Colours come from the event theme tokens emitted by hotelmaster
   (--event-cta-color / --event-surface-* / --event-text-*), never hardcoded.
   The mockup's indigo primary IS the CTA token's default (#4323FF), so an event
   that rebrands its primary colour restyles this dialog with it.

   Fallback chain: --event-cta-color is only emitted on the public booking pages;
   the backstage admin header emits --event-primary-color instead, so each token
   falls back through the other before reaching a literal.
   ========================================================================== */

/* Disclaimer banner: icon + headline + supporting line */
.wt-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wt-disclaimer__icon {
    display: flex;
    flex-shrink: 0;
    margin-top: 1px;
    color: #ffc107;
}

.wt-disclaimer__body strong {
    display: block;
    margin-bottom: 2px;
    color: #ffc107;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* Outranks the legacy `.wt-disclaimer p` colour/size rule above. */
.wt-disclaimer__body p {
    margin: 0;
    color: rgba(255, 193, 7, 0.75);
    font-size: 13px;
    line-height: 1.5;
}

.wt-hotel-subline {
    margin: 6px 0 0;
    color: var(--event-text-secondary-color, #777E90);
    font-size: 13px;
    line-height: 1.4;
}

/* Room/guest stepper: the buttons sit inside the field, so the input reserves room
   for them. tabindex="-1" on the buttons keeps tabbing through the form unchanged. */
.wt-stepper {
    position: relative;
}

.wt-stepper .wt-numeric-input {
    padding-right: 34px;
}

.wt-stepper__buttons {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 28px;
}

.wt-stepper__btn {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--event-text-secondary-color, #777E90);
    cursor: pointer;
    transition: color 0.2s ease;
}

.wt-stepper__btn:hover {
    color: var(--event-text-primary-color, #fff);
}

/* Dialog chrome: the mockup is a compact left-aligned sheet, not the previous
   centred hero. These re-declare earlier rules and rely on source order. */
.wt-wrapper {
    max-width: 560px;
    padding: 24px;
    border-radius: 16px;
    background: var(--event-surface-secondary-color, #23262F);
}

.wt-close {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 10;
}

/* The mockup's close control is a disc with a thin X. It is a real <button> carrying
   its own SVG rather than the dashicons glyph the dialog used to print: the icon font
   is not enqueued on every surface that can open this dialog, and a <span> could not
   be reached by keyboard. */
.wt-close .popup-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--event-text-primary-color, #fff);
    cursor: pointer;
    transition: background 0.2s ease;
}

.wt-close .popup-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.wt-header {
    text-align: left;
    margin-bottom: 16px;
    padding-right: 32px;
}

.wt-header h2 {
    margin-bottom: 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--event-text-primary-color, #fff);
}

.wt-header p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--event-text-secondary-color, #777E90);
}

/* Hotel card: small square thumbnail beside the name, per the mockup */
.wt-hotel-info {
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.wt-image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
}

.wt-hotel-details .hotel_name {
    font-size: 16px;
    line-height: 1.3;
    color: var(--event-text-primary-color, #fff);
}

/* Terms block: the agreement row over a boxed, scrollable copy of the terms, on the
   same panel surface as the card step's. */
.wt-terms-section {
    padding: 16px;
    margin: 4px 0 0;
    border-radius: 12px;
    border-color: var(--event-surface-border-color, rgba(255, 255, 255, 0.1));
    background: rgba(255, 255, 255, 0.03);
}

.wt-terms-checkbox {
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.wt-terms-checkbox label {
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--event-text-primary-color, #fff);
}

.wt-terms-content {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
}

.wt-terms-text {
    color: var(--event-text-secondary-color, #777E90);
    font-size: 13px;
}

.wt-hotel-policies {
    margin: 4px 0 0;
    padding: 16px;
    border: 1px solid var(--event-surface-border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
    text-align: left;
}

.wt-hotel-policies__title {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--event-text-primary-color, #f3f3f4);
}

.wt-hotel-policies__list {
    max-height: 14rem;
    overflow-y: auto;
    margin-bottom: 0.85rem;
    padding-right: 0.25rem;
}

.wt-hotel-policies__item + .wt-hotel-policies__item {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.wt-hotel-policies__item-title {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--event-text-primary-color, #e4e4e7);
}

.wt-hotel-policies__item-body {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--event-text-secondary-color, #c4c4c8);
}

.wt-hotel-policies__item-body p:last-child {
    margin-bottom: 0;
}

.wt-hotel-policies .wt-terms-checkbox {
    margin-bottom: 0;
}

/* Two-step flow: request details, then card pre-authorisation. Panes and their
   action bars are toggled with the `hidden` attribute from goToStep(). */
.wt-step[hidden],
.wt-form-actions[hidden] {
    display: none;
}

.wt-back-btn {
    margin-right: auto;
    padding: 14px 24px;
    border: 1px solid var(--event-surface-border-color, rgba(255, 255, 255, 0.25));
    border-radius: 12px;
    background: transparent;
    color: var(--event-text-primary-color, #fff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-back-btn:hover {
    border-color: var(--event-text-secondary-color, rgba(255, 255, 255, 0.5));
    background: rgba(255, 255, 255, 0.05);
}

/* Same primary treatment as the submit button — it is the step-one CTA. */
.wt-next-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: var(--event-cta-color, var(--event-primary-color, #4323FF));
    color: var(--event-on-cta-color, #fff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-next-btn:hover {
    filter: brightness(0.9);
    box-shadow: 0 8px 25px var(--event-cta-shadow-soft, rgba(67, 35, 255, 0.3));
}

/* Footer actions: secondary Cancel + primary submit, right aligned */
.wt-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Cancel is outlined in the accent colour in the mockup, which is the token the rest
   of the estate reads for that green (see hotelmaster/functions.php). Back keeps the
   neutral outline above: it is a navigation control, not the step's secondary action. */
.wt-cancel-btn {
    padding: 14px 24px;
    border: 1px solid var(--event-accent-color, var(--event-secondary-color, #4FF6B1));
    border-radius: 12px;
    background: transparent;
    color: var(--event-text-primary-color, #fff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-cancel-btn:hover {
    background: rgba(79, 246, 177, 0.08);
}

/* The base .wt-submit-btn is a full-width uppercase gradient CTA. Inside the
   actions row it becomes an inline primary button driven by the CTA token. */
.wt-form-actions .wt-submit-btn {
    width: auto;
    padding: 14px 24px;
    background: var(--event-cta-color, var(--event-primary-color, #4323FF));
    color: var(--event-on-cta-color, #fff);
    font-size: 14px;
    text-transform: none;
    letter-spacing: normal;
}

/* brightness() rather than a darker token: --event-cta-hover is not emitted in
   the backstage admin context, and this needs no second fallback chain. */
.wt-form-actions .wt-submit-btn:hover:not(:disabled) {
    background: var(--event-cta-color, var(--event-primary-color, #4323FF));
    filter: brightness(0.9);
    box-shadow: 0 8px 25px var(--event-cta-shadow-soft, rgba(67, 35, 255, 0.3));
}

/* ==========================================================================
   BS-4081: card step — "Card Details" and "Billing Address" panels.

   Two neutral panels on the dialog surface (the old single green-tinted payment
   box is gone), each with a left-aligned title, and inside them dark filled
   inputs under muted 13px labels. The input/label values are duplicated in
   waitlist-popup.js as Skyflow inputStyles/labelStyles — the card number, name
   and CVV are iframes we can only style through that API — so the two must be
   changed together or the native and hosted fields drift apart.
   ========================================================================== */
.wt-card-panel {
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--event-surface-border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.wt-card-panel:last-child {
    margin-bottom: 0;
}

.wt-card-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wt-card-panel__title {
    margin: 0;
    color: var(--event-text-primary-color, #fff);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.wt-card-panel__note {
    margin: 6px 0 16px;
    color: var(--event-text-secondary-color, #777E90);
    font-size: 13px;
    line-height: 1.5;
}

/* Accepted-card marks: fixed height, natural width, never shrinking the title. */
.wt-card-brands {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.wt-card-brands svg {
    display: block;
    width: auto;
    height: 20px;
}

.wt-billing-panel .wt-card-panel__title {
    margin-bottom: 14px;
}

.wt-card-panel .wt-form-group {
    margin-bottom: 14px;
}

.wt-card-panel .wt-form-row {
    margin-bottom: 0;
    gap: 12px;
}

.wt-card-panel .wt-form-group:last-child,
.wt-card-panel .wt-form-row:last-child .wt-form-group {
    margin-bottom: 0;
}

/* Expiration (native) beside CVV (a Skyflow iframe). Top-aligned so the two
   inputs line up despite the iframe reserving room for its error text below. */
.wt-card-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wt-card-row > * {
    flex: 1 1 0;
    min-width: 0;
}

.wt-card-row .wt-form-group {
    margin-bottom: 6px;
}

/* The iframes reserve 26px under the input for Skyflow's error text (see
   .wt-skyflow-field). On the last row that reserve reads as a lopsided gap before
   the panel edge, so it is pulled back out of the padding — the error still has the
   panel's 18px bottom padding to draw into. */
.wt-card-panel > .wt-card-row:last-child,
.wt-card-panel > .wt-skyflow-field:last-child {
    margin-bottom: -26px;
}

/* The card-on-file toggle sits above the form it hides, so when the stored card is
   reused this row is the whole step — it gets the panel surface of its own rather
   than floating bare on the dialog. */
.wt-card-on-file {
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 1px solid var(--event-surface-border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.wt-card-on-file .wt-terms-checkbox {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wt-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .wt-form-actions .wt-cancel-btn,
    .wt-form-actions .wt-back-btn,
    .wt-form-actions .wt-next-btn,
    .wt-form-actions .wt-submit-btn {
        width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .wt-wrapper {
        margin: 20px;
        padding: 30px 20px 20px;
        max-height: calc(100vh - 40px);
    }

    .wt-header h2 {
        font-size: 28px;
    }

    .wt-hotel-info {
        flex-direction: column;
        gap: 15px;
    }

    .wt-image {
        width: 100%;
        height: 120px;
    }

    .wt-form-row {
        flex-direction: column;
        gap: 0;
    }

    .wt-form-row .wt-form-group.wt-half,
    .wt-half {
        width: 100%;
        float: none;
        flex: 1 1 100%;
    }

    .wt-form-row .wt-form-group.wt-half,
    .wt-half.first-half {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .wt-terms-section {
        padding: 15px;
        margin: 15px 0;
    }

    .wt-card-panel {
        padding: 15px;
    }

    /* The stacked-halves rule above adds 20px; keep the card step on its own
       14px rhythm so the billing rows match the fields around them. */
    .wt-card-panel .wt-form-row .wt-form-group.wt-half {
        margin-bottom: 14px;
    }

    .wt-terms-content {
        max-height: 100px;
    }
}

@media (max-width: 480px) {
    .wt-popup {
        padding: 10px;
    }

    .wt-wrapper {
        border-radius: 12px;
        padding: 24px 16px 16px;
    }

    .wt-header h2 {
        font-size: 24px;
    }

    .wt-close {
        right: 15px;
        top: 15px;
    }

    /* Expiration and CVV stack, and the brand marks drop below the title rather
       than squeezing it. `align-items: stretch` overrides the flex-start used to
       top-align the two side by side — without it the stacked fields shrink to
       their content width instead of filling the panel. */
    .wt-card-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .wt-card-panel__header {
        flex-wrap: wrap;
        gap: 8px;
    }
}
