/* Checkout Progress Wrapper */
.aa-checkout-progress-wrapper {
    max-width: 900px;
    margin: 40px auto 50px auto;
    padding: 0 20px;
    font-family: inherit;
}

/* Headers */
.aa-checkout-header {
    text-align: center;
    margin-bottom: 40px;
}
.aa-checkout-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
}
.aa-checkout-header p {
    font-size: 16px;
    color: #6b7280;
}

/* Success Header Animation */
.aa-success-header {
    margin-bottom: 50px;
}
.aa-success-animation {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
}
.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #10b981; /* Green */
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #10b981;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px #10b981; }
}

/* Active Pulse Animation */
.aa-success-animation {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px auto;
}
.aa-success-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 185, 129, 0.4);
    border-radius: 50%;
    z-index: -1;
    animation: successPulse 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
    animation-delay: 1.2s; /* Start after initial draw */
}
@keyframes successPulse {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Progress Bar Container */
.aa-checkout-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align to top so the line can align with icons easily */
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

/* Lines between steps */
.aa-progress-line {
    flex: 1;
    height: 4px; /* Thicker premium line */
    background: #e5e7eb;
    margin: 0 -15px; /* Overlap behind circles */
    margin-top: 25px; /* Half of 55px icon height (27.5px) minus half of 4px line height (2px) = 25.5px */
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 4px;
}
.aa-progress-line.is-complete::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #f38624, #f59e42); /* Premium gradient */
    border-radius: 4px;
    animation: loadLine 0.6s ease-out forwards;
}
@keyframes loadLine {
    from { width: 0; }
    to { width: 100%; }
}

/* Individual Steps */
.aa-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 150px;
    position: relative;
    z-index: 2;
}

/* Step Icons */
.aa-step-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #f9fafb;
    border: 2px solid #f3f4f6; /* Thinner border */
    color: #9ca3af;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    transition: all 0.4s ease;
}

.aa-progress-step.is-active .aa-step-icon {
    border-color: #f38624;
    color: #fff;
    background: #f38624;
    box-shadow: 0 0 0 6px rgba(243, 134, 36, 0.15); /* Stronger glow to show it is active */
    transform: scale(1.1); /* Slightly larger */
}

.aa-progress-step.is-complete .aa-step-icon {
    border-color: #f38624;
    background: #f38624;
    color: #fff;
}

/* Premium Animated Truck Icon */
.aa-truck-anim {
    animation: driveInAndBounce 2.5s ease-out forwards;
}

@keyframes driveInAndBounce {
    0% { transform: translateX(-30px); opacity: 0; }
    40% { transform: translateX(5px); opacity: 1; }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

/* Step Content */
.aa-step-content {
    display: flex;
    flex-direction: column;
}

.aa-step-title {
    font-size: 14px; /* Slightly smaller, more refined */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
    margin-bottom: 5px;
    transition: color 0.3s;
}
.aa-step-desc {
    font-size: 13px;
    color: #d1d5db; /* Lighter text for inactive desc */
}

.aa-progress-step.is-active .aa-step-title {
    color: #111;
}
.aa-progress-step.is-active .aa-step-desc {
    color: #6b7280;
}
.aa-progress-step.is-complete .aa-step-title {
    color: #f38624;
}
.aa-progress-step.is-complete .aa-step-desc {
    color: #f38624;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .aa-checkout-header h2 {
        font-size: 24px;
    }
    .aa-checkout-header p {
        font-size: 14px;
    }
    .aa-step-desc {
        display: none;
    }
    .aa-step-title {
        font-size: 10px; /* Much smaller for 320px screens */
        letter-spacing: 0;
    }
    .aa-step-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    .aa-step-icon svg {
        width: 16px;
        height: 16px;
    }
    .aa-progress-line {
        margin-top: 18px; /* Half of 40px icon - 2px */
        margin-left: -5px;
        margin-right: -5px;
    }
    .aa-checkout-progress-wrapper {
        padding: 0 10px;
        margin-top: 20px;
        margin-bottom: 30px;
    }
    .aa-progress-step {
        width: 90px; /* Prevent overflow */
    }
}
