/* Checkout wizard — fixed gray / green / white palette */

.mks-wizard {
    --mks-wizard-green: #16a34a;
    --mks-wizard-green-dark: #15803d;
    --mks-wizard-green-light: #dcfce7;
    --mks-wizard-orange: #f59e0b;
    --mks-wizard-orange-dark: #d97706;
    --mks-wizard-orange-light: #fef3c7;
    --mks-wizard-gray-50: #f9fafb;
    --mks-wizard-gray-100: #f3f4f6;
    --mks-wizard-gray-200: #e5e7eb;
    --mks-wizard-gray-300: #d1d5db;
    --mks-wizard-gray-400: #9ca3af;
    --mks-wizard-gray-500: #6b7280;
    --mks-wizard-gray-600: #4b5563;
    padding: 0.35rem 0 0.75rem;
    width: 100%;
}

.mks-wizard__card {
    margin: 10px auto;
}

.mks-wizard__container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    direction: rtl;
    padding: 0.8rem 1.25rem 0.65rem;
}

.mks-wizard__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    z-index: 2;
    min-width: 0;
}

.mks-wizard__step-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.mks-wizard__step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mks-wizard-gray-50);
    border: 2px solid var(--mks-wizard-gray-200);
    color: var(--mks-wizard-gray-400);
    transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    z-index: 1;
}

.mks-wizard__step--pending .mks-wizard__step-circle {
    background: #fff;
    border-color: var(--mks-wizard-gray-200);
    color: var(--mks-wizard-gray-400);
}

.mks-wizard__step--active .mks-wizard__step-ring::before,
.mks-wizard__step--waiting .mks-wizard__step-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.25px), #000 calc(100% - 1.75px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.25px), #000 calc(100% - 1.75px));
    animation: mks-wizard-ring-spin 3.6s linear infinite;
    will-change: transform;
}

.mks-wizard__step--active .mks-wizard__step-ring::before {
    background: conic-gradient(
        from 0deg,
        rgba(22, 163, 74, 0) 0deg,
        rgba(22, 163, 74, 0) 200deg,
        rgba(187, 247, 208, 0.2) 255deg,
        rgba(74, 222, 128, 0.72) 310deg,
        #16a34a 342deg,
        rgba(22, 163, 74, 0) 360deg
    );
}

.mks-wizard__step--active .mks-wizard__step-circle {
    background: linear-gradient(145deg, var(--mks-wizard-green) 0%, #22c55e 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(220, 252, 231, 0.9);
    animation: mks-wizard-active-pulse 3.6s ease-in-out infinite;
}

.mks-wizard__step--completed .mks-wizard__step-circle {
    background: var(--mks-wizard-green);
    border-color: var(--mks-wizard-green);
    color: #fff;
}

.mks-wizard__step-icon,
.mks-wizard__check-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

.mks-wizard__step-number {
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
}

.mks-wizard__step-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 6px;
    text-align: center;
    padding: 0 4px;
}

.mks-wizard__step-index {
    display: none;
}

.mks-wizard__step-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mks-wizard-gray-500);
    line-height: 1.45;
    transition: color 0.3s ease;
}

.mks-wizard__step--active .mks-wizard__step-index {
    color: var(--mks-wizard-green);
}

.mks-wizard__step--active .mks-wizard__step-label {
    color: var(--mks-wizard-green-dark);
}

.mks-wizard__step--completed .mks-wizard__step-index {
    color: var(--mks-wizard-gray-400);
}

.mks-wizard__step--completed .mks-wizard__step-label {
    color: var(--mks-wizard-gray-600);
}

.mks-wizard__connector {
    position: absolute;
    top: 21px;
    right: calc(50% + 24px);
    left: calc(-50% + 24px);
    height: 2px;
    background: var(--mks-wizard-gray-200);
    border-radius: 999px;
    z-index: 1;
    transition: background 0.35s ease;
}

.mks-wizard__step--completed .mks-wizard__connector {
    background: var(--mks-wizard-green);
}

.mks-wizard__step--waiting .mks-wizard__step-ring::before {
    background: conic-gradient(
        from 0deg,
        rgba(245, 158, 11, 0) 0deg,
        rgba(245, 158, 11, 0) 200deg,
        rgba(253, 230, 138, 0.25) 255deg,
        rgba(251, 191, 36, 0.75) 310deg,
        #d97706 342deg,
        rgba(245, 158, 11, 0) 360deg
    );
}

.mks-wizard__step--waiting .mks-wizard__step-circle {
    background: linear-gradient(145deg, var(--mks-wizard-orange) 0%, #fbbf24 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(254, 243, 199, 0.9);
    animation: mks-wizard-waiting-pulse 3.6s ease-in-out infinite;
}

.mks-wizard__step--waiting .mks-wizard__step-index {
    color: var(--mks-wizard-orange-dark);
}

.mks-wizard__step--waiting .mks-wizard__step-label {
    color: var(--mks-wizard-orange-dark);
}

@keyframes mks-wizard-waiting-pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(254, 243, 199, 0.85);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(254, 243, 199, 0.28);
    }
}

@keyframes mks-wizard-ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes mks-wizard-active-pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(220, 252, 231, 0.9);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(220, 252, 231, 0.28);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mks-wizard__step--active .mks-wizard__step-ring::before,
    .mks-wizard__step--waiting .mks-wizard__step-ring::before {
        animation: none;
    }

    .mks-wizard__step--active .mks-wizard__step-circle,
    .mks-wizard__step--waiting .mks-wizard__step-circle {
        animation: none;
    }
}

@media (max-width: 768px) {
    .mks-wizard {
        padding: 0.2rem 0 0.55rem;
    }

    .mks-wizard__container {
        padding: 0.65rem 0.55rem 0.5rem;
    }

    .mks-wizard__step-ring {
        width: 38px;
        height: 38px;
    }

    .mks-wizard__step-circle {
        width: 30px;
        height: 30px;
    }

    .mks-wizard__step-icon,
    .mks-wizard__check-icon {
        width: 14px;
        height: 14px;
    }

    .mks-wizard__step-meta {
        margin-top: 5px;
    }

    .mks-wizard__step-label {
        font-size: 11px;
        font-weight: 600;
    }

    .mks-wizard__connector {
        top: 18px;
        right: calc(50% + 21px);
        left: calc(-50% + 21px);
        height: 2px;
    }
}
