/*
 * Minimal WooCommerce Keen Overrides
 * Improved connectors and accordion chevron behavior
 */

/* Active/completed step icon background */
.checkout-steps .checkout-step.active .step-icon,
.checkout-steps .checkout-step.completed .step-icon {
    background: #C39D63 !important;
}

/* Step flow connectors: placed relative to the center of each step-icon */
.checkout-steps {
    position: relative;
}

.checkout-steps .checkout-step {
    position: relative;
    padding-top: 0.5rem;
}

.checkout-steps .checkout-step::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 50%;
    /* start after icon */
    width: 100%;
    /* span to the next step */
    height: 2px;
    background: var(--bs-gray-300, #e4e6ef);
    z-index: 0;
}

.checkout-steps .checkout-step:last-child::after {
    display: none;
}

.checkout-steps .checkout-step.completed::after {
    background: #C39D63;
}

/* ensure step icon sits above connector */
.checkout-steps .step-icon {
    z-index: 2;
}

/* Responsive & improved styling for checkout steps header */
.checkout-steps-header .checkout-steps {
    gap: .5rem;
}

.checkout-steps-header .checkout-step .step-icon {
    width: 40px;
    height: 40px;
    transition: background-color .25s, color .25s, box-shadow .25s;
}

.checkout-steps-header .checkout-step.completed .step-icon {
    background: #a38f61;
}

.checkout-steps-header .checkout-step:not(.completed) .step-icon {
    background: #f1f3f5;
}

.checkout-steps-header .checkout-step.active .step-icon {
    box-shadow: 0 0 0 4px rgba(163, 143, 97, .15);
}

.checkout-steps-header .checkout-step .step-label {
    font-size: .75rem;
    letter-spacing: .5px;
}

.checkout-steps-header .checkout-step.completed .step-label {
    color: #222;
}

.checkout-steps-header .checkout-step:not(.completed) .step-label {
    color: #6c757d;
}

/* Mobile: show only current step (others hidden but keep structure for a11y) */
@media (max-width: 575.98px) {
    .checkout-steps-header {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    .checkout-steps-header .checkout-steps {
        justify-content: center;
    }

    .checkout-steps-header .checkout-step {
        flex: 0 0 auto;
        display: none;
    }

    .checkout-steps-header .checkout-step.active {
        display: block;
    }

    .checkout-steps-header .checkout-step-inner {
        flex-direction: row;
        gap: .75rem;
    }

    .checkout-steps-header .checkout-step .step-label {
        font-size: .85rem;
    }
}

/* Tablet: compact labels */
@media (min-width:576px) and (max-width: 767.98px) {
    .checkout-steps-header .checkout-step .step-label {
        font-size: .7rem;
    }

    .checkout-steps-header .checkout-step .step-icon {
        width: 36px;
        height: 36px;
    }
}

/* Progress bar underline */
.checkout-steps-header .checkout-steps {
    position: relative;
}

.checkout-steps-header .checkout-step {
    z-index: 1;
}

@media (max-width:575.98px) {

    .checkout-steps-header .checkout-steps:before,
    .checkout-steps-header .checkout-steps:after {
        display: none;
    }

    .checkout-steps-header .checkout-step.active::after {
        display: none;
    }
}
