.anchers-returportal {
    box-sizing: border-box;
    max-width: var(--container-narrow, 900px);
    margin-inline: auto;
    padding: clamp(1rem, 4vw, 2rem);
    color: var(--color-text, #2e2e2e);
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e9e5dc);
    border-radius: var(--radius-xl, 20px);
    overflow-wrap: anywhere;
}

:where(.anchers-returportal) .section-title {
    margin: 0 0 1rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.15;
}

:where(.anchers-returportal) .section-text {
    max-width: 55ch;
    line-height: 1.6;
}

.anchers-returportal .ar-form,
.anchers-returportal .ar-actions {
    margin-block: var(--space-s, 1rem);
}

.anchers-returportal .ar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs, .5rem);
}

.anchers-returportal .ar-field {
    max-width: 34rem;
}

.anchers-returportal .ar-field label {
    display: grid;
    gap: var(--space-xs, .5rem);
    font-weight: var(--font-weight-medium, 500);
}

:where(.anchers-returportal) .input-primary {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.75rem;
    max-width: 100%;
    padding: .625rem .875rem;
    font: inherit;
    color: var(--color-text, #2e2e2e);
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e9e5dc);
    border-radius: var(--radius-md, 8px);
}

.anchers-returportal textarea.input-primary {
    resize: vertical;
}

.anchers-returportal .ar-choice input {
    accent-color: var(--color-primary, #4f7a46);
}

:where(.anchers-returportal) :is(.btn-primary, .btn-secondary) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .625rem 1rem;
    border: 1px solid var(--color-primary, #4f7a46);
    border-radius: var(--radius-md, 8px);
    font: inherit;
    font-weight: var(--font-weight-semibold, 600);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

:where(.anchers-returportal) .btn-primary {
    color: #fff;
    background: var(--color-primary, #4f7a46);
}

:where(.anchers-returportal) .btn-primary:hover {
    color: #fff;
    background: var(--color-primary-dark, #2f4a34);
}

:where(.anchers-returportal) .btn-secondary {
    color: var(--color-primary-dark, #2f4a34);
    background: var(--color-surface, #fff);
}

:where(.anchers-returportal) .btn-secondary:hover {
    background: var(--color-primary-light, #dde8d7);
}

.anchers-returportal :is(input, select, textarea, button, a):focus-visible {
    outline: var(--focus-ring-width, 2px) solid var(--color-focus, #4f7a46);
    outline-offset: 2px;
}

.anchers-returportal .ar-notice {
    padding: .75rem 1rem;
    background: var(--color-primary-light, #dde8d7);
    border-inline-start: 4px solid var(--color-primary, #4f7a46);
    border-radius: var(--radius-md, 8px);
}

.anchers-returportal .ar-notice-warning {
    background: var(--color-background, #f8f6f1);
    border-inline-start-color: var(--color-warning, #d18442);
}

.anchers-returportal .ar-table {
    overflow-x: auto;
    margin-block: var(--space-s, 1rem);
}

.anchers-returportal .ar-table table {
    width: 100%;
    border-collapse: collapse;
}

.anchers-returportal .ar-table :is(th, td) {
    padding: .625rem .75rem;
    border-bottom: 1px solid var(--color-border, #e9e5dc);
    text-align: left;
}

.anchers-returportal .ar-table th {
    background: var(--color-background, #f8f6f1);
}

.anchers-returportal .ar-table select {
    min-width: 10rem;
}

.anchers-returportal .ar-quantity {
    width: 5.25rem;
}

.anchers-returportal .ar-validation {
    margin-block: var(--space-s, 1rem);
    border-inline-start-color: var(--color-danger, #c84c4c);
    background: var(--color-background, #f8f6f1);
}

.anchers-returportal .ar-mobile-label {
    display: none;
}

@media (max-width: 650px) {
    .anchers-returportal {
        padding: 1rem;
    }

    .anchers-returportal .ar-items {
        overflow: visible;
    }

    .anchers-returportal .ar-items table,
    .anchers-returportal .ar-items tbody {
        display: block;
    }

    .anchers-returportal .ar-items thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .anchers-returportal .ar-items tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
        align-items: start;
        padding: .875rem;
        margin-block-end: .75rem;
        border: 1px solid var(--color-border, #e9e5dc);
        border-radius: var(--radius-md, 8px);
    }

    .anchers-returportal .ar-items tbody td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        overflow-wrap: break-word;
    }

    .anchers-returportal .ar-item-name,
    .anchers-returportal .ar-item-condition {
        grid-column: 1 / -1;
    }

    .anchers-returportal .ar-item-name {
        font-weight: var(--font-weight-semibold, 600);
    }

    .anchers-returportal .ar-mobile-label {
        display: block;
        margin-block-end: .25rem;
        font-weight: var(--font-weight-medium, 500);
    }

    .anchers-returportal .ar-items select {
        min-width: 0;
    }

    .anchers-returportal .ar-actions > a,
    .anchers-returportal .ar-form > button {
        box-sizing: border-box;
        width: 100%;
    }
}

.anchers-returportal.ar-checkout-return {
    width: 100%;
    max-width: none;
}

.woocommerce-order-received .ar-checkout-return a.ar-checkout-return-link {
    box-sizing: border-box;
    max-width: 100%;
    color: #fff !important;
    background-color: #2f4a34 !important;
    border-color: #2f4a34 !important;
    text-decoration: none !important;
}

.woocommerce-order-received .ar-checkout-return a.ar-checkout-return-link:is(:hover, :focus-visible, :active) {
    color: #fff !important;
    background-color: #203725 !important;
    border-color: #203725 !important;
}
