.rwwc-item-grid {
    display: grid;
    grid-template-columns: 50px 90px 2fr 1fr 1fr 1fr;
}
.rwwc-withdrawal-item-grid {
    display: grid;
    grid-template-columns: 50px 90px 2fr 1fr 1fr 1fr;
}
.rwwc-return-product-thumbnail,
.rwwc-withdrawal-product-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
}
.rwwc-item-grid .rwwc-return-body.rwwc-return-product-thumbnail img,
.rwwc-withdrawal-item-grid .rwwc-withdrawal-body.rwwc-withdrawal-product-thumbnail img {
    max-width: 65px;
    height: auto;
    border-radius: 2px;
    margin-bottom: 0;
}
.rwwc-item-grid > div {
    padding: 8px 4px;
}

/* Withdrawal grid: more horizontal breathing room between columns. */
.rwwc-withdrawal-item-grid > div {
    padding: 8px 10px;
}
.rwwc-item-wrapper,
.rwwc-withdrawal-item-wrapper {
    border-top: 1px solid rgba(128, 128, 128, 0.35);
    border-left: 1px solid rgba(128, 128, 128, 0.35);
    border-right: 1px solid rgba(128, 128, 128, 0.35);
    border-radius: 4px;
}

.rwwc-return-header,
.rwwc-withdrawal-header {
    display: flex;
    font-weight: 500;
    background-color: rgba(128, 128, 128, 0.12);
    border-bottom: 1px solid rgba(128, 128, 128, 0.35);
    line-height: 1.2em;
    align-items: center;
}

.rwwc-return-body,
.rwwc-withdrawal-body {
    border-bottom: 1px solid rgba(128, 128, 128, 0.35);
}

.rwwc-return-navigator,
.rwwc-withdrawal-navigator {
    display: flow-root;
}

/* Step 2 "text below" note: small print under the items table. */
.rwwc-withdrawal-text-below {
    margin-top: 1em;
    font-size: 0.875em;
    opacity: 0.7;
}

/* Step 2 highlighted notice: a callout box (accent tint) above the buttons. */
.rwwc-withdrawal-st2-notice {
    margin-top: 1em;
    padding: 16px 20px;
    background-color: rgba(79, 117, 180, 0.08);
    border: 1px solid rgba(79, 117, 180, 0.4);
    border-radius: 8px;
}

.rwwc-withdrawal-st2-notice p {
    margin: 0;
}

.rwwc-withdrawal-st2-notice p + p {
    margin-top: 0.5em;
}

.rwwc-withdrawal-navigator {
    margin-top: 1em;
}

.rwwc-return-navigator .rwwc-return-step-three,
.rwwc-return-navigator .rwwc-return-confirm,
.rwwc-return-navigator .rwwc-return-nav-forward,
.rwwc-withdrawal-navigator .rwwc-withdrawal-confirm {
    float: right;
}

.rwwc-email-field,
.rwwc-order-field {
    margin-right: 10px;
}

.rwwc-summary-grid,
.rwwc-withdrawal-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.rwwc-summary-line,
.rwwc-withdrawal-summary-line {
    font-weight: 700;
    margin-top: 5px;
    margin-bottom: 5px;
}

.rwwc-exchange-items-notice,
.rwwc-withdrawal-exchange-items-notice {
    font-size: small;
    color: var(--rwwc-notice-color, #d63638);
}

.rwwc-item-grid .rwwc-return-body,
.rwwc-withdrawal-item-grid .rwwc-withdrawal-body {
    display: flex;
    align-items: center;
}

.rwwc-item-grid .rwwc-return-body.rwwc-return-product-checkbox,
.rwwc-withdrawal-item-grid .rwwc-withdrawal-body.rwwc-withdrawal-product-checkbox {
    justify-content: center;
}

.rwwc-item-grid .rwwc-return-header.rwwc-return-select-all-header,
.rwwc-withdrawal-item-grid .rwwc-withdrawal-header.rwwc-withdrawal-select-all-header {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Right-align the money columns (Price + Subtotal) — headers and values. */
.rwwc-withdrawal-item-grid .rwwc-withdrawal-header:nth-child(4),
.rwwc-withdrawal-item-grid .rwwc-withdrawal-header:nth-child(6) {
    text-align: right;
}

.rwwc-withdrawal-item-grid .rwwc-withdrawal-product-price,
.rwwc-withdrawal-item-grid .rwwc-withdrawal-total {
    justify-content: flex-end;
}

/* Center the Quantity column and give its selector a tappable size. */
.rwwc-withdrawal-item-grid .rwwc-withdrawal-header:nth-child(5) {
    text-align: center;
}

.rwwc-withdrawal-item-grid .rwwc-withdrawal-qty {
    justify-content: center;
}

.rwwc-withdrawal-quantity {
    padding: 6px 10px;
}

.rwwc-item-qty {
    margin-left: 5px;
}

.rwwc-row-selected {
    background-color: var(--rwwc-accent-color-soft, rgba(79, 117, 180, 0.1));
}

/* Step 2 "withdrawal total" — a right-aligned row below the items table. */
.rwwc-withdrawal-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.75em;
    padding: 8px 10px;
    margin-top: 4px;
}

.rwwc-withdrawal-total-row-label {
    font-weight: 400;
}

.rwwc-withdrawal-grand-total {
    font-weight: 700;
}

/* Step 3 confirmation — success line (green check + message). */
.rwwc-withdrawal-confirmation-success {
    display: flex;
    align-items: flex-start;
    gap: 0.6em;
    margin: 0 0 1.25em;
}
.rwwc-withdrawal-confirmation-check {
    flex: 0 0 auto;
    color: #1e7e34;
    margin-top: 0.1em;
}
.rwwc-withdrawal-confirmation-check svg {
    display: block;
}
.rwwc-withdrawal-confirmation-message {
    margin: 0;
}

/* Step 3 confirmation — read-only items table (no checkbox column). */
.rwwc-withdrawal-confirmation-grid {
    display: grid;
    grid-template-columns: 90px 2fr 1fr 1fr 1fr;
}
.rwwc-withdrawal-confirmation-grid > div {
    padding: 8px 10px;
}
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-body {
    display: flex;
    align-items: center;
}
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-body.rwwc-withdrawal-product-thumbnail {
    justify-content: center;
}
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-body.rwwc-withdrawal-product-thumbnail img {
    max-width: 65px;
    height: auto;
    border-radius: 2px;
    margin-bottom: 0;
}
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-header:nth-child(3),
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-header:nth-child(5) {
    text-align: right;
}
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-product-price,
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-confirmation-subtotal {
    justify-content: flex-end;
}
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-header:nth-child(4) {
    text-align: center;
}
.rwwc-withdrawal-confirmation-grid .rwwc-withdrawal-confirmation-qty {
    justify-content: center;
}

/* Step 3 confirmation — total, below-text and Back-to-store. */
.rwwc-withdrawal-confirmation .rwwc-withdrawal-grand-total {
    text-align: right;
}
.rwwc-withdrawal-confirmation-below {
    margin-top: 1.25em;
}
.rwwc-withdrawal-confirmation-below p {
    margin: 0 0 0.75em;
}
.rwwc-withdrawal-confirmation-navigator {
    margin-top: 1em;
    display: flow-root;
}
.rwwc-withdrawal-back-to-store {
    float: right;
}

.rwwc-order-content {
    margin-top: 20px;
}

.rwwc-order-info {
    background-color: rgba(128, 128, 128, 0.07);
    border: 1px solid rgba(128, 128, 128, 0.25);
    border-left: 3px solid var(--rwwc-accent-color, #4f75b4);
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.rwwc-order-info__details {
    display: grid;
    grid-template-columns: max-content 1fr;
    row-gap: 5px;
    column-gap: 16px;
    margin: 0;
}

.rwwc-order-info__row {
    display: contents;
}

.rwwc-order-info__row dt {
    font-weight: 600;
    font-size: 0.8125em;
    color: rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    align-self: center;
}

.rwwc-order-info__row dd {
    margin: 0;
    font-size: 0.8125em;
    align-self: center;
}

/* Step indicator timeline */
.rwwc-step-indicator {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 16px 0 8px;
}

/* Visibility is class-driven (server-side + scripts), not viewport-width. */
.rwwc-step-indicator.rwwc-step-indicator--hidden {
    display: none;
}

.rwwc-step-indicator-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    min-width: 64px;
}

.rwwc-step-indicator-circle {
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(128, 128, 128, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875em;
    color: rgba(128, 128, 128, 0.55);
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.rwwc-step-indicator-label {
    margin-top: 6px;
    font-size: 0.75em;
    text-align: center;
    color: rgba(128, 128, 128, 0.55);
    white-space: nowrap;
    transition: color 0.2s ease;
}

/* Visually-hidden state text, for themes lacking .screen-reader-text. */
.rwwc-step-indicator-state {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rwwc-step-indicator-connector {
    flex: 1;
    height: 2px;
    background-color: rgba(128, 128, 128, 0.35);
    margin-top: 17px; /* (36px circle height / 2) - (2px connector height / 2) */
    min-width: 16px;
    transition: background-color 0.2s ease;
}

/* Active step (current). */
.rwwc-step-indicator-step.rwwc-step-indicator-active .rwwc-step-indicator-circle {
    border-color: var(--rwwc-accent-color, #4f75b4);
    background-color: var(--rwwc-accent-color, #4f75b4);
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--rwwc-accent-color, #4f75b4) 22%, transparent);
}

.rwwc-step-indicator-step.rwwc-step-indicator-active .rwwc-step-indicator-label {
    color: var(--rwwc-accent-color, #4f75b4);
    font-weight: 600;
}

/* Completed step. */
.rwwc-step-indicator-step.rwwc-step-indicator-completed .rwwc-step-indicator-circle {
    position: relative;
    border-color: var(--rwwc-accent-color, #4f75b4);
    background-color: var(--rwwc-accent-color, #4f75b4);
    color: transparent;
}

/* Checkmark overlay (leaves the number intact for both markup modes). */
.rwwc-step-indicator-step.rwwc-step-indicator-completed .rwwc-step-indicator-circle::after {
    content: "";
    position: absolute;
    top: 45%;
    left: 50%;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.rwwc-step-indicator-step.rwwc-step-indicator-completed .rwwc-step-indicator-label {
    color: var(--rwwc-accent-color, #4f75b4);
}

.rwwc-step-indicator-connector.rwwc-step-indicator-connector-completed {
    background-color: var(--rwwc-accent-color, #4f75b4);
}

/* Compact stepper on small screens. */
@media (max-width: 599px) {
    .rwwc-step-indicator {
        padding-bottom: 32px; /* room for the label hanging below the circle row */
    }

    .rwwc-step-indicator-step {
        min-width: 0;
        position: relative; /* positioning context for the label = this step's circle */
    }

    .rwwc-step-indicator-label {
        display: none;
    }

    .rwwc-step-indicator-step.rwwc-step-indicator-active .rwwc-step-indicator-label {
        display: block;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 4px;
        width: max-content;
        max-width: 42vw; /* long labels wrap instead of overflowing the viewport */
        white-space: normal;
        text-align: center;
    }

    /* First/last active step: pin the label to the row edge so it can't clip off-screen. */
    .rwwc-step-indicator-step.rwwc-step-indicator-active:first-child .rwwc-step-indicator-label {
        left: 0;
        transform: none;
        text-align: left;
    }

    .rwwc-step-indicator-step.rwwc-step-indicator-active:last-child .rwwc-step-indicator-label {
        left: auto;
        right: 0;
        transform: none;
        text-align: right;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rwwc-step-indicator-circle,
    .rwwc-step-indicator-label,
    .rwwc-step-indicator-connector {
        transition: none;
    }
}

@media (min-width: 768px) {
    .form-row.search-field-wrap {
        width: 47.0588235294%;
    }

    .form-row.search-field-wrap.search-field-wrap-order {
        float: left;
        margin-right: 5.8823529412%;
        clear: both;
    }

    .form-row.search-field-wrap.search-field-wrap-email {
        float: right;
        margin-right: 0;
    }
}

.form-row.search-field-wrap label {
    display: block;
}

.form-row.search-field-wrap input {
    width: 100%;
}

.form-row.search-field-wrap input[type="submit"] {
    width: auto;
}
