/* Rama i tytuł jak na stronie koszyka. */
body.qinu-checkout-page #main-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(28px, 4vw, 48px) 0 clamp(40px, 5vw, 72px);
    background: color-mix(in srgb, var(--color-text) 6%, var(--color-background));
}

body.qinu-checkout-page #main-content > article > h1,
body.qinu-checkout-page #main-content .qinu-checkout-frame {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

body.qinu-checkout-page #main-content > article > h1 {
    margin-block: 0 clamp(24px, 3vw, 40px);
    padding-block: 0;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: var(--font-section-title-size);
    font-weight: var(--font-section-title-weight);
    line-height: var(--font-section-title-line-height);
    text-align: start;
}

body.qinu-checkout-page #main-content .qinu-checkout-frame {
    --qinu-checkout-card-gap: var(--space-3);
    --qinu-checkout-card-padding: clamp(16px, 2vw, 26px);
    --qinu-checkout-accent: var(--color-button-secondary-background);
    --qinu-checkout-soft: color-mix(in srgb, var(--color-text) 6%, var(--color-background));
    --qinu-checkout-accent-light: color-mix(in srgb, var(--qinu-checkout-accent) 12%, var(--color-background));
    position: relative;
    color: var(--color-text);
    font-family: var(--font-primary);
}

.qinu-checkout-frame > .wp-block-woocommerce-checkout {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.qinu-checkout-frame .wc-block-components-sidebar-layout {
    margin-block: 0;
}

.qinu-checkout-frame :is(.wc-block-checkout__main, .wc-block-checkout__sidebar, .wc-block-checkout__form) {
    min-inline-size: 0;
}

/* Komunikat i korzyści z ACF. */
.qinu-checkout-frame .qinu-checkout-notice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    margin: 0 0 var(--space-3);
    padding: 10px 14px;
    border-radius: calc(var(--radius-base) / 2);
    background: var(--qinu-checkout-accent-light);
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.qinu-checkout-frame .qinu-checkout-benefits {
    display: grid;
    gap: 6px;
    margin: var(--space-3) 0 0;
    padding: 12px;
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-base);
    background: var(--color-background);
    list-style: none;
}

.qinu-checkout-frame .qinu-checkout-benefits > li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: calc(var(--radius-base) / 2);
    background: var(--qinu-checkout-soft);
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.qinu-checkout-frame :is(.qinu-checkout-notice, .qinu-checkout-benefits) img {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.qinu-checkout-frame:not(:has(.wc-block-checkout__form)) :is(.qinu-checkout-notice, .qinu-checkout-benefits) {
    display: none;
}

/* Trzy karty: dane kontaktowe i adres, dostawa, płatność. */
.qinu-checkout-frame .wc-block-checkout__form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.qinu-checkout-frame .wc-block-checkout__form > :is(
    .wc-block-checkout__contact-fields,
    .wc-block-checkout__shipping-fields,
    .wc-block-checkout__billing-fields,
    .wc-block-checkout__order-notes,
    .wc-block-checkout__shipping-method,
    .wc-block-checkout__pickup-options,
    .wc-block-checkout__shipping-option,
    .wc-block-checkout__payment-method
) {
    box-sizing: border-box;
    min-inline-size: 0;
    width: 100%;
    max-width: none;
    margin: 0 0 var(--qinu-checkout-card-gap);
    padding: var(--qinu-checkout-card-padding);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-base);
    background: var(--color-background);
}

/* Łączymy sąsiadujące kroki w jedną kartę, zachowując natywne pola. */
.qinu-checkout-frame .wc-block-checkout__form > :is(
    .wc-block-checkout__contact-fields,
    .wc-block-checkout__shipping-fields,
    .wc-block-checkout__billing-fields
):has(+ :is(.wc-block-checkout__shipping-fields, .wc-block-checkout__billing-fields, .wc-block-checkout__order-notes)) {
    margin-bottom: 0;
    padding-bottom: calc(var(--qinu-checkout-card-padding) / 2);
    border-bottom: 0;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
}

.qinu-checkout-frame .wc-block-checkout__form > :is(
    .wc-block-checkout__contact-fields,
    .wc-block-checkout__shipping-fields,
    .wc-block-checkout__billing-fields
) + :is(.wc-block-checkout__shipping-fields, .wc-block-checkout__billing-fields, .wc-block-checkout__order-notes) {
    padding-top: calc(var(--qinu-checkout-card-padding) / 2);
    border-top: 0;
    border-start-start-radius: 0;
    border-start-end-radius: 0;
}

.qinu-checkout-frame .wc-block-checkout__form > .wc-block-checkout__contact-fields
+ :is(.wc-block-checkout__shipping-fields, .wc-block-checkout__billing-fields) .wc-block-components-checkout-step__heading {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.qinu-checkout-frame .wc-block-checkout__form > :is(
    .wc-block-checkout__contact-fields,
    .wc-block-checkout__shipping-fields,
    .wc-block-checkout__billing-fields
) .wc-block-components-text-input:has(input:is([type="text"], [type="tel"], [type="email"]) + label) {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qinu-checkout-frame .wc-block-checkout__form > :is(
    .wc-block-checkout__contact-fields,
    .wc-block-checkout__shipping-fields,
    .wc-block-checkout__billing-fields
) .wc-block-components-text-input input:is([type="text"], [type="tel"], [type="email"]) + label {
    order: -1;
    position: static;
    max-width: none;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    transform: none;
    white-space: normal;
}

.qinu-checkout-frame .wc-block-checkout__form > :is(
    .wc-block-checkout__contact-fields,
    .wc-block-checkout__shipping-fields,
    .wc-block-checkout__billing-fields
) .wc-block-components-text-input input:is([type="text"], [type="tel"], [type="email"]):has(+ label) {
    min-height: 48px;
    padding: 10px 12px;
}

.qinu-checkout-frame .wc-block-components-checkout-step::after {
    border: 0;
}

.qinu-checkout-frame .wc-block-components-checkout-step__heading {
    margin-block: 0 var(--space-3);
}

.qinu-checkout-frame .wc-block-components-checkout-step__title {
    color: var(--color-text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.qinu-checkout-frame .wc-block-components-checkout-step__title::before {
    content: none;
}

.qinu-checkout-frame :is(.wc-block-checkout__contact-fields, .wc-block-checkout__shipping-option, .wc-block-checkout__payment-method) .wc-block-components-checkout-step__title::before {
    position: static;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0 10px 0 0;
    border-radius: 50%;
    background: var(--qinu-checkout-soft);
    color: var(--color-text);
    font: 400 15px/1 var(--font-primary);
    vertical-align: middle;
}

.qinu-checkout-frame .wc-block-checkout__contact-fields .wc-block-components-checkout-step__title::before {
    content: "1" / "";
}

.qinu-checkout-frame .wc-block-checkout__shipping-option .wc-block-components-checkout-step__title::before {
    content: "2" / "";
}

.qinu-checkout-frame .wc-block-checkout__payment-method .wc-block-components-checkout-step__title::before {
    content: "3" / "";
}

.qinu-checkout-frame .wc-block-components-text-input input,
.qinu-checkout-frame .wc-block-components-textarea,
.qinu-checkout-frame .wc-block-components-combobox-control .components-combobox-control__input,
.qinu-checkout-frame .wc-block-components-address-card {
    border-color: var(--color-input-border);
    border-radius: calc(var(--radius-base) / 2);
}

/* Jeden obrys opcji. Domyślne warstwy WooCommerce rysują drugi obrys. */
.qinu-checkout-frame :is(.wc-block-checkout__shipping-option, .wc-block-checkout__payment-method) .wc-block-components-radio-control {
    display: grid;
    gap: 8px;
}

.qinu-checkout-frame :is(.wc-block-checkout__shipping-option, .wc-block-checkout__payment-method)
.wc-block-components-radio-control--highlight-checked::after,
.qinu-checkout-frame :is(.wc-block-checkout__shipping-option, .wc-block-checkout__payment-method)
.wc-block-components-radio-control--highlight-checked :is(.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option)::after {
    content: none;
}

.qinu-checkout-frame :is(.wc-block-checkout__shipping-option, .wc-block-checkout__payment-method)
.wc-block-components-radio-control--highlight-checked :is(
    label.wc-block-components-radio-control__option--checked-option-highlighted,
    .wc-block-components-radio-control-accordion-option--checked-option-highlighted
) {
    box-shadow: none;
}

.qinu-checkout-frame :is(.wc-block-checkout__shipping-option, .wc-block-checkout__payment-method)
.wc-block-components-radio-control > :is(.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option) {
    min-block-size: 48px;
    border: 1px solid var(--color-input-border);
    border-radius: calc(var(--radius-base) / 2);
    background: var(--color-background);
}

.qinu-checkout-frame :is(.wc-block-checkout__shipping-option, .wc-block-checkout__payment-method)
.wc-block-components-radio-control > :is(.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option):has(.wc-block-components-radio-control__input:checked) {
    border-color: color-mix(in srgb, var(--qinu-checkout-accent) 34%, var(--color-input-border));
    background: color-mix(in srgb, var(--qinu-checkout-accent) 7%, var(--color-background));
}

.qinu-checkout-frame :is(.wc-block-checkout__shipping-option, .wc-block-checkout__payment-method)
.wc-block-components-radio-control .wc-block-components-radio-control__input:checked {
    border-color: var(--qinu-checkout-accent);
}

.qinu-checkout-frame :is(.wc-block-checkout__shipping-option, .wc-block-checkout__payment-method)
.wc-block-components-radio-control .wc-block-components-radio-control__input:checked::before {
    background: var(--qinu-checkout-accent);
}

.qinu-checkout-frame :is(button, a, input, select, textarea, [role="button"]):focus-visible {
    outline: 2px solid var(--color-input-border-active);
    outline-offset: 2px;
}

/* Rodzime podsumowanie pozycji, rabatów i dostawy. */
.qinu-checkout-frame .wp-block-woocommerce-checkout-order-summary-block {
    overflow-wrap: anywhere;
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-base);
    background: var(--color-background);
}

.qinu-checkout-frame .wc-block-components-checkout-order-summary__title-text {
    font-size: 19px;
    font-weight: 700;
}

.qinu-checkout-frame .wc-block-components-totals-footer-item {
    font-weight: 700;
}

.qinu-checkout-frame .wc-block-checkout__terms {
    font-size: 14px;
    line-height: 1.5;
}

.qinu-checkout-frame .wc-block-checkout__actions {
    margin-bottom: 0;
}

.qinu-checkout-frame .wc-block-checkout__actions_row {
    gap: 12px;
}

.qinu-checkout-frame .wc-block-checkout__actions .wc-block-components-checkout-place-order-button {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid var(--qinu-checkout-accent);
    border-radius: var(--radius-button-pill);
    background: var(--qinu-checkout-accent);
    color: var(--color-button-primary-text);
    font: var(--font-button-weight) var(--font-button-size)/var(--font-button-line-height) var(--font-primary);
    letter-spacing: var(--font-button-letter-spacing);
}

.qinu-checkout-frame .wc-block-checkout__actions .wc-block-components-checkout-place-order-button:not(:disabled):hover {
    background: var(--color-background);
    color: var(--color-text);
}

@container (max-width: 919px) {
    /* Pełna suma jest w natywnym podsumowaniu obok przycisku. */
    .qinu-checkout-mobile-summary .wc-block-checkout__sidebar {
        margin-block-end: 0;
    }

    .qinu-checkout-mobile-summary .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
        display: none;
    }

    .qinu-checkout-frame .wc-block-checkout__form {
        --qinu-checkout-card-padding: 16px;
    }
}

@container (min-width: 920px) {
    .qinu-checkout-frame .wc-block-components-sidebar-layout:has(> .wc-block-checkout__main):has(> .wc-block-checkout__sidebar) {
        display: grid;
        grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
        align-items: start;
        gap: var(--space-4);
    }

    .qinu-checkout-frame .wc-block-components-sidebar-layout > .wc-block-checkout__main {
        order: 0;
        width: auto;
    }

    .qinu-checkout-frame .wc-block-components-sidebar-layout > .wc-block-checkout__sidebar {
        position: static;
        order: 1;
        width: auto;
        max-width: none;
        margin: 0;
    }

    .qinu-checkout-desktop .wc-block-components-sidebar-layout {
        min-height: var(--qinu-checkout-panel-min-height, 0px);
    }

    /* Układ po prawej bez przenoszenia elementów z formularza React. */
    .qinu-checkout-desktop .wc-block-checkout__form > :is(.wc-block-checkout__terms, .wc-block-checkout__actions) {
        position: absolute;
        left: var(--qinu-checkout-panel-left);
        box-sizing: border-box;
        width: var(--qinu-checkout-panel-width);
        max-width: none;
        margin: 0;
        padding: 12px;
        border: 1px solid var(--color-input-border);
        border-radius: var(--radius-base);
        background: var(--color-background);
    }

    .qinu-checkout-desktop .wc-block-checkout__form > .wc-block-checkout__terms {
        top: var(--qinu-checkout-panel-terms-top);
    }

    .qinu-checkout-desktop .wc-block-checkout__form > .wc-block-checkout__actions {
        top: var(--qinu-checkout-panel-actions-top);
    }

    .qinu-checkout-desktop .wc-block-checkout__actions_row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Lista ACF jest poza kontenerem WooCommerce, więc przełącza ją skrypt. */
.qinu-checkout-desktop > .qinu-checkout-benefits {
    position: absolute;
    top: var(--qinu-checkout-benefits-top);
    left: var(--qinu-checkout-benefits-left);
    box-sizing: border-box;
    width: var(--qinu-checkout-panel-width);
    margin: 0;
}

/* Typografia kosztów wspólna dla koszyka i zamówienia. */
body.woocommerce-cart #main-content .wc-block-cart__sidebar
:is(.wc-block-components-totals-item, .qinu-cart-page-subtotal),
.qinu-checkout-frame :is(.wc-block-checkout__sidebar, .checkout-order-summary-block-fill) .wc-block-components-totals-item {
    font-family: var(--font-primary);
    font-size: 17px;
    line-height: 1.4;
}

body.woocommerce-cart #main-content .wc-block-cart__sidebar
:is(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value, .qinu-cart-page-subtotal strong),
.qinu-checkout-frame :is(.wc-block-checkout__sidebar, .checkout-order-summary-block-fill)
:is(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value) {
    font-size: inherit;
}

body.woocommerce-cart #main-content .wc-block-cart__sidebar
:is(.wc-block-components-totals-item__value, .qinu-cart-page-subtotal strong),
.qinu-checkout-frame :is(.wc-block-checkout__sidebar, .checkout-order-summary-block-fill) .wc-block-components-totals-item__value {
    font-family: "Outfit", var(--font-primary);
}

body.woocommerce-cart #main-content .wc-block-cart__sidebar .wc-block-components-totals-footer-item
:is(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value),
.qinu-checkout-frame .wc-block-components-totals-footer-item
:is(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value) {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.qinu-checkout-frame {
    --qinu-checkout-summary-padding: clamp(16px, 2vw, 32px);
}

.qinu-checkout-frame .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title-text,
.qinu-checkout-frame .checkout-order-summary-block-fill-wrapper .wc-block-components-title {
    font-size: clamp(20px, 1.9vw, 27px);
    font-weight: 700;
    line-height: 1.2;
}

.qinu-checkout-frame :is(.wc-block-checkout__sidebar, .checkout-order-summary-block-fill)
.wc-block-components-totals-coupon .wc-block-components-panel__button {
    position: relative;
    padding: 0 28px 0 0;
    font: 600 18px/1.4 var(--font-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.qinu-checkout-frame .wc-block-components-totals-coupon .wc-block-components-panel__button-icon {
    display: none;
}

.qinu-checkout-frame .wc-block-components-totals-coupon .wc-block-components-panel__button[aria-expanded]::after {
    position: absolute;
    inset-inline-end: 2px;
    top: 50%;
    transform: translateY(-50%);
    content: "+" / "";
    font-size: 22px;
    line-height: 1;
}

.qinu-checkout-frame .wc-block-components-totals-coupon .wc-block-components-panel__button[aria-expanded="true"]::after {
    content: "−" / "";
}

.qinu-checkout-frame :is(.wc-block-checkout__sidebar, .checkout-order-summary-block-fill) .wc-block-components-totals-footer-item {
    padding: 12px;
    border: 1px solid var(--color-input-border);
    border-radius: calc(var(--radius-base) / 2);
}

.qinu-checkout-frame .checkout-order-summary-block-fill > .wc-block-components-totals-wrapper:last-of-type {
    padding: 12px 16px 16px;
}

@container (min-width: 920px) {
    .qinu-checkout-frame .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
        border: 0;
        background: transparent;
    }

    .qinu-checkout-frame .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title {
        margin: 0;
        padding: 0 0 var(--space-3);
    }

    .qinu-checkout-frame .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title-text {
        margin: 0;
    }

    .qinu-checkout-frame .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__content {
        padding: var(--space-3) var(--qinu-checkout-summary-padding) 0;
    }

    .qinu-checkout-frame .wc-block-checkout__sidebar .wc-block-components-totals-wrapper {
        padding-inline: 0;
    }

    .qinu-checkout-frame .wc-block-checkout__sidebar .wc-block-components-totals-wrapper > .wc-block-components-totals-item {
        padding-inline: 0;
    }

    .qinu-checkout-frame .wc-block-checkout__sidebar .wc-block-components-totals-wrapper > .wc-block-components-totals-footer-item {
        padding-inline: 12px;
    }

    .qinu-checkout-frame.qinu-checkout-desktop .wc-block-checkout__form > :is(.wc-block-checkout__terms, .wc-block-checkout__actions) {
        padding: 0 var(--qinu-checkout-summary-padding);
        border: 0;
        border-radius: 0;
        background: transparent;
    }
}

.qinu-checkout-desktop {
    isolation: isolate;
}

.qinu-checkout-desktop::before {
    position: absolute;
    z-index: -1;
    top: var(--qinu-checkout-surface-top);
    left: var(--qinu-checkout-benefits-left);
    width: var(--qinu-checkout-panel-width);
    height: var(--qinu-checkout-surface-height);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-base);
    background: var(--color-background);
    box-shadow: 0 12px 36px color-mix(in srgb, var(--color-text) 8%, transparent);
    content: "";
}

.qinu-checkout-desktop > .qinu-checkout-benefits {
    padding: 0 var(--qinu-checkout-summary-padding) var(--qinu-checkout-summary-padding);
    border: 0;
    border-radius: 0;
    background: transparent;
}

@container (max-width: 919px) {
    .qinu-checkout-mobile-summary .wc-block-checkout__actions {
        padding: 16px;
        border: 1px solid var(--color-input-border);
        border-radius: var(--radius-base);
        background: var(--color-background);
    }

    .qinu-checkout-frame .wc-block-checkout__actions .checkout-order-summary-block-fill-wrapper {
        padding-bottom: 16px;
        border: 0;
        background: transparent;
    }
}

/* Produkty w podsumowaniu zamówienia i w jego wersji mobilnej. */
.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item {
    --qinu-checkout-product-image-size: clamp(60px, 6vw, 84px);
    display: grid;
    grid-template-columns: var(--qinu-checkout-product-image-size) minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 16px;
    padding-block: 12px;
}

.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__image {
    width: 100%;
    margin: 0;
    padding: 0;
}

.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__image > img {
    display: block;
    width: 100%;
    max-width: none;
    height: var(--qinu-checkout-product-image-size);
    padding: 4px;
    border: 1px solid var(--color-input-border);
    border-radius: calc(var(--radius-base) / 2);
    object-fit: contain;
}

.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
    min-width: 22px;
    min-height: 22px;
    font-size: 13px;
    transform: translate(25%, -25%);
}

.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__description {
    min-width: 0;
    padding: 0;
    overflow-wrap: anywhere;
}

.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__description .wc-block-components-product-name {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__description .wc-block-components-product-metadata {
    font-size: 14px;
    line-height: 1.4;
}

.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__individual-prices,
.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price {
    font-family: "Outfit", var(--font-primary);
    font-size: 16px;
    line-height: 1.3;
}

.qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price {
    margin: 0;
    padding: 0;
    font-weight: 700;
}

@container (max-width: 480px) {
    .qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item {
        grid-template-columns: var(--qinu-checkout-product-image-size) minmax(0, 1fr);
        column-gap: 12px;
    }

    .qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__image {
        grid-row: span 2;
    }

    .qinu-checkout-frame .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price {
        grid-column: 2;
        text-align: start;
    }
}
.qinu-checkout-frame .wc-block-checkout__form.qinu-shipping-layout {
    position: static;
    display: grid;
    grid-template-columns: var(--qinu-checkout-card-padding) repeat(2, minmax(0, 1fr)) var(--qinu-checkout-card-padding);
    isolation: isolate;
    reading-flow: grid-rows;
}

.qinu-shipping-layout > * {
    grid-column: 1 / -1;
    grid-row: var(--qinu-section-row, auto);
}

.qinu-shipping-layout::before {
    content: "";
    grid-area: 2 / 1 / calc(var(--qinu-card-end) + 1) / -1;
    z-index: -1;
    margin-bottom: var(--qinu-checkout-card-gap);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-base);
    background: var(--color-background);
    pointer-events: none;
}

.qinu-shipping-layout::after {
    content: "";
    grid-area: var(--qinu-card-end) / 1 / auto / -1;
    height: calc(var(--qinu-checkout-card-gap) + 6px);
    pointer-events: none;
}

.qinu-checkout-frame .qinu-shipping-layout > :is(.wc-block-checkout__contact-fields, .wc-block-checkout__shipping-fields),
.qinu-shipping-layout > :is(.wc-block-checkout__contact-fields, .wc-block-checkout__shipping-fields) > .wc-block-components-checkout-step__content,
.qinu-shipping-layout .wc-block-components-address-address-wrapper.is-editing:has(#shipping),
.qinu-shipping-layout .wc-block-components-address-form-wrapper:has(> #shipping),
.qinu-checkout-frame .qinu-shipping-layout :is(#contact, #shipping) {
    display: contents;
}

.qinu-shipping-layout > .wc-block-checkout__shipping-fields > .wc-block-components-checkout-step__heading-container {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.qinu-checkout-frame .qinu-shipping-layout .qinu-shipping-item {
    grid-row: var(--qinu-field-row);
    grid-column: 2 / 4;
    min-inline-size: 0;
    width: auto;
    max-width: none;
    margin: 0 0 18px;
}

.qinu-checkout-frame .qinu-shipping-layout [data-qinu-column="2"] {
    grid-column: 2;
    padding-inline-end: 8px;
}

.qinu-checkout-frame .qinu-shipping-layout [data-qinu-column="3"] {
    grid-column: 3;
    padding-inline-start: 8px;
}

.qinu-shipping-layout .wc-block-checkout__contact-fields > .wc-block-components-checkout-step__heading-container {
    padding-top: var(--qinu-checkout-card-padding);
}

.qinu-checkout-frame .wc-block-checkout__form.qinu-shipping-layout > .qinu-shipping-item {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.qinu-shipping-layout .wc-blocks-components-select .wc-blocks-components-select__label {
    position: static;
    display: block;
    margin-bottom: 6px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
}

.qinu-shipping-layout .wc-blocks-components-select .wc-blocks-components-select__select {
    padding: 10px 30px 10px 12px;
}

.qinu-shipping-layout .wc-blocks-components-select .wc-blocks-components-select__expand {
    top: auto;
    bottom: 15px;
    transform: none;
}

.qinu-shipping-layout .qinu-shipping-item :is(input:not([type="checkbox"]), select, textarea):not(:focus):not([aria-invalid="true"]) {
    border-color: var(--color-input-border);
}

.qinu-shipping-layout .qinu-field-hint {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.4;
}

.qinu-shipping-layout .wc-block-checkout__add-note:has(textarea) .wc-block-components-checkbox {
    display: none;
}

.qinu-shipping-layout .wc-block-checkout__add-note:has(textarea)::before {
    content: "Uwagi do zamówienia (opcjonalnie)" / "";
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 599px) {
    .qinu-checkout-frame .wc-block-checkout__form.qinu-shipping-layout {
        grid-template-columns: var(--qinu-checkout-card-padding) minmax(0, 1fr) var(--qinu-checkout-card-padding);
    }

    .qinu-shipping-layout > * {
        grid-row: var(--qinu-section-mobile-row, auto);
    }

    .qinu-shipping-layout::before {
        grid-row-end: calc(var(--qinu-card-mobile-end) + 1);
    }

    .qinu-shipping-layout::after {
        grid-row-start: var(--qinu-card-mobile-end);
    }

    .qinu-checkout-frame .qinu-shipping-layout .qinu-shipping-item {
        grid-row: var(--qinu-field-mobile-row);
        grid-column: 2;
        padding-inline: 0;
    }
}
.qinu-checkout-frame .wc-block-components-totals-shipping .wc-block-components-totals-shipping__via {
    display: none;
}
@container (min-width: 920px) {
    .qinu-checkout-frame .wc-block-checkout__sidebar
    .wc-block-components-totals-shipping > .wc-block-components-totals-item,
    .qinu-checkout-frame .wc-block-checkout__sidebar
    .wc-block-components-totals-coupon {
        padding-inline: 0;
    }
}
.qinu-checkout-frame .wc-block-checkout__use-address-for-billing > label[hidden] {
    display: none;
}
.qinu-checkout-frame .wc-block-checkout__use-address-for-billing > label[hidden] {
    display: none;
}

.qinu-checkout-frame .qinu-other-shipping-address .wc-block-components-checkbox__label {
    font-weight: 600;
}

.qinu-checkout-frame .wc-block-checkout__form.qinu-ship-to-other-active {
    reading-flow: flex-visual;
}

.qinu-checkout-frame .qinu-ship-to-other-active >
:is(.wp-block-woocommerce-checkout-express-payment-block, :has(> .wc-block-components-express-payment)) {
    order: -4;
}

.qinu-checkout-frame .qinu-ship-to-other-active > .wc-block-checkout__contact-fields {
    order: -3;
    margin-bottom: 0;
    border-bottom: 0;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
}

.qinu-checkout-frame .qinu-ship-to-other-active > .wc-block-checkout__billing-fields {
    order: -2;
    margin-bottom: 0;
    border-block: 0;
    border-radius: 0;
    padding-block-start: 0;
}

.qinu-checkout-frame .qinu-ship-to-other-active > .wc-block-checkout__shipping-fields {
    order: -1;
    border-top: 0;
    border-start-start-radius: 0;
    border-start-end-radius: 0;
}

.qinu-checkout-frame .qinu-ship-to-other-active >
.wc-block-checkout__shipping-fields > .wc-block-components-checkout-step__heading-container {
    display: none;
}

.qinu-checkout-frame .qinu-ship-to-other-active >
.wc-block-checkout__shipping-fields > .wc-block-components-checkout-step__content {
    display: flex;
    flex-direction: column;
    reading-flow: flex-visual;
}

.qinu-checkout-frame .qinu-ship-to-other-active .wc-block-checkout__use-address-for-billing {
    order: -1;
    margin-block: 0 16px;
}

.qinu-checkout-frame .qinu-ship-to-other-active #shipping {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.qinu-checkout-frame .qinu-ship-to-other-active #shipping > * {
    min-inline-size: 0;
    margin-block: 0;
}


.qinu-checkout-frame .qinu-ship-to-other-active #qinu-phone-hint {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.4;
}
.qinu-checkout-frame .qinu-ship-to-other-active #qinu-email-hint {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.4;
}

.qinu-checkout-frame .qinu-ship-to-other-active
#contact #email:not(:focus):not([aria-invalid="true"]) {
    border-color: var(--color-input-border, #d6d6d6);
    box-shadow: none;
}
.qinu-checkout-frame #shipping-option
label.wc-block-components-radio-control__option {
    display: flex;
    align-items: center;
    min-height: 76px;
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__option-layout {
    flex: 1;
    min-width: 0;
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__label-group {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 24px);
    font-size: clamp(14px, 1.5vw, 17px);
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__label {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__secondary-label {
    flex: 0 0 auto;
    margin-inline-start: auto;
    font-family: "Outfit", var(--font-primary);
    white-space: nowrap;
}

.qinu-checkout-frame #shipping-option .qinu-delivery-logo {
    flex: 0 0 56px;
    width: 56px;
    height: 36px;
    object-fit: contain;
}

.qinu-checkout-frame #shipping-option .qinu-delivery-logo[data-carrier="orlen"] {
    height: 50px;
}

.qinu-checkout-frame #shipping-option .qinu-pickup-native:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
}

.qinu-checkout-frame #shipping-option .qinu-pickup-slot {
    display: flex;
    justify-content: center;
    padding: 0 0 8px;
}

.qinu-checkout-frame #shipping-option .qinu-pickup-button {
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid var(--qinu-checkout-accent);
    border-radius: var(--radius-button);
    background: var(--qinu-checkout-accent);
    color: #fff;
    font: 500 16px/1.25 var(--font-primary);
    cursor: pointer;
}

.qinu-checkout-frame #shipping-option .qinu-pickup-button:hover {
    background: var(--color-background);
    color: var(--color-text);
}

@media (max-width: 599px) {
    .qinu-checkout-frame #shipping-option
    label.wc-block-components-radio-control__option {
        min-height: 64px;
        padding-inline-end: 10px;
    }

    .qinu-checkout-frame #shipping-option .qinu-delivery-logo {
        flex-basis: 50px;
        width: 50px;
    }
}
/* Wiersze dostawy */
.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__option {
    position: relative;
    min-block-size: 54px;
    padding-block: 10px;
    border-color: var(--color-input-border);
    border-radius: calc(var(--radius-base) / 2);
    background: var(--color-background);
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__option:has(input:checked) {
    border-color: var(--qinu-checkout-accent);
    background: color-mix(in srgb, var(--qinu-checkout-accent) 5%, var(--color-background));
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__option
.wc-block-components-radio-control__input {
    top: 50%;
    margin-block: 0;
    transform: translateY(-50%);
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__option
:is(.wc-block-components-radio-control__label, .wc-block-components-radio-control__secondary-label) {
    color: var(--color-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25;
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__secondary-label {
    white-space: nowrap;
}

/* Jednakowe miejsce na logo w każdym wierszu */
.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__label-group img {
    box-sizing: border-box;
    width: 48px;
    height: 28px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
}

.qinu-checkout-frame #shipping-option .wc-block-components-radio-control__label-group
img:is([src*="inpost" i], [src*="dpd" i]) {
    
    opacity: 0.85;
}
@media (max-width: 599px) {
    .qinu-checkout-frame .wc-block-checkout__contact-fields
    :is(#contact, .wc-block-components-text-input:has(#email)) {
        min-inline-size: 0;
    }

    .qinu-checkout-frame .wc-block-checkout__contact-fields
    :is(
        .wc-block-components-checkout-step__description,
        #contact p,
        #contact small,
        .wc-block-components-text-input:has(#email) + :is(p, small)
    ),
    .qinu-checkout-frame .wc-block-checkout__contact-fields
    :is(#contact, .wc-block-components-text-input:has(#email))::after {
        box-sizing: border-box;
        max-inline-size: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
.qinu-checkout-frame .qinu-checkout-benefits > li.qinu-checkout-payments {
    display: block;
    padding: 8px 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.qinu-checkout-frame .qinu-checkout-payments__title {
    margin: 0 0 12px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qinu-checkout-frame .qinu-checkout-payments__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qinu-checkout-frame .qinu-checkout-payments__logos > li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.qinu-checkout-frame .qinu-checkout-benefits img.qinu-payment-logo {
    display: block;
    flex: none;
    width: 40px;
    max-width: 100%;
    height: 24px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    filter: none;
    opacity: 1;
}

.qinu-checkout-frame .qinu-checkout-benefits img.qinu-payment-logo--przelewy24 {
    width: 60px;
}

.qinu-checkout-frame .qinu-checkout-benefits img.qinu-payment-logo--mastercard {
    width: 32px;
}
.qinu-checkout-frame .wc-block-checkout__actions
.wc-block-components-checkout-place-order-button {
    margin-top: 16px;
}