/* Checkout step — uses .vmt-sell design tokens */

.vmt-sell.is-checkout-submitting {
    position: relative;
}

.vmt-checkout-submit-overlay[hidden] {
    display: none !important;
}

.vmt-checkout-submit-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: inherit;
}

.vmt-checkout-submit-overlay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: min(100%, 360px);
    padding: 28px 24px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-white);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.02),
        0 12px 32px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.vmt-checkout-submit-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--color-background-secondary);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: vmt-checkout-spin 780ms linear infinite;
}

.vmt-checkout-submit-message {
    margin: 0;
    min-height: 1.4em;
    color: var(--color-text-primary);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.vmt-checkout-submit-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.vmt-checkout-submit-sub {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

@keyframes vmt-checkout-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vmt-checkout-submit-spinner {
        animation: none;
        border-top-color: var(--color-primary);
        opacity: 0.85;
    }

    .vmt-checkout-submit-message {
        transition: none;
    }
}

#vmt-sell-checkout .vmt-checkout-layout {
    display: flex;
    gap: 48px;
    align-items: start;
    justify-content: center;
    padding: 8px 0 24px;
}

#vmt-sell-checkout .vmt-checkout-main {
    width: 600px;
}

#vmt-sell-checkout .vmt-checkout-status {
    margin: 0 0 12px;
    color: var(--color-text-secondary);
    font-size: 15px;
}

#vmt-sell-checkout .vmt-checkout-section {
    margin: 0 0 32px;
}

#vmt-sell-checkout .vmt-checkout-section:last-child {
    margin-bottom: 0;
}

#vmt-sell-checkout .vmt-checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 36px;
}

#vmt-sell-checkout .vmt-checkout-payout-note {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    background: var(--color-background-secondary);
    color: var(--color-text-primary);
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
}

#vmt-sell-checkout .vmt-checkout-section-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}

#vmt-sell-checkout .vmt-checkout-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#vmt-sell-checkout .vmt-checkout-fields--stack {
    grid-template-columns: 1fr;
}

#vmt-sell-checkout .vmt-checkout-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    position: relative;
}

#vmt-sell-checkout .vmt-checkout-field--full,
#vmt-sell-checkout .vmt-checkout-field--shipping,
#vmt-sell-checkout .vmt-checkout-field--search,
#vmt-sell-checkout [data-field$=".country"],
#vmt-sell-checkout [data-field$=".address_search"],
#vmt-sell-checkout [data-group="notices"] .vmt-checkout-field {
    grid-column: 1 / -1;
}

/* Floating-label control shell */
#vmt-sell-checkout .vmt-checkout-control-box {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 16px 16px 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-white);
    transition: border-color 0.15s ease;
}

#vmt-sell-checkout .vmt-checkout-field.is-focused .vmt-checkout-control-box,
#vmt-sell-checkout .vmt-checkout-control-box:focus-within {
    border-color: var(--color-primary);
}

#vmt-sell-checkout .vmt-checkout-field.is-invalid .vmt-checkout-control-box {
    border-color: var(--color-error);
}

#vmt-sell-checkout .vmt-checkout-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-text-placeholder);
    background: var(--color-white);
    pointer-events: none;
    z-index: 1;
    transition:
        top 0.15s ease,
        transform 0.15s ease,
        font-size 0.15s ease,
        color 0.15s ease;
}

#vmt-sell-checkout .vmt-checkout-field.is-floating .vmt-checkout-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 13px;
}

#vmt-sell-checkout .vmt-checkout-field.is-focused.is-floating .vmt-checkout-label {
    color: var(--color-primary);
}

#vmt-sell-checkout .vmt-checkout-input {
    width: 100%;
    margin: 0;
    padding: 0!important;
    border: 0!important;
    background: transparent!important;
    color: var(--color-text-primary);
    font-size: 16px!important;
    line-height: 1.3;
    outline: none!important;
    box-shadow: none!important;
    appearance: none!important;
    -webkit-appearance: none!important;
}

#vmt-sell-checkout .vmt-checkout-input:focus {
    outline: none!important;
    box-shadow: none!important;
    appearance: none!important;
    -webkit-appearance: none!important;
}

#vmt-sell-checkout select.vmt-checkout-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234D4D4D' d='M1.4 0L6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E")!important;
    background-repeat: no-repeat!important;
    background-position: right 0 center!important;
    padding-right: 18px;
}

#vmt-sell-checkout .vmt-checkout-field-error {
    margin: 0;
    font-size: 13px;
    color: var(--color-error);
}

#vmt-sell-checkout .vmt-checkout-hint {
    margin: 0;
    font-size: 12px;
    color: var(--color-text-placeholder);
}

#vmt-sell-checkout .vmt-checkout-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-secondary);
    cursor: pointer;
}

#vmt-sell-checkout .vmt-checkout-check-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

#vmt-sell-checkout .vmt-checkout-check-ui {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1.5px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-white);
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

#vmt-sell-checkout .vmt-checkout-check-icon {
    width: 7px;
    height: 14px;
    margin-top: -2px;
    border: solid var(--color-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0.85);
    opacity: 0;
    transition:
        opacity 0.12s ease,
        transform 0.12s ease;
}

#vmt-sell-checkout .vmt-checkout-check-input:checked + .vmt-checkout-check-ui {
    border-color: var(--color-primary);
}

#vmt-sell-checkout .vmt-checkout-check-input:checked + .vmt-checkout-check-ui .vmt-checkout-check-icon {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

#vmt-sell-checkout .vmt-checkout-check-input:focus-visible + .vmt-checkout-check-ui {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

#vmt-sell-checkout .vmt-checkout-check-text {
    min-width: 0;
    flex: 1 1 auto;
}

/* Shipping — accordion cards (head + expandable description) */
#vmt-sell-checkout .vmt-checkout-shipping-cards {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#vmt-sell-checkout .vmt-checkout-shipping-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    overflow: hidden;
}

#vmt-sell-checkout .vmt-checkout-shipping-card:first-of-type {
    border-radius: 8px 8px 0 0;
}

#vmt-sell-checkout .vmt-checkout-shipping-card:last-of-type {
    border-radius: 0 0 8px 8px;
}

#vmt-sell-checkout .vmt-checkout-shipping-card.is-selected {
    border-color: var(--color-primary);
    border-width: 2px;
    background: var(--color-background-secondary);
}

#vmt-sell-checkout .vmt-checkout-shipping-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px;
    cursor: pointer;
}

#vmt-sell-checkout input.vmt-checkout-shipping-radio {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

#vmt-sell-checkout .vmt-checkout-shipping-radio-ui {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    box-sizing: border-box;
    position: relative;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

#vmt-sell-checkout .vmt-checkout-shipping-radio-ui::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--color-primary);
    transform: scale(0);
    transition: transform 0.15s ease;
}

#vmt-sell-checkout .vmt-checkout-shipping-card.is-selected .vmt-checkout-shipping-radio-ui,
#vmt-sell-checkout .vmt-checkout-shipping-radio:focus-visible + .vmt-checkout-shipping-radio-ui {
    border-color: var(--color-primary);
}

#vmt-sell-checkout .vmt-checkout-shipping-card.is-selected .vmt-checkout-shipping-radio-ui::after,
#vmt-sell-checkout .vmt-checkout-shipping-radio:checked + .vmt-checkout-shipping-radio-ui::after {
    transform: scale(1);
}

#vmt-sell-checkout .vmt-checkout-shipping-radio:focus-visible + .vmt-checkout-shipping-radio-ui {
    outline: 1px solid var(--color-primary);
    outline-offset: 1px;
}

#vmt-sell-checkout .vmt-checkout-shipping-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

#vmt-sell-checkout .vmt-checkout-shipping-card-title strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}

#vmt-sell-checkout .vmt-checkout-shipping-card-desc {
    display: grid;
    grid-template-rows: 0fr;
    padding: 0 14px;
    opacity: 0;
    transition:
        grid-template-rows 0.2s ease,
        opacity 0.2s ease,
        padding-bottom 0.2s ease;
}

#vmt-sell-checkout .vmt-checkout-shipping-card-desc-inner {
    overflow: hidden;
    min-height: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-secondary);
}

#vmt-sell-checkout .vmt-checkout-shipping-card.is-selected .vmt-checkout-shipping-card-desc {
    grid-template-rows: 1fr;
    opacity: 1;
    padding-bottom: 14px;
}

/* Summary aside — stretch so sticky has room to travel */
#vmt-sell-checkout .vmt-checkout-aside {
    width: 480px;
    align-self: stretch;
}

#vmt-sell-checkout .vmt-checkout-aside-card {
    position: sticky;
    top: 140px;
}

#vmt-sell-checkout .vmt-checkout-submit-error[hidden],
#vmt-sell-checkout .vmt-checkout-status[hidden],
#vmt-sell-checkout .vmt-checkout-field-error[hidden] {
    display: none !important;
}

#vmt-sell-checkout .vmt-checkout-submit-error {
    margin: 0;
    font-size: 14px;
    color: var(--color-error);
}

#vmt-sell-checkout .vmt-checkout-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

#vmt-sell-checkout .vmt-checkout-submit-btn:disabled,
#vmt-sell-checkout .vmt-checkout-submit-btn.is-loading {
    opacity: 0.65;
    cursor: wait;
}

#vmt-sell-thanks .vmt-checkout-layout {
    display: flex;
    gap: 48px;
    align-items: start;
    justify-content: center;
    padding: 8px 0 24px;
}

#vmt-sell-thanks .vmt-checkout-main {
    width: 480px;
    max-width: 100%;
}

#vmt-sell-thanks .vmt-checkout-aside {
    width: 480px;
    max-width: 100%;
    align-self: stretch;
}

#vmt-sell-thanks .vmt-checkout-thanks-title {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

#vmt-sell-thanks .vmt-checkout-thanks-intro {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text-primary);
}

#vmt-sell-thanks .vmt-checkout-thanks-intro:last-of-type {
    margin-bottom: 20px;
}

#vmt-sell-thanks .vmt-checkout-thanks-intro strong {
    font-weight: 700;
}

#vmt-sell-thanks .vmt-checkout-thanks-order {
    display: block;
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 2px dotted var(--color-primary);
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    line-height: 1.4;
    color: var(--color-text-primary);
}

#vmt-sell-thanks .vmt-checkout-thanks-order strong {
    font-weight: 700;
}

#vmt-sell-thanks .vmt-checkout-thanks-support {
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

#vmt-sell-thanks .vmt-checkout-thanks-support a {
    color: var(--color-text-secondary);
    text-decoration: underline;
}

#vmt-sell-thanks .vmt-checkout-thanks-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

#vmt-sell-thanks .vmt-checkout-thanks-cta.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 820px) {
    #vmt-sell-checkout .vmt-checkout-layout,
    #vmt-sell-thanks .vmt-checkout-layout {
        flex-direction: column;
    }

    #vmt-sell-checkout .vmt-checkout-main,
    #vmt-sell-checkout .vmt-checkout-aside,
    #vmt-sell-thanks .vmt-checkout-main,
    #vmt-sell-thanks .vmt-checkout-aside {
        width: 100%;
    }

    #vmt-sell-checkout .vmt-checkout-fields {
        grid-template-columns: 1fr;
    }
}