/**
 * TPG Addons for WooCommerce - Progress Stepper Styles
 *
 * Styles for the 3-step checkout progress indicator.
 *
 * @package TPG_Addons_WooCommerce
 * @since   2.0.0
 */

/* ==========================================================================
   PROGRESS STEPPER COMPONENT
   ========================================================================== */

.tpg-checkout-progress {
    background: var(--tpg-white, #FFFFFF);
    border-bottom: 1px solid var(--tpg-gray, #D8DDE2);
    padding: var(--tpg-spacing-lg, 24px) var(--tpg-spacing-md, 16px);
    margin-bottom: var(--tpg-spacing-xl, 32px);
}

.tpg-progress-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}


/* ==========================================================================
   STEP ITEM
   ========================================================================== */

.tpg-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.tpg-progress-step__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: opacity var(--tpg-transition-fast, 150ms ease);
}

.tpg-progress-step__link:not(.tpg-progress-step__link--disabled):hover {
    opacity: 0.8;
}

.tpg-progress-step__link--disabled {
    cursor: default;
}


/* ==========================================================================
   STEP DOT / CIRCLE
   ========================================================================== */

.tpg-progress-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tpg-font-body, 'Source Sans Pro', sans-serif);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--tpg-transition-base, 200ms ease);
    position: relative;
    z-index: 1;
    width: 26px;
    height: 26px;
}

.tpg-progress-dot__number {
    line-height: 1 !important;
    font-size: 16px;
}

/* Inactive State */
.tpg-progress-step--inactive .tpg-progress-dot {
    background: var(--tpg-light-gray, #F0F4F7);
    color: var(--tpg-medium-gray, #8A8E90);
    border: 2px solid var(--tpg-gray, #D8DDE2);
}

/* Active State — Figma: #01C0A6 teal circle with white number */
.tpg-progress-step--active .tpg-progress-dot {
    background: var(--tpg-success, #01C0A6);
    color: var(--tpg-white, #FFFFFF);
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(1, 192, 166, 0.3);
}

/* Complete State */
.tpg-progress-step--complete .tpg-progress-dot {
    background: var(--tpg-success, #079D88);
    color: var(--tpg-white, #FFFFFF);
    border: 2px solid transparent;
}

.tpg-progress-step--complete .tpg-progress-dot svg {
    width: 14px;
    height: 14px;
}


/* ==========================================================================
   STEP LABEL
   ========================================================================== */

.tpg-progress-label {
    font-family: var(--tpg-font-body, 'Source Sans Pro', sans-serif);
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    transition: color var(--tpg-transition-fast, 150ms ease);
}

/* Label */
.tpg-progress-label {
    color: #4a4b4c;
}

/* ==========================================================================
   CONNECTING LINE
   ========================================================================== */

.tpg-progress-line {
    flex: 1;
    height: 2px;
    background: var(--tpg-gray, #D8DDE2);
    position: relative;
    top: -13px;
    width: 85px;
    transition: background-color var(--tpg-transition-base, 200ms ease);
}

.tpg-progress-line--complete {
    background: var(--tpg-success, #079D88);
}


/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

/* B1-B2 (up to 599px): Compact stepper */
@media (max-width: 599px) {
    .tpg-checkout-progress {
        padding: var(--tpg-spacing-md, 16px) var(--tpg-spacing-sm, 8px);
    }
    
    .tpg-progress-dot {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .tpg-progress-label {
        font-size: 11px;
    }
    
    .tpg-progress-line {
        top: -8px;
        max-width: 60px;
    }
}


/* ==========================================================================
   ANIMATION
   ========================================================================== */

@keyframes tpg-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(1, 192, 166, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(1, 192, 166, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(1, 192, 166, 0);
    }
}

.tpg-progress-step--active .tpg-progress-dot {
    animation: tpg-pulse 2s infinite;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .tpg-progress-step--active .tpg-progress-dot {
        animation: none;
    }
    
    .tpg-progress-dot,
    .tpg-progress-label,
    .tpg-progress-line {
        transition: none;
    }
}
