.rw-wizard {
    --rw-blue: #147DFB;
    --rw-mid: #3F6EAE;
    --rw-navy: #142B54;
    --rw-muted: #667085;
    --rw-line: #E3E8EF;
    --rw-fill: #F3F7FC;
    --rw-sticky-top: 96px;
    --rw-cookie-h: var(--rihlatk-cookie-h, 0px);
    overflow-anchor: none;
    scroll-margin-top: var(--rw-sticky-top);
    padding-bottom: 12px;
}
.rw-wizard * { box-sizing: border-box; }
.rw-wizard .hidden { display: none !important; }

/* —— Progress —— */
.rw-steps {
    position: relative;
    margin: 0 0 28px;
    padding: 0 2px;
}
.rw-steps__track {
    position: absolute;
    top: 19px;
    left: 12.5%;
    right: 12.5%;
    height: 3px;
    background: #E6ECF4;
    border-radius: 99px;
    z-index: 0;
    overflow: hidden;
    display: block;
}
.rw-steps__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: 0%;
    background: #147DFB;
    border-radius: inherit;
    transition: width 0.4s ease;
}
.rw-steps__list {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}
.rw-steps__list > li {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}
.rw-step-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}
.rw-step-btn[data-step="4"] { cursor: default; }
.rw-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #D5DCE6;
    color: #98A2B3;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(20, 43, 84, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.rw-dot .step-check {
    display: none;
    width: 16px;
    height: 16px;
    color: #fff;
}
.rw-step-btn.is-on .rw-dot {
    border-color: #147DFB;
    color: #147DFB;
    box-shadow: 0 0 0 4px rgba(20, 125, 251, 0.16);
}
.rw-step-btn.is-done .rw-dot {
    background: #147DFB;
    border-color: #147DFB;
    color: #fff;
}
.rw-step-btn.is-done .step-num { display: none; }
.rw-step-btn.is-done .step-check { display: block; }
.rw-step-btn .step-text {
    font-size: 12px;
    font-weight: 800;
    color: #98A2B3;
    letter-spacing: 0;
    line-height: 1.2;
    text-align: center;
}
.rw-step-btn.is-on .step-text { color: #147DFB; }
.rw-step-btn.is-done .step-text { color: #142B54; }

/* —— Search —— */
.rw-search-card {
    background: #fff;
    border: 1px solid var(--rw-line);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
    padding: 22px 20px 20px !important;
}
.rw-search-card > h2 {
    margin: 0 0 16px;
    font-size: 1.25rem;
}
.rw-modes {
    display: flex;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    max-width: 100%;
    margin: 0 0 16px;
    padding: 4px;
    background: var(--rw-fill);
    border: 1px solid var(--rw-line);
    border-radius: 999px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.rw-modes label {
    position: relative;
    flex: 1 1 0;
    margin: 0;
    cursor: pointer;
    min-width: 0;
}
.rw-modes input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.rw-modes input:checked + div {
    background: #147DFB !important;
    color: #fff !important;
    box-shadow: 0 1px 2px rgba(20, 43, 84, 0.08);
}
.rw-modes label > div {
    text-align: center;
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 999px;
}
.rw-search__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.rw-search__route {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}
@media (min-width: 768px) {
    .rw-search__route {
        grid-template-columns: 1fr 44px 1fr;
        align-items: start;
    }
    .rw-search__swap-wrap {
        display: flex;
        justify-content: center;
        align-self: start;
        padding-top: 30px;
        margin: 0;
        grid-column: auto;
    }
}
.rw-search__field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.rw-search__field > span,
.rw-search__field > label,
.rw-search-card .rw-search__lbl {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--rw-muted);
    margin-bottom: 6px;
}
.rw-search-card select,
.rw-search-card input[type="text"],
.rw-search-card input[type="number"],
.rw-search-card input[type="date"],
.rw-search-card input[type="time"] {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--rw-line) !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: var(--rw-navy);
    font-weight: 700;
    font-size: 15px;
}
.rw-search__swap-wrap {
    display: flex;
    justify-content: center;
    margin: -2px 0;
}
.rw-search__swap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--rw-line);
    border-radius: 999px;
    background: #fff;
    color: #147DFB;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
}
.rw-search__swap:hover {
    border-color: #147DFB;
    background: #F3F7FC;
}
.rw-search__swap svg {
    width: 18px;
    height: 18px;
}

/* —— Vehicle cards —— */
.rw-wizard .vcard {
    overflow: hidden;
}
.rw-wizard .vcard-media {
    position: relative;
    overflow: hidden;
    background: #F4F7FB;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rw-wizard .vcard-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    object-position: center;
    border-radius: 0 !important;
    background: transparent !important;
}
.rw-wizard .vcard.selected .vcard-media {
    background: #EAF3FF;
}

@media (min-width: 768px) {
    .rw-wizard .vcard {
        align-items: center !important;
        min-height: 148px;
        padding: 14px 16px !important;
        gap: 18px !important;
    }
    .rw-wizard .vcard-media {
        flex: 0 0 280px;
        width: 280px !important;
        max-width: 280px;
        min-width: 240px;
        height: 158px !important;
        aspect-ratio: auto;
        margin: 0;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 14px;
        align-self: center;
    }
    .rw-wizard .vcard-check {
        top: 14px;
        left: 14px;
        z-index: 2;
        background: #fff;
    }
    .rw-wizard .vcard-info {
        text-align: start !important;
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
    }
    .rw-wizard .vcard-info .flex {
        justify-content: flex-start !important;
    }
    .rw-wizard .vcard-price {
        text-align: start !important;
        margin: 0 !important;
        padding: 0 8px 0 0;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
}

/* —— Summary + CTA —— */
.rw-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.rw-step-foot {
    display: flex;
    justify-content: flex-start;
    padding-top: 16px;
    border-top: 1px solid #F2F4F7;
}
.rw-summary-cta {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    margin-top: 16px;
    padding: 12px 18px;
    border: 0 !important;
    border-radius: 999px !important;
    background: #147DFB !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(20, 125, 251, 0.28);
    appearance: none;
    -webkit-appearance: none;
}
.rw-summary-cta:hover { background: #3F6EAE !important; }
.rw-summary-cta:disabled,
.rw-summary-cta.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}
.rw-summary-cta svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .rw-wizard-layout {
        align-items: stretch;
    }
    .rw-summary-col {
        align-self: stretch;
        width: 20rem;
        flex-shrink: 0;
    }
    .rw-summary-card {
        position: sticky;
        top: var(--rw-sticky-top);
        z-index: 5;
        max-height: calc(100vh - var(--rw-sticky-top) - 16px);
        overflow-y: auto;
    }
}

@media (max-width: 1023px) {
    .rw-wizard {
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-bottom: calc(148px + var(--rw-cookie-h));
    }
    .rw-wizard > h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1.25rem !important;
    }
    .rw-steps {
        margin-bottom: 20px;
    }
    .rw-steps__track {
        top: 16px;
        left: 10%;
        right: 10%;
    }
    .rw-dot {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    .rw-step-btn .step-text {
        font-size: 10px;
        max-width: 72px;
    }
    .rw-search-card,
    .rw-step-content {
        padding: 16px 14px !important;
        border-radius: 18px;
    }
    .rw-search__grid,
    .rw-search__route {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .rw-search__swap-wrap {
        padding-top: 0;
        margin: -2px 0;
    }
    .rw-summary-card > h3 {
        display: none;
    }
    .rw-modes {
        border-radius: 16px;
    }
    .rw-modes label > div {
        padding: 9px 8px;
        font-size: 12px;
    }
    .rw-wizard .vcard {
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    .rw-summary-col {
        position: fixed;
        left: 0;
        right: 0;
        bottom: var(--rw-cookie-h, 0px);
        z-index: 80;
        width: 100% !important;
        padding: 0;
        background: transparent;
    }
    .rw-wizard .rw-summary-col.hidden {
        display: none !important;
    }
    .rw-summary-card {
        border-radius: 20px 20px 0 0 !important;
        border: 1px solid var(--rw-line) !important;
        border-bottom: 0 !important;
        box-shadow: 0 -16px 40px rgba(20, 43, 84, 0.14) !important;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
        max-height: none;
        overflow: visible;
    }
    .rw-summary-extra {
        display: none !important;
    }
    .rw-summary-cta {
        margin-top: 10px;
        min-height: 48px;
    }
}

@media (max-width: 767px) {
    .rw-wizard input:not([type="checkbox"]):not([type="radio"]),
    .rw-wizard select,
    .rw-wizard textarea {
        font-size: 16px !important;
    }
    .rw-wizard .vcard {
        align-items: stretch !important;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 18px;
    }
    .rw-wizard .vcard-check {
        top: 12px;
        left: 12px;
        z-index: 2;
        background: #fff;
        box-shadow: 0 1px 4px rgba(20, 43, 84, 0.12);
    }
    .rw-wizard .vcard-media {
        width: 100% !important;
        max-width: none !important;
        height: 200px !important;
        min-height: 200px;
        aspect-ratio: auto;
        margin: 0;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #F4F7FB !important;
    }
    .rw-wizard .vcard-media--empty svg {
        width: 72px;
        height: 72px;
    }
    .rw-wizard .vcard-info {
        text-align: start !important;
        padding: 14px 16px 4px;
    }
    .rw-wizard .vcard-info h3 {
        font-size: 1.125rem;
        margin-bottom: 8px !important;
    }
    .rw-wizard .vcard-info .flex {
        justify-content: flex-start !important;
    }
    .rw-wizard .vcard-price {
        text-align: start !important;
        margin: 0 !important;
        padding: 6px 16px 16px;
    }
}

/* Shared country phone field (same component as contact + register) */
.rw-wizard .rihlatk-phone {
    min-height: 48px;
    border-radius: 12px;
    background: #fff;
}
.rw-wizard .rihlatk-phone input[data-phone-national],
.rw-wizard .rihlatk-phone input.rihlatk-phone__filter,
.rw-wizard .rihlatk-phone button.rihlatk-phone__cc {
    border: 0 !important;
    box-shadow: none !important;
}
.rw-wizard .rihlatk-phone button.rihlatk-phone__cc {
    border-right: 1px solid #E5E7EB !important;
}
.rw-wizard .rihlatk-phone:focus-within,
.rw-wizard .rihlatk-phone.is-open {
    border-color: #147DFB;
    box-shadow: 0 0 0 4px rgba(20, 125, 251, 0.15);
}
.rw-wizard .rihlatk-phone.is-invalid,
.rw-wizard .rihlatk-phone.is-invalid:focus-within {
    border-color: #F97066;
    box-shadow: 0 0 0 4px rgba(249, 112, 102, 0.12);
}
.rw-wizard .rihlatk-field-msg {
    margin: 6px 0 0;
}

.rw-contact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px 20px;
}
.rw-contact-meta__lbl {
    display: block;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    color: #6B7280;
    line-height: 1.25rem;
    min-height: 1.25rem;
}
.rw-pax-field {
    width: 7.25rem;
    max-width: 100%;
    flex: 0 0 auto;
}
.rw-pax-field input {
    width: 100%;
    text-align: center;
}
.rw-wizard .rw-flight {
    flex: 0 1 16rem;
    min-width: 12.5rem;
    max-width: 22rem;
}
.rw-wizard .rw-flight input[name="flight_number"] {
    width: 13.75rem;
    max-width: 100%;
}
.rw-flight__head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 1.25rem;
    margin-bottom: 8px;
    max-width: 13.75rem;
}
.rw-flight__head .rw-contact-meta__lbl {
    margin: 0;
    min-height: 0;
    flex: 1 1 auto;
}
.rw-flight__iata {
    display: inline-flex;
    align-items: center;
    height: 1.25rem;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #142B54;
    background: #E8F3FF;
    border-radius: 999px;
    padding: 0 8px;
    line-height: 1;
}
.rw-wizard .rw-flight__hint {
    margin: 8px 0 0;
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    line-height: 1.55;
}
.rw-wizard .rw-flight input[dir="ltr"] {
    letter-spacing: 0.04em;
}
.rw-wizard .rw-flight.is-valid input {
    border-color: #12B76A !important;
}
.rw-wizard .rw-flight.is-invalid input {
    border-color: #F97066 !important;
    background-color: #FEF3F2 !important;
}

.rw-pax-roster {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
}
.rw-pax-roster[hidden] {
    display: none !important;
}
.rw-pax-roster__note {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    color: #3F6EAE;
    line-height: 1.65;
}
.rw-pax-roster__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 720px) {
    .rw-pax-roster__grid {
        grid-template-columns: 1fr;
    }
}
