/**
 * Checkout Progress Steps - Frontend Styling
 */

.cps-progress-wrapper {
    width: 100%;
    margin: 30px auto;
    padding: 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

.cps-progress-wrapper * {
    box-sizing: border-box;
}

.cps-progress-container {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 0;
}

/* Connecting Line - Background (Inactive) */
.cps-progress-line-bg {
    position: absolute;
    top: 22px; /* Half of circle height (44px / 2) */
    left: 16.6667%;
    right: 16.6667%;
    height: 4px;
    background-color: var(--cps-line-color);
    border-radius: 2px;
    z-index: 1;
    transform: translateY(-50%);
    overflow: hidden;
}

/* Connecting Line - Filled (Active) - Nested inside bg to inherit height */
.cps-progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* Dynamic width 0%, 50%, or 100% via inline styles */
    background-color: var(--cps-active-color);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Steps Container */
.cps-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Single Step Column */
.cps-step {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

/* Step Circle */
.cps-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid var(--cps-inactive-color);
    color: #999999;
    font-size: 16px;
    font-weight: 700;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 auto !important;
}

/* Step Label */
.cps-step-label {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--cps-text-color);
    opacity: 0.5;
    text-align: center !important;
    max-width: 150px;
    margin-left: auto !important;
    margin-right: auto !important;
    transition: all 0.4s ease;
    word-wrap: break-word;
}

/* Active Step Styling */
.cps-step-active .cps-step-circle {
    background-color: var(--cps-active-color);
    border-color: var(--cps-active-color);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(255, 255, 255, 1);
    transform: scale(1.08);
}

.cps-step-active .cps-step-label {
    opacity: 1;
    font-weight: 700;
}

/* Step Link Wrapper */
.cps-step-link {
    text-decoration: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    color: inherit !important;
    width: 100% !important;
    cursor: pointer !important;
    background: transparent !important;
    margin: 0 auto !important;
}

/* Micro-animations and hover effects (subtle zoom on hover for clickable items) */
.cps-step-link:hover .cps-step-circle {
    background-color: var(--cps-hover-color) !important;
    border-color: var(--cps-hover-color) !important;
    color: #ffffff !important;
    transform: scale(1.12);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.cps-step-active .cps-step-link:hover .cps-step-circle {
    background-color: var(--cps-hover-color) !important;
    border-color: var(--cps-hover-color) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(255, 255, 255, 1);
}

/* Responsive styling for small screens */
@media (max-width: 480px) {
    .cps-step-circle {
        width: 36px;
        height: 36px;
        border-width: 2px;
        font-size: 14px;
    }
    
    .cps-progress-line-bg {
        top: 18px; /* 36px / 2 */
        height: 3px;
    }
    
    .cps-step-label {
        font-size: 11px;
        margin-top: 8px;
        max-width: 90px;
    }
}
