/**
 * Mircato Pro - Multi-Step Checkout Visuals
 * Design: Premium Floating Pills / Cards
 */

.mircato-checkout-steps-wrapper {
    width: 100%;
    margin: 0 auto 40px;
    padding: 0 15px;
    position: relative;
    z-index: 10;
    max-width: 1200px;
    /* Contain width */
    text-align: center;
    /* Center the inline-flex container */
}

/* Reset List */
ul.mircato-checkout-steps {
    list-style: none;
    margin: 0;
    padding: 16px 40px;
    /* Increased Padding */
    display: inline-flex;
    /* Shrink to fit items */
    justify-content: center;
    align-items: center;
    gap: 30px;
    /* Increased Gap */
    flex-wrap: wrap;

    /* 3D Premium Container Style */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-bottom: 5px solid #d4d4d4;
    /* Thicker 3D Border */
    border-radius: 80px;
    /* Larger radius */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

/* Step Item - Reverted to Clean Pills */
.mircato-checkout-steps li {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    /* Transparent inside the white container? Or maybe subtle grey? Let's try transparent or very light */
    padding: 10px 24px;
    /* Larger hit area */
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    color: #999;
    font-family: var(--font-primary, sans-serif);
    font-weight: 600;
    /* Bolder text */
    font-size: 16px;
    /* Larger text (was 14px) */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
}

/* Links */
.mircato-checkout-steps li a.step-link,
.mircato-checkout-steps li .step-link {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

/* Step Number */
.mircato-checkout-steps .step-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    /* Larger circle (was 24px) */
    height: 32px;
    /* Larger circle */
    border-radius: 50%;
    background: #f0f0f0;
    color: #777;
    margin-right: 14px;
    font-size: 14px;
    /* Larger number font (was 11px) */
    font-weight: 800;
    transition: all 0.3s ease;
}

/* Active State */
.mircato-checkout-steps li.active {
    background: var(--color-primary, #000);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    /* Soft shadow for the active pill */
    border: none;
    transform: none;
    /* Keep it grounded inside the container */
}

.mircato-checkout-steps li.active .step-number {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Completed State */
.mircato-checkout-steps li.completed {
    color: var(--color-primary, #000);
    background: transparent;
}

.mircato-checkout-steps li.completed .step-number {
    background: var(--color-success, #28a745);
    color: #fff;
    /* Optional: Replace number with checkmark content if using font icons, 
       but for now we keep number or background color change */
}

/* Hover Effects */
.mircato-checkout-steps li:hover:not(.active) {
    background: #f9f9f9;
    color: var(--color-primary, #000);
}

/* Mobile Responsiveness */
/* Mobile Responsiveness — Focus on extreme compactness */
@media (max-width: 768px) {
    ul.mircato-checkout-steps {
        gap: 6px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
        padding: 6px 10px !important;
        justify-content: center !important;
        border-radius: 60px !important;
        display: inline-flex !important;
        width: auto !important;
        min-width: unset !important;
        border-bottom-width: 3px !important; /* Smaller 3D effect on mobile */
        max-width: 100% !important;
        overflow: visible !important;
    }


    .mircato-checkout-steps-wrapper {
        padding: 0 10px !important;
        margin-bottom: 20px !important;
        text-align: center !important;
    }

    .mircato-checkout-steps li {
        padding: 6px 10px !important;
        flex: 0 1 auto !important;
        font-size: 11px !important;
        min-width: 0 !important;
    }

    /* Compact mode: Only show label for active step. 
       Targeting ALL possible structures (Blocks, Classic, JS-Injected). 
       We hide everything in the li that isn't the number circle for INACTIVE steps. */
    .mircato-checkout-steps li:not(.active) .step-label,
    .mircato-checkout-steps li:not(.active) span:nth-child(2),
    .mircato-checkout-steps li:not(.active) span:last-child,
    .mircato-checkout-steps li:not(.active) a span:nth-child(2),
    .mircato-checkout-steps li:not(.active) a span:last-child {
        display: none !important;
    }

    /* Safety net: Hide text nodes in inactive steps */
    .mircato-checkout-steps li:not(.active) {
        font-size: 0 !important;
        line-height: 0 !important;
        letter-spacing: 0 !important;
    }



    .mircato-checkout-steps .step-number,
    .mircato-checkout-steps span:first-child,
    .mircato-checkout-steps a span:first-child {
        width: 24px !important;
        height: 24px !important;
        margin-right: 0 !important; /* No label, no margin */
        font-size: 11px !important;
        min-width: 24px !important;
        display: flex !important; /* Force restore display */
        line-height: 1 !important;
    }


    .mircato-checkout-steps li.active {
        padding: 8px 14px !important;
    }

    .mircato-checkout-steps li.active .step-number {
        margin-right: 8px !important; /* Label exists, need margin */
        width: 20px !important; /* Slightly smaller number circle to balance with label */
        height: 20px !important;
    }

    /* Completed step success circle */
    .mircato-checkout-steps li.completed .step-number {
        background: #28a745 !important;
        color: #fff !important;
    }
}