﻿.nxt-wizard {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 177px);
    background: #f5f5f5;
}

.nxt-wizard-body {
    flex: 1 0 auto;
}

.nxt-wizard-footer {
    position: sticky;
    bottom: 0;
    background: #f5f5f5;
    padding: 0.75rem 0;
    border-top: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    z-index: 3;
}

    .nxt-wizard-footer.is-scrolled {
        background: #eeeeee;
        border-top-color: #e0e0e0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    }



.nxt-wizard-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px; /* px-4 */
    margin-bottom: 1.5rem;
}

.nxt-wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
    cursor: pointer;
    user-select: none;
}

    .nxt-wizard-step:hover {
        opacity: 0.9;
    }

.nxt-wizard-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 300ms ease;
    background: #eef0f2;
    color: #6b7280;
    border: none;
}

    .nxt-wizard-step-icon .rz-icon {
        font-size: 20px;
        line-height: 1;
    }

.nxt-wizard-step-title {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: color 200ms ease;
    white-space: nowrap;
    color: #6b7280; /* muted */
}

.nxt-wizard-step.is-active .nxt-wizard-step-icon {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.30); /* shadow-primary/30 */
}

.nxt-wizard-step.is-active .nxt-wizard-step-title {
    color: #2563eb;
}

.nxt-wizard-step.is-completed .nxt-wizard-step-icon {
    background: #16a34a;
    color: #ffffff;
}

.nxt-wizard-step.is-completed .nxt-wizard-step-title {
    color: #16a34a;
}

.nxt-wizard-step.is-disabled {
    opacity: 1;
    cursor: default;
    pointer-events: none;
}

    .nxt-wizard-step.is-disabled .nxt-wizard-step-icon {
        background: #eef0f2;
        color: #9ca3af;
    }

    .nxt-wizard-step.is-disabled .nxt-wizard-step-title {
        color: #9ca3af;
    }

.nxt-wizard-step-connector {
    flex: 1;
    height: 2px;
    margin: 0 16px;
    position: relative;
}

    .nxt-wizard-step-connector::before {
        content: "";
        position: absolute;
        inset: 0;
        background: #dee2e6;
        border-radius: 999px;
    }

    .nxt-wizard-step-connector::after {
        content: "";
        position: absolute;
        inset: 0;
        width: 0%;
        background: #2563eb;
        border-radius: 999px;
        transition: width 500ms ease;
    }

    .nxt-wizard-step-connector.is-completed::after {
        width: 100%;
    }

.nxt-wizard-step.is-error .nxt-wizard-step-icon {
    background: #dc2626; /* destructive */
    color: #ffffff;
    animation: nxt-shake 450ms ease-in-out;
}

.nxt-wizard-step.is-error .nxt-wizard-step-title {
    color: #dc2626;
}

/* Shake animation (subtle, like "animate-shake") */
@keyframes nxt-shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-2px);
    }

    40% {
        transform: translateX(2px);
    }

    60% {
        transform: translateX(-2px);
    }

    80% {
        transform: translateX(2px);
    }
}

/* LOADING: primary circle + spinner + pulsing ring */
.nxt-wizard-step.is-loading .nxt-wizard-step-icon {
    background: #2563eb; /* primary */
    color: #ffffff;
    position: relative;
    overflow: visible; /* allow ring */
}

    /* Pulse ring behind the icon (like bg-primary/20 animate-pulse-ring) */
    .nxt-wizard-step.is-loading .nxt-wizard-step-icon::before {
        content: "";
        position: absolute;
        inset: -8px; /* ring size */
        border-radius: 999px;
        background: rgba(37, 99, 235, 0.20);
        animation: nxt-pulse-ring 1.2s ease-out infinite;
        z-index: 0;
    }

    /* Make icon sit above the ring */
    .nxt-wizard-step.is-loading .nxt-wizard-step-icon > * {
        position: relative;
        z-index: 1;
    }

    /* If you show a RadzenIcon for loading (e.g. "refresh"), spin it */
    .nxt-wizard-step.is-loading .nxt-wizard-step-icon .rz-icon {
        animation: nxt-spin 900ms linear infinite;
    }

/* Pulse ring animation */
@keyframes nxt-pulse-ring {
    0% {
        transform: scale(0.85);
        opacity: 0.65;
    }

    70% {
        transform: scale(1.20);
        opacity: 0.00;
    }

    100% {
        transform: scale(1.20);
        opacity: 0.00;
    }
}

/* Spinner animation */
@keyframes nxt-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* LOADING label in primary (same as React) */
.nxt-wizard-step.is-loading .nxt-wizard-step-title {
    color: #2563eb;
}



/* ===== Generic wizard busy overlay ===== */

.nxt-busy-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Top callout bar */
.nxt-busy-callout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
    font-weight: 600;
}

/* Content wrapper */
.nxt-busy-content {
    position: relative;
}

    /* Blur/dim underlying content when busy */
    .nxt-busy-content.is-busy > *:not(.nxt-busy-overlay) {
        filter: blur(2px);
        opacity: 0.35;
        pointer-events: none;
        user-select: none;
        transition: filter 200ms ease, opacity 200ms ease;
    }

/* Overlay */
.nxt-busy-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

/* Center card */
.nxt-busy-card {
    width: min(520px, 92%);
    padding: 22px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(222, 226, 230, 0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    backdrop-filter: blur(6px);
}

.nxt-busy-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px auto;
    border-radius: 999px;
    background: #eef0f2;
    display: grid;
    place-items: center;
}

.nxt-busy-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-top: 2px;
}

.nxt-busy-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

/* Dots */
.nxt-busy-dots {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

    .nxt-busy-dots span {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: rgba(37, 99, 235, 0.55);
        animation: nxt-busy-dot 900ms ease-in-out infinite;
    }

        .nxt-busy-dots span:nth-child(2) {
            animation-delay: 150ms;
        }

        .nxt-busy-dots span:nth-child(3) {
            animation-delay: 300ms;
        }

@keyframes nxt-busy-dot {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Spinner */
.nxt-busy-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 3px solid rgba(37, 99, 235, 0.20);
    border-top-color: #2563eb;
    animation: nxt-busy-spin 900ms linear infinite;
    display: inline-block;
}

    .nxt-busy-spinner.lg {
        width: 22px;
        height: 22px;
        border-width: 3px;
    }

@keyframes nxt-busy-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
