/* Checkout-only layout — shared transaction chrome lives in transaction-shell.css. */

/* Canonical visual tokens live in the active OneStopProp theme. */
:root {
    /* Backward-compatible aliases used only by WooCommerce integrations. */
    --osp-box-background: var(--osp-surface);
    --osp-border-color: var(--osp-border);
    --osp-border-radius: var(--osp-radius-card);
    --osp-border-width: 1px;
    --osp-divider-color: var(--osp-divider);
    --osp-primary-color: var(--osp-action);
    --osp-secondary-color: var(--osp-action-hover);
    --osp-input-background: var(--osp-surface-floating);
    --osp-input-background-hover: color-mix(in srgb, var(--osp-surface-floating) 90%, var(--osp-foreground));
    --osp-option-selected-background: color-mix(in srgb, var(--osp-action) 10%, var(--osp-surface-floating));
    --osp-input-border-color: var(--osp-border);
    --wc-red: var(--osp-danger);
}

.osp-3sc-checkout-wrapper {
    --osp-radius-card: var(--osp-radius-control);

    width: min(100%, 1180px);
    margin-inline: auto;
    padding: 0 clamp(16px, 2.5vw, 32px) 32px;
    color: var(--osp-text-primary);
    font-family: var(--osp-font-sans);
}

/* Page heading. */
.osp-3sc-checkout-header {
    margin: clamp(30px, 4vw, 44px) 0;
    position: relative;
    isolation: isolate;
    text-align: center;
}

.osp-3sc-checkout-header::before {
    width: min(520px, 86vw);
    height: 150px;
    position: absolute;
    top: 52%;
    left: 50%;
    z-index: -1;
    border-radius: var(--osp-radius-full);
    background: radial-gradient(
        ellipse at center,
        color-mix(in srgb, var(--osp-action) 18%, transparent) 0%,
        color-mix(in srgb, var(--osp-action) 7%, transparent) 48%,
        transparent 75%
    );
    content: "";
    filter: blur(24px);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.osp-3sc-main-headline {
    /* Avoid font-relative `ch` sizing so the title does not reflow when Mona Sans loads. */
    width: min(100%, 24rem);
    margin: 0 auto;
    color: var(--osp-text-primary);
    font-family: var(--osp-font-heading);
    font-size: clamp(30px, 3.5vw, 44px);
    font-stretch: 112.5%;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.05;
}

@media (min-width: 768px) {
    .osp-3sc-main-headline {
        font-size: 34px;
    }
}

.osp-3sc-main-subtitle {
    max-width: 620px;
    margin: 14px auto 0;
    color: var(--osp-text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.osp-3sc-accent-text {
    color: var(--osp-accent);
    font-weight: 600;
}

/* Progress indicator. */
.osp-3sc-step-progress {
    margin-bottom: 24px;
    padding: 17px 22px;
    border-radius: var(--osp-radius-panel);
    background: var(--osp-surface);
}

.osp-3sc-steps {
    max-width: 720px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.osp-3sc-checkout-wrapper[data-step-count="2"] .osp-3sc-steps {
    max-width: 520px;
}

.osp-3sc-step {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--osp-text-muted);
    cursor: pointer;
    transition: color 300ms ease, transform 300ms ease;
}

.osp-3sc-step.active {
    transform: scale(1.1);
}

.osp-3sc-step-number {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--osp-radius-full);
    background: var(--osp-surface-floating);
    color: var(--osp-text-secondary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition:
        background-color 300ms ease,
        border-color 300ms ease,
        color 300ms ease,
        box-shadow 300ms ease;
}

.osp-3sc-step-number .step-number {
    display: block;
}

.osp-3sc-step-number .step-checkmark {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
}

.osp-3sc-step-number .step-checkmark svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.osp-3sc-step.completed .osp-3sc-step-number,
.osp-3sc-step.active .osp-3sc-step-number {
    background: var(--osp-action);
    color: var(--osp-on-action);
}

.osp-3sc-step.completed .osp-3sc-step-number .step-number {
    display: none;
}

.osp-3sc-step.completed .osp-3sc-step-number .step-checkmark {
    display: flex;
}

.osp-3sc-step-title {
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    transition: color 300ms ease;
}

.osp-3sc-step.active,
.osp-3sc-step.completed {
    color: var(--osp-text-primary);
}

.osp-3sc-step.disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.42;
}

.osp-3sc-step-separator {
    height: 1px;
    min-width: 28px;
    flex: 1;
    background: var(--osp-divider);
    transition: background-color 300ms ease;
}

.osp-3sc-step-separator.completed {
    background: var(--osp-action);
}

/* Main checkout grid. */
.osp-3sc-checkout-container {
    margin-top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    align-items: start;
    gap: 24px;
}

.osp-3sc-main-content {
    min-width: 0;
    grid-column: 1;
    padding: clamp(28px, 4vw, 46px);
    border-radius: var(--osp-radius-panel);
    background: var(--osp-surface);
}

.osp-3sc-checkout-container > .osp-3sc-sidebar {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.osp-3sc-step-content {
    display: none;
    animation: osp-checkout-step-enter 300ms ease-in both;
}

.osp-3sc-step-content.active {
    display: block;
}

.osp-3sc-step-content.hidden {
    display: none;
}

@keyframes osp-checkout-step-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .osp-3sc-step,
    .osp-3sc-step-number,
    .osp-3sc-step-title,
    .osp-3sc-step-separator {
        transition: none;
    }

    .osp-3sc-step,
    .osp-3sc-step.active {
        transform: none;
    }

    .osp-3sc-step-content {
        animation: none;
    }
}

.osp-3sc-step-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--osp-divider);
    text-align: left;
}

.osp-3sc-step-header h2 {
    margin: 0;
    color: var(--osp-text-primary);
    font-family: var(--osp-font-heading);
    font-size: clamp(25px, 2.5vw, 30px);
    font-stretch: 112.5%;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.15;
}

.osp-3sc-step-header p {
    margin: 8px 0 0;
    color: var(--osp-text-secondary);
    font-size: 15px;
    line-height: 1.55;
}
