/* rez-formularz.css — layout formularza partnerskiego; baza layoutu (+ skin brand w rez-formularz-brand.css) */

.page-booking {
    --rez-booking-pad: 20px;
    --rez-booking-width: 720px;
    --rez-journey-width: min(1100px, calc(100vw - 2 * var(--rez-booking-pad)));
    --rez-form-width: min(800px, calc(100vw - 2 * var(--rez-booking-pad)));
    --rez-boarding-width: min(960px, calc(100vw - 2 * var(--rez-booking-pad)));
    --rez-page-width: min(1140px, calc(100vw - 2 * var(--rez-booking-pad)));
    --rez-accent: #1a63f5;
    --rez-accent-dark: #1452cc;
    --rez-accent-light: #e5f4ff;
    --rez-cta: #ed8800;
    --rez-cta-mid: #f09418;
    --rez-cta-dark: #d97a00;
    --rez-phone-icon-bg: #e7f2f2;
    --rez-phone-icon-color: #075a54;
    --rez-phone-call-bg: #075a54;
    --rez-phone-call-bg-hover: #064845;
    --rez-page-bg: #f2f6f8;
    background: var(--rez-page-bg);
    min-height: 100vh;
}

/* Kontener startera /rezerwuj — wąski */
.page-booking .container.container--booking {
    max-width: var(--rez-booking-width);
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

/* Kontener formularza trasy — jak Bootstrap .container na promowej (nadpisuje style.css 1200px i --booking 720px) */
.container.rez-form-container {
    width: 100% !important;
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5) !important;
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
}

@media (min-width: 576px) {
    .container.rez-form-container {
        max-width: 540px !important;
    }
}

@media (min-width: 768px) {
    .container.rez-form-container {
        max-width: 720px !important;
    }
}

@media (min-width: 992px) {
    .container.rez-form-container {
        max-width: 960px !important;
    }
}

@media (min-width: 1200px) {
    .container.rez-form-container {
        max-width: 1140px !important;
    }
}

@media (min-width: 1400px) {
    .container.rez-form-container {
        max-width: 1320px !important;
    }
}

body.page-booking.page-rez-trasa .rez-main--booking {
    padding: 2rem 0 2.5rem;
}

body.page-booking.page-rez-trasa .api-rez-form-grid {
    --bs-gutter-x: 1.5rem;
}

body.page-booking.page-rez-trasa .rez-phone-footer {
    padding: 0 var(--rez-booking-pad) 48px;
    margin-top: 2.5rem;
}

body.page-booking.page-rez-trasa .rez-phone-footer__card,
body.page-booking.page-rez-trasa .rez-booking-meta {
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

body.page-booking.page-rez-trasa .rez-booking-meta {
    margin-top: 2rem;
}

@media (max-width: 575.98px) {
    body.page-booking.page-rez-trasa .bpass-mobi-fr {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Panel trasy — szerszy niż formularz poniżej */
.page-rez-trasa .api-rez-booking .bf-journey {
    width: min(var(--rez-journey-width), calc(100vw - 2 * var(--rez-booking-pad)));
    margin-left: 50%;
    transform: translateX(-50%);
}

.page-rez-trasa .api-rez-steps {
    display: none;
}

.page-rez-trasa .api-rez-steps {
    display: none;
}

/* Komunikat błędu SDK (gdy API nie odpowiada) — szerokość jak panel trasy */
.page-booking .api-rez-error-wrap {
    width: min(var(--rez-journey-width), 100%);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.page-rez-trasa .api-rez-form--simplified .rez-errors-panel-wrap {
    width: min(var(--rez-journey-width), 100%);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.page-rez-trasa .api-rez-form--simplified .api-rez-alert-route {
    width: 100%;
}

.page-booking .api-rez-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.page-booking .api-rez-error__icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    color: #d97706;
    line-height: 1.4;
}

.page-booking .api-rez-error__text {
    flex: 1;
    min-width: 0;
}

.page-booking .api-rez-error__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-booking .api-rez-error__body .api-rez-error__text {
    flex: none;
}

.page-booking .api-rez-error__action {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-weight: 600;
    color: #b45309;
    text-decoration: none;
}

.page-booking .api-rez-error__action:hover {
    color: #92400e;
    text-decoration: underline;
}

.page-rez-start .hero-header,
.page-rez-trasa .hero-header,
.page-rez-change .hero-header,
.page-rez-confirmation .hero-header {
    background: var(--color-hero-bg, #272fc6);
    min-height: 70px;
}

.page-rez-start .hero-header .logo,
.page-rez-trasa .hero-header .logo,
.page-rez-change .hero-header .logo,
.page-rez-confirmation .hero-header .logo {
    top: 50%;
    transform: translateY(-50%);
}

.page-rez-start .hero-header .nav-main,
.page-rez-trasa .hero-header .nav-main,
.page-rez-change .hero-header .nav-main,
.page-rez-confirmation .hero-header .nav-main {
    top: 50%;
    transform: translate(-50%, -50%);
}

.page-rez-start .hero-header .btn-search,
.page-rez-start .hero-header .navbar-toggler,
.page-rez-trasa .hero-header .btn-search,
.page-rez-trasa .hero-header .navbar-toggler,
.page-rez-change .hero-header .btn-search,
.page-rez-change .hero-header .navbar-toggler,
.page-rez-confirmation .hero-header .btn-search,
.page-rez-confirmation .hero-header .navbar-toggler {
    top: 50%;
    transform: translateY(-50%);
}

.page-rez-start .hero-header-wave,
.page-rez-trasa .hero-header-wave,
.page-rez-change .hero-header-wave,
.page-rez-confirmation .hero-header-wave {
    display: none;
}

.page-rez-start .rez-main--booking,
.page-rez-change .rez-main--booking,
.page-rez-confirmation .rez-main--booking {
    padding-top: 32px;
}

/* Widget SDK — loader pod krokami + fade-in po inicjalizacji */
.rez-widget-shell {
    position: relative;
    min-height: 360px;
}

.rez-widget-shell--search {
    min-height: 0;
}

.rez-widget-shell--booking {
    min-height: 0;
}

.rez-widget-shell__overlay {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: block;
    background: rgba(242, 246, 248, 0.92);
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Pasek postępu — pod stepperem (formularz partnerski), pełna szerokość */
.rez-page-load-bar {
    position: relative;
    display: block;
    width: 100%;
    height: 4px;
    overflow: hidden;
    background: #b8c4d4;
    flex-shrink: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rez-page-load-bar__shine {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 65%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(10, 45, 122, 0.25) 12%,
        #1452cc 28%,
        #272fc6 50%,
        #1d4ed8 72%,
        rgba(37, 99, 235, 0.25) 88%,
        transparent 100%
    );
    box-shadow: none;
    animation: rez-page-bar-shimmer 1.35s ease-in-out infinite;
}

.rez-page-load-bar:not(.is-active) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.rez-page-load-bar:not(.is-active) .rez-page-load-bar__shine {
    animation: none;
}

/* Booking — fade-in (pasek jest pod stepperem, nie na formularzu) */
.page-booking .rez-widget-shell--booking.is-loading .api-rez {
    visibility: visible;
    opacity: 0;
    pointer-events: none;
}

.rez-widget-shell__label {
    position: absolute;
    top: 140px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0 16px;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #64748b;
    pointer-events: none;
}

.rez-widget-shell.is-loading .api-rez {
    opacity: 0;
}

.rez-widget-shell--search.is-loading .api-rez {
    visibility: hidden;
}

.rez-widget-shell.is-ready .rez-widget-shell__overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.rez-widget-shell.is-ready .api-rez {
    visibility: visible;
    animation: rez-widget-fade-in 0.4s ease forwards;
}

@keyframes rez-page-bar-shimmer {
    0% {
        transform: translateX(-105%);
    }
    100% {
        transform: translateX(280%);
    }
}

@keyframes rez-widget-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Stepper — lekki */
.rez-stepper-bar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.rez-steps {
    list-style: none;
    margin: 0;
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.rez-steps--cabins {
    gap: 18px;
}

.rez-steps__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #aaa;
    padding: 0;
    position: relative;
    flex-shrink: 0;
    white-space: nowrap;
}

.rez-steps--cabins .rez-steps__item {
    font-size: 0.75rem;
}

.rez-steps--long .rez-steps__item {
    padding: 0 8px;
    font-size: 0.6875rem;
}

.rez-steps--long .rez-steps__item:not(:last-child)::after {
    width: 10px;
}

.rez-steps--cabins.rez-steps--long .rez-steps__item:not(:last-child)::after {
    width: 8px;
}

.rez-steps__item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    width: 24px;
    height: 1px;
    background: #e0e0e0;
    transform: translateY(-50%);
    pointer-events: none;
}

.rez-steps--cabins .rez-steps__item:not(:last-child)::after {
    width: 18px;
}

.rez-steps__num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f5f5f5;
    color: #aaa;
    border: 1px solid #e0e0e0;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.rez-steps__item.is-current {
    color: #1a1a1a;
    font-weight: 600;
}

.rez-steps__item.is-current .rez-steps__num {
    background: var(--rez-accent);
    color: #fff;
    border-color: var(--rez-accent);
}

.rez-steps__item.is-done {
    color: #4b5563;
    font-weight: 500;
}

.rez-steps__item.is-done .rez-steps__num {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.rez-krok-placeholder {
    padding: 48px 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.rez-krok-placeholder h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    color: #1a1a1a;
}

.rez-krok-placeholder p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9375rem;
}

.rez-krok-placeholder__meta {
    margin-top: 16px !important;
    font-size: 0.8125rem !important;
}

.rez-krok-placeholder__meta code {
    font-size: 0.8125rem;
    color: #374151;
}

/* Main */
.rez-main--booking {
    padding: 40px var(--rez-booking-pad) 48px;
    background: var(--rez-page-bg);
}

/* Stopka — tylko rezerwacja telefoniczna */
.rez-phone-footer {
    background: var(--rez-page-bg);
    padding: 0 var(--rez-booking-pad) 48px;
}

.rez-phone-footer__card {
    width: 100%;
    max-width: var(--rez-booking-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px 20px;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.rez-phone-footer__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rez-phone-icon-bg);
    color: var(--rez-phone-icon-color);
    font-size: 1.375rem;
    flex-shrink: 0;
    justify-self: center;
}

.rez-phone-footer__icon-mob {
    display: none;
}

@keyframes rez-phone-nudge {
    0%, 72%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    76% {
        transform: translateY(-2px) rotate(-7deg);
    }
    80% {
        transform: translateY(-1px) rotate(7deg);
    }
    84% {
        transform: translateY(0) rotate(-4deg);
    }
    88% {
        transform: translateY(0) rotate(0deg);
    }
}

.rez-phone-footer__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.rez-phone-footer__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.rez-phone-footer__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.rez-phone-footer__hours {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.rez-phone-footer__hours-line {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.35;
}

.rez-phone-footer__hours-line strong {
    font-weight: 600;
    color: #4b5563;
}

.rez-phone-footer__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.rez-phone-footer__lamp {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rez-phone-footer__status--open {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
}

.rez-phone-footer__status--open .rez-phone-footer__lamp {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
    animation: rez-lamp-pulse 2.8s ease-in-out infinite;
}

.rez-phone-footer__status--closed {
    color: #92400e;
    background: #fef9c3;
}

.rez-phone-footer__status--closed .rez-phone-footer__lamp {
    background: #facc15;
}

@keyframes rez-lamp-pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
        opacity: 0.75;
    }
}

.rez-phone-footer__call {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 168px;
    padding: 14px 22px;
    background: var(--rez-phone-call-bg);
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(7, 90, 84, 0.28);
    flex-shrink: 0;
}

.rez-phone-footer__call:hover {
    background: var(--rez-phone-call-bg-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(7, 90, 84, 0.32);
}

.rez-phone-footer__call-num {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
    white-space: nowrap;
}

.rez-phone-footer__call-hint {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.85;
    letter-spacing: 0.02em;
}

.rez-booking-meta {
    width: 100%;
    max-width: var(--rez-booking-width);
    margin: 48px auto 0;
    text-align: center;
}

.rez-booking-trust {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 0.875rem;
    color: #6b7280;
}

.rez-booking-trust li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rez-booking-trust i {
    color: #059669;
    font-size: 1rem;
}

.rez-booking-copy {
    margin: 1.75rem 0 0;
    font-size: 0.8125rem;
    color: #9ca3af;
}

@media (max-width: 640px) {
    .page-rez-trasa .api-rez-booking .bf-journey {
        width: 100%;
        margin-left: 0;
        transform: none;
    }

    .rez-steps {
        gap: 12px;
    }

    .rez-steps--long {
        gap: 6px;
    }

    .rez-steps--long .rez-steps__item:not(:last-child)::after {
        width: 6px;
    }

    .rez-steps__item span:not(.rez-steps__num) {
        display: none;
    }

    .rez-steps__num {
        width: 30px;
        height: 30px;
    }

    .rez-main--booking {
        padding: 28px 14px 36px;
    }

    .rez-phone-footer {
        padding: 0 14px 36px;
    }

    .rez-phone-footer__card {
        display: grid;
        grid-template-columns: 60px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        padding: 18px 16px;
        gap: 16px 14px;
    }

    .rez-phone-footer__icon {
        grid-row: 1;
        grid-column: 1;
        width: 52px;
        height: 52px;
        font-size: 1.25rem;
        border-radius: 10px;
        background: var(--rez-phone-icon-bg);
        justify-self: center;
    }

    .rez-phone-footer__icon-desk {
        display: none;
    }

    .rez-phone-footer__icon-mob {
        display: block;
        animation: rez-phone-nudge 5s ease-in-out infinite;
    }

    .rez-phone-footer__info {
        grid-row: 1;
        grid-column: 2;
        gap: 11px;
    }

    .rez-phone-footer__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .rez-phone-footer__call {
        grid-row: 2;
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        padding: 16px 20px;
    }

    .rez-phone-footer__call-num {
        font-size: 1.5rem;
    }

    .rez-booking-trust {
        flex-direction: column;
        gap: 6px;
    }
    .rez-booking-meta {
        margin-top: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rez-phone-footer__icon-mob {
        animation: none;
    }

    .rez-phone-footer__status--open .rez-phone-footer__lamp {
        animation: none;
    }
}

.rez-starter-heading {
    margin: 0 0 20px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: -0.01em;
}

.rez-starter-trust {
    margin: 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #6b7280;
}

.rez-starter-trust .bi {
    color: #059669;
    font-size: 1.05rem;
}

@media (max-width: 640px) {
    .page-rez-start .rez-main--booking,
    .page-rez-change .rez-main--booking {
        padding: 24px 14px 36px;
    }
}

/* Potwierdzenie — ten sam stepper co w formularzu (ukryj stepper z widoku Promowej) */
body.page-rez-confirmation .rez-form-container .stepper {
    display: none !important;
}

body.page-rez-confirmation .rez-form-container > .container.ctn-form-modern {
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

body.page-booking.page-rez-confirmation .rez-phone-footer--confirm {
    padding: 0 var(--rez-booking-pad) 48px;
    margin-top: 0;
}

body.page-booking.page-rez-confirmation .rez-phone-footer--confirm .rez-booking-meta {
    width: 100%;
    max-width: none;
    margin: 2rem auto 0;
}

.rez-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0.5rem 0 0;
}

.rez-confirm-btn-home {
    background: #fff;
    border: 2px solid #d1d5db;
    border-radius: var(--radius-md, 8px);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 24px;
    color: #374151;
    text-decoration: none;
    text-align: center;
}

.rez-confirm-btn-home:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

@media (max-width: 575px) {
    .rez-confirm-actions {
        grid-template-columns: 1fr;
    }
}
