/* api-rez-compact.css — wyszukiwarka promowa (TomSelect + Flatpickr) */

.api-rez {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
    box-sizing: border-box;
}

.api-rez *, .api-rez *::before, .api-rez *::after {
    box-sizing: inherit;
}

/* ═══════════════════════════════════════════
   ZAKŁADKI (tabs) — styl jak na promy-retravel
   ═══════════════════════════════════════════ */
.api-rez-tabs {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.api-rez-tabs-group {
    display: flex;
    gap: 0;
}

.api-rez-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    margin: 0;
    user-select: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.api-rez-tab:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.api-rez-tab:last-child {
    border-radius: 0 8px 8px 0;
}

.api-rez-tab input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.api-rez-tab span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.api-rez-tab.is-active {
    background: linear-gradient(135deg, #4a7ae8, #1a56db);
    border-color: #3264d6;
    color: #fff;
    font-weight: 600;
}

.api-rez-tab:hover:not(.is-active) {
    background: #eef2f7;
    color: #334155;
}

/* ═══════════════════════════════════════════
   IKONY
   ═══════════════════════════════════════════ */
.api-rez-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    vertical-align: middle;
}

.api-rez-icon-oneway {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3'/%3E%3C/svg%3E");
}

.api-rez-icon-return {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5'/%3E%3C/svg%3E");
}

.api-rez-icon-car {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm10 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3Cpath d='M5 15V11a1 1 0 0 1 1-1h1.5l1.2-2.4A1.5 1.5 0 0 1 10.04 7h3.92a1.5 1.5 0 0 1 1.34.6L17.5 10H19a1 1 0 0 1 1 1v4'/%3E%3Cpath d='M9 15h6M5 15h-.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H5m14 2h.5a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5H19'/%3E%3C/svg%3E");
}

.api-rez-icon-walk {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════
   POLA — 1 wiersz (jedna strona) / 2 wiersze (obie strony)
   Obie strony: siatka — kierunek = wyjazd+godzina, trasa = reszta wiersza
   ═══════════════════════════════════════════ */
.api-rez-compact,
.api-rez-compact .api-rez-fields,
.api-rez-compact .api-rez-fields-row,
.api-rez-compact .api-rez-field-country,
.api-rez-compact .api-rez-field-route {
    overflow: visible;
}

.api-rez-compact .ts-wrapper {
    position: relative;
    overflow: visible;
}

.api-rez-compact .ts-dropdown {
    width: 100%;
    min-width: 0;
    left: 0;
    right: auto;
}

.api-rez-compact,
.api-rez-compact .api-rez-search-form {
    max-width: 100%;
}

.api-rez-compact [hidden] {
    display: none !important;
}

.api-rez-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.api-rez-fields.is-roundtrip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 10px;
    align-items: end;
}

.api-rez-fields.is-roundtrip .api-rez-fields-row {
    display: contents;
}

.api-rez-fields.is-roundtrip .api-rez-field-country {
    grid-column: 1;
    grid-row: 1;
}

.api-rez-fields.is-roundtrip .api-rez-field-route {
    grid-column: 2 / -1;
    grid-row: 1;
}

.api-rez-fields.is-roundtrip .api-rez-outbound-fields {
    grid-column: 1;
    grid-row: 2;
}

.api-rez-fields.is-roundtrip .api-rez-return-fields {
    grid-column: 2;
    grid-row: 2;
}

.api-rez-fields.is-roundtrip:not(.is-search-ready) .api-rez-fields-row--actions {
    display: contents;
}

.api-rez-fields.is-roundtrip:not(.is-search-ready) .api-rez-field-btn {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
    margin-top: 1rem;
}

/* Gotowe do szukania — wszystkie pola w jednym wierszu, przycisk osobno pod spodem */
.api-rez-fields.is-search-ready {
    row-gap: 1.5rem;
    column-gap: 10px;
}

.api-rez-fields.is-search-ready .api-rez-fields-row--actions {
    flex: 1 1 100%;
    width: 100%;
    display: flex;
    padding-top: 0;
    margin-top: 0;
}

.api-rez-fields.is-roundtrip.is-search-ready {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 10px;
    row-gap: 1.5rem;
    align-items: end;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-fields-row {
    display: contents;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-field-country {
    grid-column: 1;
    grid-row: 1;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-field-route {
    grid-column: 2 / -1;
    grid-row: 1;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-outbound-fields {
    grid-column: 1;
    grid-row: 2;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-return-fields {
    grid-column: 2;
    grid-row: 2;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-field-pax {
    grid-column: 1;
    grid-row: 3;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-pax-qty {
    width: 100%;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-pax-input {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-fields-row--actions {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    width: 100%;
    min-width: 0;
}

.api-rez-fields.is-roundtrip.is-search-ready .api-rez-field-btn {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
}

.api-rez-fields.is-roundtrip .api-rez-field-country,
.api-rez-fields.is-roundtrip .api-rez-field-route {
    overflow: visible;
    min-width: 0;
}

.api-rez-fields.is-roundtrip .api-rez-field-country .ts-wrapper,
.api-rez-fields.is-roundtrip .api-rez-field-route .ts-wrapper {
    width: 100%;
    max-width: 100%;
}

.api-rez-fields-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
}

.api-rez-fields-row--bottom {
    justify-content: flex-start;
}

.api-rez-fields-row--actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: flex-end;
    width: 100%;
}

.api-rez-fields:not(.is-roundtrip):not(.is-search-ready) .api-rez-fields-row--actions {
    display: contents;
}

.api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-field-btn {
    flex: 1 1 auto;
    width: 100%;
}

.api-rez-outbound-fields,
.api-rez-return-fields {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    min-width: 0;
}

.api-rez-fields.is-roundtrip .api-rez-outbound-fields .api-rez-field,
.api-rez-fields.is-roundtrip .api-rez-return-fields .api-rez-field {
    flex: 1 1 0;
    min-width: 0;
}

.api-rez-fields.is-roundtrip .api-rez-outbound-fields .api-rez-field-hour,
.api-rez-fields.is-roundtrip .api-rez-return-fields .api-rez-field-hour {
    min-width: 0;
}

/* Roundtrip + wybór trasy powrotu — układ pionowy (bez ściskania w jednej kolumnie) */
.api-rez-fields.is-roundtrip.has-return-route-choice {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-fields-row {
    display: flex;
    width: 100%;
    min-width: 0;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-fields-row--top {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-fields-row--top .api-rez-field-country {
    flex: 1 1 140px;
    min-width: 0;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-fields-row--top .api-rez-field-route {
    flex: 2 1 220px;
    min-width: 0;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-fields-row--bottom {
    flex-direction: column;
    gap: 12px;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-outbound-fields,
.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-return-fields {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-field-return-route {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-outbound-fields .api-rez-field,
.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-return-fields .api-rez-field {
    flex: 1 1 0;
    min-width: 0;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-fields-row--actions {
    display: flex;
    width: 100%;
    justify-content: stretch;
    align-items: stretch;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-field-btn {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    margin-top: 1rem;
}

.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-field-btn .api-rez-compact-cta,
.api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-field-btn .rs-cta {
    width: 100%;
}

.api-rez-fields.is-roundtrip.has-return-route-choice.is-search-ready {
    display: flex;
    flex-direction: column;
    gap: 12px;
    row-gap: 1.25rem;
}

.api-rez-fields.is-roundtrip.has-return-route-choice.is-search-ready .api-rez-fields-row--actions {
    display: flex;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    justify-content: stretch;
    align-items: stretch;
}

.api-rez-fields.is-roundtrip.has-return-route-choice.is-search-ready .api-rez-field-pax {
    width: 100%;
    max-width: none;
}

.api-rez-fields.is-roundtrip.has-return-route-choice.is-search-ready .api-rez-field-btn {
    width: 100%;
    max-width: none;
    margin-top: 0;
}

.api-rez-field-return-route {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}

.api-rez-fields:not(.is-roundtrip) .api-rez-outbound-fields {
    display: contents;
}

.api-rez-return-fields {
    flex: 0 1 auto;
}

/* W jedną stronę — wszystko w jednym rzędzie (do momentu pokazania pasażerów) */
.api-rez-fields:not(.is-roundtrip) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
}

.api-rez-fields:not(.is-roundtrip).is-search-ready {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    row-gap: 1.5rem;
    column-gap: 10px;
}

.api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--top,
.api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--bottom {
    display: contents;
}

.api-rez-fields:not(.is-roundtrip) .api-rez-fields-row {
    display: contents;
}

.api-rez-field {
    min-width: 0;
}

.api-rez-field-route {
    flex: 2 1 0;
}

.api-rez-field-country {
    flex: 0.9 1 0;
}

.api-rez-field-date {
    flex: 1 1 0;
}

.api-rez-field-hour {
    flex: 0.85 1 0;
    min-width: 108px;
}

.api-rez-field-return-hour {
    min-width: 118px;
}

.api-rez-field-pax {
    flex: 0.7 1 0;
    min-width: 110px;
}

.api-rez-fields:not(.is-roundtrip):not(.is-search-ready) .api-rez-field-btn {
    flex: 0 0 auto;
}

.api-rez-field-btn {
    flex: 0 0 auto;
}

/* ── Etykiety ── */
.api-rez-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.api-rez-field label:has(.api-rez-label-ico) {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.api-rez-label-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0.65;
}

.api-rez-label-ico--ferry {
    width: 0.92rem;
    height: 0.92rem;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: url('ico-ferry-p-4.svg') center / contain no-repeat;
    mask: url('ico-ferry-p-4.svg') center / contain no-repeat;
    transform: scaleX(-1);
}

/* ── Inputs ── */
.api-rez-input,
.api-rez-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b9b9b9;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 46px;
    appearance: none;
    -webkit-appearance: none;
}

.api-rez-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b9b9b9;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 42px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 32px;
    cursor: pointer;
}

.api-rez-select:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, 0.2);
}

/* Data i godzina rejsu — ta sama typografia */
#api-rez-date-from,
#api-rez-date-back,
.api-rez-field-date .api-rez-input,
.api-rez-field-date .api-rez-input-date,
.api-rez-field-return .api-rez-input-date,
.api-rez input[type="text"].flatpickr-input,
.api-rez .flatpickr-alt-input,
#api-rez-hour,
#api-rez-hour-back {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
}

#api-rez-date-from,
#api-rez-date-back,
.api-rez-field-date .api-rez-input,
.api-rez-field-date .api-rez-input-date,
.api-rez-field-return .api-rez-input-date,
.api-rez input[type="text"].flatpickr-input,
.api-rez .flatpickr-alt-input {
    border-radius: 8px;
}

.api-rez-compact #api-rez-date-from,
.api-rez-compact #api-rez-date-back,
.api-rez-compact .api-rez-field-date .api-rez-input,
.api-rez-compact .api-rez-field-date .flatpickr-input,
.api-rez-compact .flatpickr-alt-input,
.api-rez-compact #api-rez-hour,
.api-rez-compact #api-rez-hour-back {
    height: 48px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.api-rez-starter #api-rez-date-from,
.api-rez-starter #api-rez-date-back,
.api-rez-starter input.flatpickr-input,
.api-rez-starter .flatpickr-alt-input,
.api-rez-starter #api-rez-hour,
.api-rez-starter #api-rez-hour-back {
    box-sizing: border-box;
    height: 50px;
    min-height: 50px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 48px;
}

#api-rez-hour option,
#api-rez-hour-back option {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.75;
    padding: 12px 14px;
    color: #1e293b;
    background-color: #fff;
}

.api-rez-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, 0.2);
}

.api-rez-input-date {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 34px;
}

.api-rez-input-date::placeholder,
.api-rez .flatpickr-input + input::placeholder {
    color: #303030 !important;
    opacity: 1;
}

/* ═══════════════════════════════════════════
   PASAŻEROWIE — +/- counter
   ═══════════════════════════════════════════ */
.api-rez-pax-qty {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    height: 46px;
    overflow: hidden;
    background: #fff;
    width: 130px;
    box-sizing: border-box;
}

.api-rez-pax-qty .api-rez-pax-btn {
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    height: 46px;
    border: none !important;
    border-radius: 0 !important;
    background: #f8fafc;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #475569;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    outline: none;
}

.api-rez-pax-qty .api-rez-pax-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.api-rez-pax-qty .api-rez-pax-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.api-rez-pax-input {
    flex: 1 1 auto;
    width: 54px;
    min-width: 40px;
    max-width: 54px;
    text-align: center;
    border: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    height: 46px !important;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    background: #fff !important;
    -moz-appearance: textfield;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box;
    outline: none;
}

.api-rez-pax-input::-webkit-inner-spin-button,
.api-rez-pax-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ═══════════════════════════════════════════
   PRZYCISK SZUKAJ — pomarańczowy jak /rezerwuj (rs-cta)
   Wariant turkusowy: .api-rez-btn-primary--teal
   ═══════════════════════════════════════════ */
.api-rez-compact {
    --rez-primary: #0e5ca7;
    --rez-primary-dark: #0b4a85;
    --bf-cta: #ed8800;
    --bf-cta-mid: #f09418;
    --bf-cta-dark: #d97a00;
}

.api-rez-compact .rs-cta,
.api-rez-compact .api-rez-compact-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 0 28px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--bf-cta-mid) 0%, var(--bf-cta) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(237, 136, 0, 0.25);
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    white-space: nowrap;
}

.api-rez-compact .rs-cta:hover,
.api-rez-compact .api-rez-compact-cta:hover {
    background: linear-gradient(180deg, var(--bf-cta) 0%, var(--bf-cta-dark) 100%);
    box-shadow: 0 2px 6px rgba(237, 136, 0, 0.3);
    transform: translateY(-1px);
}

.api-rez-compact .rs-cta:active,
.api-rez-compact .api-rez-compact-cta:active {
    transform: scale(0.98);
}

.api-rez-compact .rs-cta.is-loading,
.api-rez-compact .api-rez-compact-cta.is-loading {
    pointer-events: none;
    opacity: 0.92;
}

.api-rez-compact .rs-cta-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: api-rez-cta-spin 0.7s linear infinite;
}

@keyframes api-rez-cta-spin {
    to { transform: rotate(360deg); }
}

.api-rez-btn {
    padding: 0 28px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s, box-shadow 0.3s ease;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.api-rez-btn-primary--teal {
    background: linear-gradient(135deg, #06c9e0, #0891b2);
    color: #fff;
    box-shadow: 0 4px 14px rgba(4, 176, 199, 0.35);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.api-rez-btn-primary--teal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0891b2, #0e7490);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.api-rez-btn-primary--teal:hover::before {
    opacity: 1;
}

.api-rez-btn-primary--teal:hover {
    box-shadow: 0 6px 20px rgba(4, 176, 199, 0.45);
    transform: translateY(-1px);
}

.api-rez-btn-primary--teal:active {
    transform: scale(0.98);
}

/* Legacy alias — turkusowy wariant */
.api-rez-btn-primary {
    background: linear-gradient(135deg, #06c9e0, #0891b2);
    color: #fff;
    box-shadow: 0 4px 14px rgba(4, 176, 199, 0.35);
}

/* ═══════════════════════════════════════════
   TOM SELECT — styl jak na promy-retravel
   ═══════════════════════════════════════════ */
.api-rez .ts-wrapper {
    min-height: 42px;
}

.api-rez .ts-wrapper .ts-control {
    border: 1px solid #b9b9b9;
    border-radius: 4px;
    padding: 9px 12px;
    min-height: 46px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.api-rez .ts-wrapper.focus .ts-control,
.api-rez .ts-wrapper.single.input-active .ts-control {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, 0.2);
    outline: 0;
}

.api-rez .ts-wrapper .ts-control > input {
    font-size: 14px;
}

.api-rez .ts-wrapper .ts-control > .item[data-value=""] ,
.api-rez .ts-wrapper .ts-control > input::placeholder {
    color: #303030 !important;
    opacity: 1;
}

.api-rez .ts-wrapper.single .ts-control > input[placeholder] {
    color: #303030 !important;
}

.api-rez .ts-dropdown {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    margin-top: 4px;
    z-index: 9999;
}

.api-rez .ts-dropdown .option {
    padding: 10px 14px;
    font-size: 13px;
    color: #303030;
}

.api-rez .ts-dropdown .option.active {
    background: #eff6ff;
    color: #1e40af;
}

.api-rez .ts-dropdown .dropdown-input-wrap {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
}

.api-rez .plugin-dropdown_input.focus .ts-dropdown .dropdown-input {
    border: 2px solid #86b7fe;
    border-radius: 4px;
    padding: 10px 36px 10px 10px;
    font-size: 16px;
    height: 44px;
    width: 100%;
    box-shadow: none;
    outline: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
}

/* ═══════════════════════════════════════════
   KRAJ — opcje z flagami i separatorem
   ═══════════════════════════════════════════ */
.api-rez-kraj-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.api-rez-kraj-flag {
    flex-shrink: 0;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

.api-rez-kraj-flag.fi {
    border-radius: 2px;
}

.api-rez-kraj-opt-all .api-rez-kraj-flag {
    font-size: 1.1em;
}

.api-rez-kraj-sep {
    padding: 0 !important;
    margin: 0;
}

.api-rez-kraj-sep hr {
    border: none !important;
    height: 1px;
    background: #888;
    background-image: repeating-linear-gradient(90deg, #888 0, #888 4px, transparent 4px, transparent 8px);
    margin: 8px 0;
}

.api-rez .ts-dropdown .option[data-disabled] {
    padding: 2px 14px !important;
    min-height: 0 !important;
    margin: 0;
    cursor: default;
    background: none !important;
}

.api-rez .ts-dropdown [data-selectable] + [data-selectable] {
    border-top: 1px dashed #eee;
}

/* ── Opcje tras — układ jak na promy-retravel ── */
.api-rez-route-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.api-rez-route-cities {
    font-weight: 500;
    color: #1e293b;
}

.api-rez-route-armator {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: auto;
    padding-left: 12px;
    white-space: nowrap;
}

.api-rez .ts-dropdown .option.active .api-rez-route-cities {
    color: #1e40af;
}

.api-rez .ts-dropdown .option.active .api-rez-route-armator {
    color: #94a3b8;
}

/* ═══════════════════════════════════════════
   FLATPICKR — styl jak na promy-retravel
   ═══════════════════════════════════════════ */
.api-rez .flatpickr-input {
    cursor: pointer;
    color: #1d1d1d !important;
    -webkit-text-fill-color: #1d1d1d !important;
    opacity: 1 !important;
}

.api-rez-field.is-disabled {
    pointer-events: none;
}

.api-rez-field.is-disabled label {
    color: #94a3b8;
}

.api-rez-field.is-disabled .api-rez-input,
.api-rez-field.is-disabled .api-rez-select,
.api-rez-field.is-disabled .flatpickr-input,
.api-rez-field.is-disabled .api-rez-pax-qty {
    background-color: #e9ecef !important;
    border-color: #d1d5db !important;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

.api-rez-field.is-disabled .api-rez-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
}

.api-rez-field.is-disabled .api-rez-input::placeholder,
.api-rez-field.is-disabled .flatpickr-input::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.api-rez-field.is-disabled .api-rez-input-date,
.api-rez-field.is-disabled .flatpickr-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5'/%3E%3C/svg%3E");
}


.api-rez input.flatpickr-input[readonly] + .form-control.input,
.api-rez .flatpickr-alt-input,
.api-rez input[type="text"].flatpickr-input {
    width: 100%;
    padding: 12px 12px;
    border: 1px solid #b9b9b9;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #1e293b;
    background: #fff;
    height: 48px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 34px;
}

.api-rez-starter input.flatpickr-input,
.api-rez-starter .flatpickr-alt-input,
.api-rez-starter #api-rez-date-from,
.api-rez-starter #api-rez-date-back,
.api-rez-starter #api-rez-hour,
.api-rez-starter #api-rez-hour-back {
    box-sizing: border-box;
    height: 50px;
    min-height: 50px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 48px;
}

.flatpickr-calendar {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    width: 400px;
    padding: 0 0 10px;
}

.flatpickr-calendar.open {
    z-index: 9999;
}

.flatpickr-months {
    padding: 10px 0 6px;
}

.flatpickr-current-month {
    font-size: 1.1rem;
    font-weight: 600;
    padding-top: 4px;
    pointer-events: none;
}

.flatpickr-current-month .numInputWrapper .arrowUp,
.flatpickr-current-month .numInputWrapper .arrowDown {
    display: none;
}

.flatpickr-current-month input.cur-year {
    -moz-appearance: textfield;
}

.flatpickr-current-month input.cur-year::-webkit-inner-spin-button,
.flatpickr-current-month input.cur-year::-webkit-outer-spin-button {
    display: none;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    padding: 10px 14px;
    background: transparent !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    background: transparent !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    width: 20px;
    height: 20px;
    fill: #333;
    transition: fill 0.15s ease;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #dc3545;
}

.flatpickr-innerContainer {
    padding: 4px 12px 8px;
}

.fp-schedule-hint {
    margin: 0.35rem 0 0.15rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.fp-schedule-hint__text {
    margin: 0 0 0.4rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #475569;
}

.fp-schedule-hint__jump {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #0e5ca7;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fp-schedule-hint__jump:hover {
    color: #dc3545;
}

span.flatpickr-weekday {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    padding-bottom: 6px;
}

.flatpickr-rContainer,
.flatpickr-days {
    width: 100% !important;
}

.dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    gap: 6px 10px;
    padding: 0 2px;
    justify-content: center;
}

.flatpickr-day {
    height: 42px;
    line-height: 42px;
    flex: 0 0 calc((100% - 60px) / 7);
    max-width: calc((100% - 60px) / 7);
    font-size: 0.95rem;
    border-radius: 6px;
}

.flatpickr-day:not(.flatpickr-disabled):not(.prevMonthDay):not(.nextMonthDay) {
    background: #f0f6fd;
}

.flatpickr-day:not(.flatpickr-disabled):not(.prevMonthDay):not(.nextMonthDay):hover {
    background: var(--rez-primary, #0e5ca7);
    border-color: var(--rez-primary, #0e5ca7);
    color: #fff;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: var(--rez-primary, #0e5ca7) !important;
    border-color: var(--rez-primary, #0e5ca7) !important;
    color: #fff !important;
}

.flatpickr-day.today {
    border-color: var(--rez-primary, #0e5ca7);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #d0d0d0;
    text-decoration: line-through;
}

.fp-cal-wyjazd .flatpickr-day.selected,
.fp-cal-powrot .flatpickr-day.selected,
.fp-cal-powrot .flatpickr-day.fp-day-wyjazd {
    position: relative;
    overflow: visible;
    display: inline-flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 6px !important;
    line-height: 1 !important;
}

.fp-cal-wyjazd .flatpickr-day.selected::after,
.fp-cal-powrot .flatpickr-day.selected::after,
.fp-cal-powrot .flatpickr-day.fp-day-wyjazd::after {
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.fp-cal-wyjazd .flatpickr-day.selected::after {
    content: var(--rez-cal-departure-tag, 'wyjazd');
}

.fp-cal-powrot .flatpickr-day.selected::after {
    content: var(--rez-cal-return-tag, 'powr\00f3t');
}

.fp-cal-powrot .flatpickr-day.fp-day-wyjazd {
    background: #094a85 !important;
    border-color: #094a85 !important;
    color: #fff !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

.fp-cal-powrot .flatpickr-day.fp-day-wyjazd::after {
    content: var(--rez-cal-departure-tag, 'wyjazd');
}

/* Mobile — wyskakujący kalendarz jak na promowej */
@media (max-width: 768px) {
    .flatpickr-calendar {
        width: min(calc(100vw - 24px), calc(100% - 24px)) !important;
        max-width: 400px;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        z-index: 10050 !important;
    }

    .flatpickr-calendar.arrowTop::before,
    .flatpickr-calendar.arrowTop::after,
    .flatpickr-calendar.arrowBottom::before,
    .flatpickr-calendar.arrowBottom::after {
        display: none;
    }

    body.flatpickr-mobile-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 10040;
    }

    .flatpickr-day {
        height: 44px;
        line-height: 44px;
        max-height: 44px;
    }
}

/* ═══════════════════════════════════════════
   ALERT
   ═══════════════════════════════════════════ */
.api-rez-alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.api-rez-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.api-rez-alert__action {
    margin-left: 6px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: #991b1b;
    text-decoration: underline;
    cursor: pointer;
}

.api-rez-alert__action:hover {
    color: #7f1d1d;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1100px) {
    .api-rez-fields:not(.is-roundtrip) {
        flex-wrap: wrap;
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-field-country {
        flex: 1 1 calc(35% - 8px);
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-field-route {
        flex: 1 1 calc(65% - 8px);
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-field-date,
    .api-rez-fields:not(.is-roundtrip) .api-rez-field-hour,
    .api-rez-fields:not(.is-roundtrip) .api-rez-field-return-hour {
        flex: 1 1 calc(25% - 8px);
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-field-pax {
        flex: 0 0 120px;
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-field-btn {
        flex: 1 1 auto;
    }

    .api-rez-field-btn .api-rez-compact-cta,
    .api-rez-field-btn .rs-cta {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .api-rez-compact,
    .api-rez-compact .api-rez-search-form,
    .hero-search .api-rez-compact {
        max-width: 100%;
        min-width: 0;
    }

    .api-rez-compact .api-rez-select,
    .api-rez-compact .api-rez-input,
    .api-rez-compact .flatpickr-input,
    .api-rez-compact .ts-wrapper .ts-control,
    .api-rez-compact .ts-wrapper .ts-control > input,
    .api-rez-compact .ts-dropdown .dropdown-input,
    .api-rez-compact .plugin-dropdown_input.focus .ts-dropdown .dropdown-input,
    .api-rez-compact .api-rez-pax-input {
        font-size: 16px !important;
    }

    .api-rez-compact .ts-wrapper .ts-control > input {
        min-width: 0 !important;
    }

    .api-rez-compact .api-rez-search-form {
        max-width: 100%;
        -webkit-text-size-adjust: 100%;
    }

    /* W jedną stronę — zawsze kolumna (display:contents wyłączone) */
    .api-rez-fields:not(.is-roundtrip),
    .api-rez-fields:not(.is-roundtrip).is-search-ready,
    .api-rez-compact .api-rez-fields:not(.is-roundtrip),
    .api-rez-compact .api-rez-fields:not(.is-roundtrip).is-search-ready {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        row-gap: 1rem !important;
        column-gap: 0 !important;
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row,
    .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row--top,
    .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row--bottom,
    .api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--top,
    .api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--bottom,
    .api-rez-compact .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row,
    .api-rez-compact .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row--top,
    .api-rez-compact .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row--bottom {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 1rem !important;
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-outbound-fields:not([hidden]),
    .api-rez-fields:not(.is-roundtrip) .api-rez-return-fields:not([hidden]),
    .api-rez-compact .api-rez-fields:not(.is-roundtrip) .api-rez-outbound-fields {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 1rem !important;
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-field-country,
    .api-rez-fields:not(.is-roundtrip) .api-rez-field-route,
    .api-rez-fields:not(.is-roundtrip) .api-rez-field-date,
    .api-rez-fields:not(.is-roundtrip) .api-rez-field-hour,
    .api-rez-fields:not(.is-roundtrip) .api-rez-field-pax,
    .api-rez-fields:not(.is-roundtrip) .api-rez-field-btn,
    .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row--actions {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .hero-search .api-rez-compact,
    .hero-search .search-panel {
        max-width: 100%;
    }

    .api-rez-fields:not(.is-roundtrip).is-search-ready {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--top,
    .api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--bottom {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        width: 100%;
    }

    .api-rez-field-hour,
    .api-rez-field-return-hour,
    .api-rez-field-pax {
        min-width: 0;
    }

    .api-rez-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .api-rez-tabs-group {
        width: 100%;
    }

    .api-rez-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
    }

    /* Kierunek i trasa — osobne wiersze */
    .api-rez-fields .api-rez-fields-row--top,
    .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row--top,
    .api-rez-fields.is-roundtrip .api-rez-fields-row--top,
    .api-rez-fields.is-roundtrip.is-search-ready .api-rez-fields-row--top,
    .api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--top,
    .api-rez-fields.is-search-ready .api-rez-fields-row--top {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 10px;
        width: 100%;
        flex: 1 1 100%;
    }

    .api-rez-fields:not(.is-roundtrip) .api-rez-fields-row--bottom,
    .api-rez-fields.is-roundtrip .api-rez-fields-row--bottom,
    .api-rez-fields.is-roundtrip.is-search-ready .api-rez-fields-row--bottom,
    .api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--bottom,
    .api-rez-fields.is-search-ready .api-rez-fields-row--bottom {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 10px;
        width: 100%;
        flex: 1 1 100%;
    }

    .api-rez-fields .api-rez-field-country,
    .api-rez-fields .api-rez-field-route,
    .api-rez-fields.is-search-ready .api-rez-field-country,
    .api-rez-fields.is-search-ready .api-rez-field-route {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
    }

    /* Pasażerowie na całą szerokość */
    .api-rez-fields .api-rez-field-pax,
    .api-rez-fields.is-search-ready .api-rez-field-pax {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-fields-row--top {
        flex-direction: column;
    }

    .api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-outbound-fields,
    .api-rez-fields.is-roundtrip.has-return-route-choice .api-rez-return-fields {
        flex-direction: column;
    }

    .api-rez-fields.is-roundtrip {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .api-rez-fields.is-roundtrip.is-search-ready {
        grid-template-rows: auto auto auto auto;
    }

    .api-rez-fields.is-roundtrip .api-rez-field-country,
    .api-rez-fields.is-roundtrip .api-rez-field-route,
    .api-rez-fields.is-roundtrip .api-rez-outbound-fields,
    .api-rez-fields.is-roundtrip .api-rez-return-fields,
    .api-rez-fields.is-roundtrip:not(.is-search-ready) .api-rez-field-btn {
        grid-column: 1;
        grid-row: auto;
    }

    .api-rez-fields.is-roundtrip.is-search-ready .api-rez-field-pax {
        grid-column: 1;
        grid-row: 3;
    }

    .api-rez-fields.is-roundtrip.is-search-ready .api-rez-fields-row--actions {
        grid-column: 1;
        grid-row: 4;
        display: flex;
    }

    .api-rez-outbound-fields,
    .api-rez-return-fields {
        flex: 1 1 100%;
        width: 100%;
    }

    .api-rez-fields:not(.is-roundtrip).is-search-ready .api-rez-fields-row--actions {
        flex-direction: column;
        align-items: stretch;
    }

    .api-rez-fields-row,
    .api-rez-outbound-fields,
    .api-rez-return-fields,
    .api-rez-field-country,
    .api-rez-field-route,
    .api-rez-field-date,
    .api-rez-field-hour,
    .api-rez-field-return-hour,
    .api-rez-field-pax,
    .api-rez-field-btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .api-rez-field-btn .api-rez-compact-cta,
    .api-rez-field-btn .rs-cta {
        width: 100%;
    }

    .api-rez-field-btn {
        margin-top: 8px;
    }

    .api-rez-pax-qty {
        width: 100% !important;
    }

    .api-rez-pax-qty .api-rez-pax-input {
        max-width: none !important;
        flex: 1 1 auto !important;
    }
}

/* ═══════════════════════════════════════════
   ROUTE PICKER — jedno pole + panel tras
   ═══════════════════════════════════════════ */
.api-rez-compact.has-route-picker .api-rez-native-selects,
.api-rez-starter.has-route-picker .api-rez-native-selects {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.api-rez-compact.has-route-picker .api-rez-fields {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.api-rez-compact.has-route-picker .api-rez-fields-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
}

.api-rez-route-picker-field {
    width: 100%;
    margin-bottom: 0.25rem;
}

.api-rez-route-picker-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.api-rez-route-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 72px;
    padding: 14px 16px;
    border: 1px solid #b9b9b9;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.api-rez-route-trigger:has(.api-rez-route-trigger__empty:not([hidden])) {
    min-height: 80px;
    padding: 16px 18px;
    background: #f8fafc;
    border-color: var(--rez-primary, #0e5ca7);
}

.api-rez-route-trigger:has(.api-rez-route-trigger__selected:not([hidden])) {
    min-height: 72px;
    padding: 14px 16px;
    background: #fff;
    border-color: #b9b9b9;
}

.has-route-picker .is-route-pending .api-rez-route-trigger:has(.api-rez-route-trigger__empty:not([hidden])) {
    animation: api-rez-route-pending-pulse 2s ease-in-out 1;
}

@keyframes api-rez-route-pending-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(14, 92, 167, 0);
        border-color: var(--rez-primary, #0e5ca7);
    }
    25%, 75% {
        box-shadow: 0 0 0 4px rgba(14, 92, 167, 0.22);
        border-color: #0a4a8a;
    }
    50% {
        box-shadow: 0 0 0 0 rgba(14, 92, 167, 0);
        border-color: var(--rez-primary, #0e5ca7);
    }
}

@media (prefers-reduced-motion: reduce) {
    .has-route-picker .is-route-pending .api-rez-route-trigger:has(.api-rez-route-trigger__empty:not([hidden])) {
        animation: none;
    }
}

.api-rez-route-trigger:hover {
    border-color: var(--rez-primary, #0e5ca7);
}

.api-rez-route-trigger:has(.api-rez-route-trigger__selected:not([hidden])):hover {
    border-color: #94a3b8;
}

.api-rez-route-trigger:focus-visible {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
}

.api-rez-route-trigger.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.api-rez-route-trigger__empty,
.api-rez-route-trigger__selected {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
}

.api-rez-route-trigger__empty-a11y {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.api-rez-route-trigger__selected {
    width: 100%;
}

.api-rez-route-trigger__ico {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    opacity: 0.75;
}

.api-rez-route-trigger__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.api-rez-route-trigger__title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.api-rez-route-trigger__hint {
    font-size: 13px;
    color: #64748b;
}

.api-rez-route-trigger:has(.api-rez-route-trigger__empty:not([hidden])) {
    position: relative;
}

.api-rez-route-card-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.api-rez-route-visual {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    width: 100%;
    min-width: 0;
}

.api-rez-route-visual__end {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.api-rez-route-visual__center {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    justify-self: center;
    padding-top: 1px;
}

.api-rez-route-visual__end--from {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
}

.api-rez-route-visual__end--to {
    grid-column: 3;
    align-items: flex-end;
    text-align: right;
}

.api-rez-route-visual__city {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.15;
    max-width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-rez-route-visual__country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.2;
    max-width: 100%;
    min-width: 0;
}

.api-rez-route-visual__flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    background-size: cover;
}

.api-rez-route-visual__flag.fi {
    border-radius: 2px;
}

.api-rez-route-visual__swap {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--rez-primary, #0e5ca7);
    color: #fff;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(14, 92, 167, 0.25);
}

.api-rez-route-visual__ferry {
    width: 17px;
    height: 17px;
    opacity: 1;
    color: inherit;
    background-color: currentColor;
}

.api-rez-route-visual__swap .api-rez-label-ico--ferry {
    width: 17px;
    height: 17px;
    opacity: 1;
    color: inherit;
    background-color: currentColor;
}

.api-rez-route-visual__carrier {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-rez-route-visual--empty {
    align-items: center;
}

.api-rez-route-visual--empty .api-rez-route-visual__end {
    justify-content: center;
}

.api-rez-route-visual--empty .api-rez-route-visual__center {
    min-width: 120px;
    max-width: none;
    gap: 5px;
}

.api-rez-route-visual--empty .api-rez-route-visual__prompt {
    font-size: 22px;
    font-weight: 700;
    color: var(--rez-primary, #0e5ca7);
    text-align: center;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.api-rez-route-visual--empty .api-rez-route-visual__hint {
    font-size: 13px;
    font-weight: 400;
    color: #94a3b8;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

.api-rez-route-visual--empty .api-rez-route-visual__placeholder {
    font-size: 17px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
}

.api-rez-route-visual--empty .api-rez-route-visual__swap--muted {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    background: linear-gradient(145deg, #1a3fb8 0%, var(--rez-primary, #0e5ca7) 42%, #0891b2 100%);
    border: none;
    color: #fff;
    box-shadow: 0 3px 12px rgba(14, 92, 167, 0.32);
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.api-rez-route-visual--empty .api-rez-route-visual__swap--muted .api-rez-route-visual__ferry,
.api-rez-route-visual--empty .api-rez-route-visual__swap--muted .api-rez-label-ico--ferry {
    width: 18px;
    height: 18px;
    opacity: 1;
    color: #fff;
    background-color: currentColor;
}

.api-rez-route-visual__swap--muted {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    color: #94a3b8;
    box-shadow: none;
    border: 1px dashed #cbd5e1;
}

.api-rez-route-visual__swap--muted .api-rez-route-visual__ferry,
.api-rez-route-visual__swap--muted .api-rez-label-ico--ferry {
    width: 14px;
    height: 14px;
}

.api-rez-route-visual__prompt {
    font-size: 19px;
    font-weight: 700;
    color: var(--rez-primary, #0e5ca7);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

.api-rez-route-visual__hint {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

.api-rez-route-trigger:hover .api-rez-route-visual--empty .api-rez-route-visual__prompt {
    color: #0a4a8a;
}

.api-rez-route-trigger:hover .api-rez-route-visual--empty .api-rez-route-visual__swap--muted {
    background: linear-gradient(145deg, #0e3578 0%, #0a4a8a 42%, #0e7490 100%);
    border: none;
    color: #fff;
    box-shadow: 0 5px 16px rgba(14, 92, 167, 0.4);
    transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
    .api-rez-route-trigger:hover .api-rez-route-visual--empty .api-rez-route-visual__swap--muted {
        transform: none;
    }
}

.api-rez-route-quick__title {
    display: block;
    width: 100%;
    margin: 18px 0 0;
    padding: 0;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.api-rez-route-quick {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.api-rez-route-reverse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--rez-primary, #0e5ca7);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.api-rez-route-reverse[hidden] {
    display: none !important;
}

.api-rez-route-reverse:hover,
.api-rez-route-reverse:focus-visible {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #0a4a8a;
    outline: none;
}

.api-rez-route-reverse__ico {
    display: inline-block;
    font-size: 1.05em;
    line-height: 1;
    transform-origin: center center;
}

.api-rez-route-reverse.is-animating .api-rez-route-reverse__ico {
    animation: api-rez-route-reverse-spin 0.5s ease;
}

@keyframes api-rez-route-reverse-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-180deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .api-rez-route-reverse.is-animating .api-rez-route-reverse__ico {
        animation: none;
    }
}

.api-rez-route-quick__chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 7px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.api-rez-route-quick__name,
.api-rez-route-quick__countries {
    display: block;
}

.api-rez-route-quick__name {
    font-weight: 600;
}

.api-rez-route-quick__countries {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    color: #64748b;
}

.api-rez-route-quick__chip:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-route-quick,
.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-route-quick__title {
    display: none;
}

.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-fields-after-route {
    width: 100%;
    margin-top: 1rem;
}

.api-rez-compact.has-route-picker .api-rez-fields-after-route {
    max-width: 100%;
    box-sizing: border-box;
}

.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-fields-row--bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-start;
    width: 100%;
    gap: 10px;
}

.api-rez-compact.has-route-picker .api-rez-outbound-fields,
.api-rez-compact.has-route-picker .api-rez-return-fields:not([hidden]) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
}

.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending):not(.is-roundtrip) .api-rez-outbound-fields {
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip:not(.is-route-pending) .api-rez-outbound-fields,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip:not(.is-route-pending) .api-rez-return-fields:not([hidden]) {
    flex: 1 1 100%;
    width: 100%;
}

.api-rez-compact.has-route-picker .api-rez-return-fields[hidden] {
    display: none !important;
}

.api-rez-compact.has-route-picker .api-rez-outbound-fields .api-rez-field,
.api-rez-compact.has-route-picker .api-rez-return-fields:not([hidden]) .api-rez-field {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    width: auto;
}

.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending):not(.is-roundtrip) .api-rez-field-pax:not([hidden]) {
    flex: 0 0 132px;
    width: 132px;
    min-width: 120px;
    max-width: 150px;
}

.api-rez-compact.has-route-picker .api-rez-fields-row--actions {
    display: flex;
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
    width: 100%;
    margin-top: 1.5rem;
}

.api-rez-compact.has-route-picker .api-rez-field-btn {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    margin-top: 0;
}

/* Route picker + powrót — bez legacy grid (psuje odstępy po wyborze daty) */
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip.is-search-ready,
.api-rez-compact.has-route-picker .api-rez-fields.is-search-ready {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0 !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
}

.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-fields-row,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip.is-search-ready .api-rez-fields-row {
    display: flex !important;
}

.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip:not(.is-route-pending) .api-rez-fields-row--bottom {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-top: 0 !important;
}

.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-outbound-fields,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-return-fields:not([hidden]),
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-field-return-route:not([hidden]) {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
}

.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-outbound-fields {
    margin-top: 0 !important;
}

/* Od 2. wiersza (po wyjeździe) — większy odstęp nad labelami */
.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-outbound-fields ~ .api-rez-field-return-route:not([hidden]),
.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-outbound-fields ~ .api-rez-return-fields:not([hidden]),
.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-outbound-fields ~ .api-rez-field-pax:not([hidden]) {
    margin-top: 0.625rem;
}

.api-rez-compact.has-route-picker .api-rez-field-return-route:not([hidden]) + .api-rez-return-fields:not([hidden]),
.api-rez-compact.has-route-picker .api-rez-return-fields:not([hidden]) + .api-rez-field-pax:not([hidden]),
.api-rez-compact.has-route-picker .api-rez-field-return-route:not([hidden]) + .api-rez-field-pax:not([hidden]) {
    margin-top: 0.375rem;
}

@media (min-width: 769px) {
    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending):not(.is-roundtrip) .api-rez-field-pax:not([hidden]) {
        margin-top: 0;
    }
}

.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-outbound-fields,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-return-fields,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-field-pax,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-fields-row--actions,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip .api-rez-field-btn,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip.is-search-ready .api-rez-outbound-fields,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip.is-search-ready .api-rez-return-fields,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip.is-search-ready .api-rez-field-pax,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip.is-search-ready .api-rez-fields-row--actions,
.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip.is-search-ready .api-rez-field-btn {
    grid-column: unset !important;
    grid-row: unset !important;
}

.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip:not(.is-search-ready) .api-rez-fields-row--actions {
    display: flex !important;
}

.api-rez-compact.has-route-picker .api-rez-fields.is-roundtrip.is-search-ready .api-rez-field-pax:not([hidden]) {
    width: 100% !important;
    max-width: 100% !important;
}

.api-rez-compact.has-route-picker .api-rez-fields.is-route-pending .api-rez-fields-after-route {
    display: none;
}

.api-rez-starter.has-route-picker #api-rez-starter-card.is-route-pending #api-rez-fields-after-route {
    display: none;
}

.api-rez-starter.has-route-picker .rs-tabs--combined {
    margin-bottom: 8px;
}

.api-rez-starter.has-route-picker #api-rez-starter-card:not(.is-route-pending) #api-rez-fields-after-route {
    animation: api-rez-route-reveal 0.28s ease;
    margin-top: 1.5rem;
}

.api-rez-starter.has-route-picker #api-rez-starter-card:not(.is-route-pending) .api-rez-route-quick,
.api-rez-starter.has-route-picker #api-rez-starter-card:not(.is-route-pending) .api-rez-route-quick__title {
    display: none;
}

.api-rez-starter.has-route-picker #api-rez-fields-after-route {
    max-width: 100%;
    box-sizing: border-box;
}

.api-rez-starter.has-route-picker .api-rez-route-picker-field {
    margin-bottom: 0.25rem;
}

/* Odstępy między wierszami — jak na hero (compact + route picker) */
.api-rez-starter.has-route-picker #api-rez-fields-after-route > .rs-row:first-child,
.api-rez-starter.has-route-picker #api-rez-fields-after-route > .rs-row--return {
    margin-top: 0;
}

/* Początek sekcji powrotu — wyraźniejszy odstęp nad trasą powrotu */
.api-rez-starter.has-route-picker #api-rez-fields-after-route > .rs-row:first-child ~ .rs-row--return-route:not([hidden]) {
    margin-top: 1.25rem;
}

/* W obie strony bez wyboru trasy powrotu — mniejszy odstęp między terminami */
.api-rez-starter.has-route-picker #api-rez-fields-after-route > .rs-row--return-route[hidden] + .rs-row--return:not([hidden]) {
    margin-top: 0.375rem;
}

.api-rez-starter.has-route-picker #api-rez-fields-after-route > .rs-row:first-child ~ #api-rez-pax-wrap:not([hidden]) {
    margin-top: 0.625rem;
}

.api-rez-starter.has-route-picker .rs-row--return-route:not([hidden]) + .rs-row--return:not([hidden]),
.api-rez-starter.has-route-picker .rs-row--return-route:not([hidden]) + #api-rez-pax-wrap:not([hidden]),
.api-rez-starter.has-route-picker .rs-row--return:not([hidden]) + #api-rez-pax-wrap:not([hidden]) {
    margin-top: 0.625rem;
}

.api-rez-starter.has-route-picker .rs-actions {
    margin-top: 2.25rem;
}

.api-rez-starter.has-route-picker [data-rez-change-mode="1"] .rs-row--return:not([hidden]) {
    margin-top: 0.625rem;
}

.api-rez-starter.has-route-picker [data-rez-change-mode="1"] .rs-row--return-route:not([hidden]) + .rs-row--return:not([hidden]) {
    margin-top: 0.625rem;
}

@media (max-width: 640px) {
    .api-rez-starter.has-route-picker #api-rez-fields-after-route > .rs-row:first-child ~ .rs-row--return-route:not([hidden]) {
        margin-top: 1.25rem !important;
    }

    .api-rez-starter.has-route-picker #api-rez-fields-after-route > .rs-row--return-route[hidden] + .rs-row--return:not([hidden]) {
        margin-top: var(--rs-gap-field, 16px) !important;
    }

    .api-rez-starter.has-route-picker #api-rez-fields-after-route > .rs-row:first-child ~ #api-rez-pax-wrap:not([hidden]) {
        margin-top: var(--rs-gap-field, 16px);
    }

    .api-rez-starter.has-route-picker .rs-row--return-route:not([hidden]) + .rs-row--return:not([hidden]) {
        margin-top: var(--rs-gap-field, 16px) !important;
    }

    .api-rez-starter.has-route-picker [data-rez-change-mode="1"] .rs-row--return:not([hidden]),
    .api-rez-starter.has-route-picker [data-rez-change-mode="1"] .rs-row--return-route:not([hidden]) + .rs-row--return:not([hidden]) {
        margin-top: var(--rs-gap-field, 16px) !important;
    }
}

.api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-fields-after-route {
    animation: api-rez-route-reveal 0.28s ease;
}

@keyframes api-rez-route-reveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html.api-rez-route-panel-open,
body.api-rez-route-panel-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.api-rez-route-panel {
    position: fixed;
    inset: 0;
    z-index: 10070;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.api-rez-route-panel[hidden] {
    display: none !important;
}

.api-rez-route-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    touch-action: none;
}

.api-rez-route-panel__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: min(88vh, 720px);
    min-height: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.api-rez-route-panel__header {
    display: grid;
    grid-template-columns: 0 minmax(0, 1fr) 44px;
    align-items: center;
    gap: 4px;
    min-height: 52px;
    padding: 8px 8px 8px;
    border-bottom: 1px solid #eef2f7;
}

.api-rez-route-panel__header:has(.api-rez-route-panel__back:not([hidden])) {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.api-rez-route-panel__title {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    line-height: 1.3;
    min-width: 0;
}

.api-rez-route-panel__back,
.api-rez-route-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    cursor: pointer;
    flex-shrink: 0;
}

.api-rez-route-panel__back {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.api-rez-route-panel__close {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

.api-rez-route-panel__icon {
    display: block;
    flex-shrink: 0;
}

.api-rez-route-panel__back[hidden],
.api-rez-route-panel__close[hidden] {
    display: none !important;
}

.api-rez-route-panel__back:hover,
.api-rez-route-panel__close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.api-rez-route-panel__search-wrap {
    padding: 8px 10px 12px;
    border-bottom: 1px solid #eef2f7;
}

.api-rez-route-panel__search {
    width: 100%;
    height: 46px;
    padding: 10px 14px 10px 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    color: #1e293b;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z'/%3E%3C/svg%3E") no-repeat 12px center / 18px;
}

.api-rez-route-panel__search:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.api-rez-route-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 12px 10px 20px;
}

.api-rez-route-panel.is-subview .api-rez-route-panel__body {
    padding-bottom: 12px;
}

.api-rez-route-panel__footer {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06);
}

.api-rez-route-panel__footer[hidden],
.api-rez-route-panel__footer-back[hidden] {
    display: none !important;
}

.api-rez-route-panel__footer-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: var(--rez-primary, #0e5ca7);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.api-rez-route-panel__footer-back:hover,
.api-rez-route-panel__footer-back:focus-visible {
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(14, 92, 167, 0.1);
    outline: none;
}

.api-rez-route-panel__footer-back:active {
    transform: scale(0.99);
}

.api-rez-route-panel__section + .api-rez-route-panel__section {
    margin-top: 18px;
}

.api-rez-route-panel__section-title {
    margin: 0 0 12px;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    color: #0f172a;
    line-height: 1.35;
}

.api-rez-route-panel__cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.api-rez-route-panel__card {
    display: flex;
    align-items: center;
    justify-content: stretch;
    gap: 12px;
    width: 100%;
    padding: 14px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font: inherit;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.api-rez-route-panel__card:hover,
.api-rez-route-panel__card:focus-visible {
    border-color: #93c5fd;
    background: #f8fbff;
    box-shadow: 0 2px 8px rgba(14, 92, 167, 0.08);
    outline: none;
}

.api-rez-route-panel__card-main {
    min-width: 0;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
}

.api-rez-route-panel__card-main .api-rez-route-visual {
    width: 100%;
    max-width: none;
    margin: 0;
}

.api-rez-route-panel__card-main .api-rez-route-visual__center {
    max-width: none;
}

.api-rez-route-panel__card-main .api-rez-route-visual__carrier,
.api-rez-route-panel__card-main .api-rez-route-visual__prompt,
.api-rez-route-panel__card-main .api-rez-route-visual__hint {
    max-width: none;
}

.api-rez-route-panel__card-chevron {
    display: none;
}

.api-rez-route-panel__countries {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.api-rez-route-panel__country {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.api-rez-route-panel__country:hover,
.api-rez-route-panel__country:focus-visible {
    border-color: #93c5fd;
    background: #f8fbff;
    outline: none;
}

.api-rez-route-panel__country-flag {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.api-rez-route-panel__country-flag.fi {
    border-radius: 50%;
    background-size: cover;
}

.api-rez-route-panel__country-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.api-rez-route-panel__country-count {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.api-rez-route-panel__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 0;
    border: none;
    background: none;
    color: var(--rez-primary, #0e5ca7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.api-rez-route-panel__empty {
    padding: 24px 8px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

@media (min-width: 769px) {
    .api-rez-route-panel {
        align-items: center;
        padding: 24px;
    }

    .api-rez-route-panel__dialog {
        width: min(760px, calc(100vw - 48px));
        max-width: none;
        max-height: min(82vh, 760px);
        border-radius: 14px;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    }

    .api-rez-route-panel__countries {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .api-rez-route-panel__search-wrap,
    .api-rez-route-panel__body,
    .api-rez-route-panel__footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .api-rez-route-panel__card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .api-rez-route-panel__card-main .api-rez-route-visual {
        column-gap: 16px;
    }

    .api-rez-route-panel__card-main .api-rez-route-visual__center {
        max-width: none;
    }

    .api-rez-route-panel__card-main .api-rez-route-visual__carrier {
        max-width: none;
        white-space: nowrap;
    }

    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending):not(.is-roundtrip) .api-rez-fields-row--bottom {
        flex-wrap: nowrap;
    }

    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending):not(.is-roundtrip) .api-rez-outbound-fields {
        flex: 1 1 0;
        min-width: 0;
    }

    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending):not(.is-roundtrip) .api-rez-outbound-fields .api-rez-field-date {
        flex: 1.15 1 0;
    }

    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending):not(.is-roundtrip) .api-rez-outbound-fields .api-rez-field-hour {
        flex: 0.85 1 0;
        min-width: 108px;
    }
}

@media (max-width: 768px) {
    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-roundtrip),
    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-roundtrip).is-search-ready {
        flex-direction: column !important;
    }

    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-outbound-fields,
    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-return-fields:not([hidden]) {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .api-rez-compact.has-route-picker .api-rez-outbound-fields .api-rez-field,
    .api-rez-compact.has-route-picker .api-rez-return-fields:not([hidden]) .api-rez-field {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
    }

    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending):not(.is-roundtrip) .api-rez-field-pax:not([hidden]) {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .api-rez-compact.has-route-picker .api-rez-return-fields[hidden] {
        display: none !important;
    }

    .api-rez-compact.has-route-picker .api-rez-fields:not(.is-route-pending) .api-rez-fields-row--bottom {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    .api-rez-route-trigger,
    .api-rez-route-trigger__title,
    .api-rez-route-panel__search {
        font-size: 16px;
    }

    .api-rez-route-trigger__hint {
        font-size: 14px;
    }

    .api-rez-route-visual {
        column-gap: 6px;
    }

    .api-rez-route-visual:not(.api-rez-route-visual--empty) .api-rez-route-visual__center {
        gap: 4px;
        max-width: 76px;
    }

    .api-rez-route-visual--empty .api-rez-route-visual__center {
        min-width: 0;
        max-width: none;
    }

    .api-rez-route-visual--empty .api-rez-route-visual__placeholder {
        font-size: 13px;
        font-weight: 500;
    }

    .api-rez-route-visual--empty .api-rez-route-visual__prompt {
        font-size: 19px;
        white-space: normal;
        line-height: 1.15;
    }

    .api-rez-route-visual--empty .api-rez-route-visual__hint {
        font-size: 12px;
        white-space: normal;
        line-height: 1.15;
    }

    .api-rez-route-trigger:has(.api-rez-route-trigger__empty:not([hidden])) {
        min-height: 76px;
        padding: 14px 12px 14px 14px;
    }

    .api-rez-route-visual__city {
        font-size: 15px;
        margin-bottom: 6px;
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        word-break: break-word;
    }

    .api-rez-route-visual__end--to .api-rez-route-visual__city {
        text-align: right;
    }

    .api-rez-route-visual__country {
        font-size: 11px;
        gap: 4px;
    }

    .api-rez-route-visual__country > span:not(.fi):not([class*="flag"]) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .api-rez-route-visual__carrier {
        font-size: 10px;
        max-width: 72px;
    }

    .api-rez-route-panel__card {
        padding: 12px 8px;
    }

    .api-rez-route-panel__search-wrap,
    .api-rez-route-panel__body,
    .api-rez-route-panel__footer {
        padding-left: 8px;
        padding-right: 8px;
    }

    .api-rez-route-quick__chip {
        font-size: 12px;
        padding: 6px 10px;
        max-width: 100%;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }

    .api-rez-route-visual__swap {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
    }

    .api-rez-route-visual__swap .api-rez-route-visual__ferry,
    .api-rez-route-visual__swap .api-rez-label-ico--ferry {
        width: 15px;
        height: 15px;
    }
}
