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

.wizard-stepper {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    transition: all 0.2s;
}

.wizard-step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
    margin-bottom: 0.75rem;
}

.wizard-step.active .wizard-step-icon {
    background: #198754;
    color: white;
}

.wizard-step.completed .wizard-step-icon {
    background: #198754;
    color: white;
}

.wizard-step-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s;
}

.wizard-step.active .wizard-step-label {
    color: #198754;
    font-weight: 600;
}

.wizard-step.completed .wizard-step-label {
    color: #198754;
}

/* Compact wizard stepper icons */
.wizard-step-icon-compact {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Clickable completed steps (all users can navigate back) */
.wizard-step.completed {
    cursor: pointer;
}

.wizard-step.completed .wizard-step-icon {
    transition: transform 0.2s, box-shadow 0.2s;
}

.wizard-step.completed:hover .wizard-step-icon {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.35);
}

.wizard-step.completed:hover .wizard-step-label {
    text-decoration: underline;
}

/* Free-navigation mode — authenticated users with existing VoIP services
   can click any step, including future ones */
.wizard-steps-free-nav .wizard-step {
    cursor: pointer;
}

.wizard-steps-free-nav .wizard-step .wizard-step-icon {
    transition: transform 0.2s, box-shadow 0.2s;
}

.wizard-steps-free-nav .wizard-step:not(.active):hover .wizard-step-icon {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.35);
}

.wizard-steps-free-nav .wizard-step:not(.active):hover .wizard-step-label {
    text-decoration: underline;
}

/* =============================================================================
   WIZARD LOADING SKELETON
   ============================================================================= */

/* Reuses the skeleton-loading keyframe defined in ORDER SUMMARY LOADING STATE */

.wizard-skeleton-block {
    display: block;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #e8e8e8 40px,
        #f0f0f0 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite linear;
}

.wizard-skeleton-card {
    height: 290px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #e8e8e8 40px,
        #f0f0f0 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite linear;
}

/* =============================================================================
   ORDER SUMMARY PANEL
   ============================================================================= */

.order-summary-wrapper {
    position: sticky;
    top: 20px;
}

/* =============================================================================
   ORDER SUMMARY LOADING STATE
   ============================================================================= */

/* Skeleton loader animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Loading state for summary items */
#purchase_summary.loading .summary_item {
    position: relative;
    color: transparent !important;
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #e0e0e0 40px,
        #f0f0f0 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 4px;
}

/* Loading state for total price */
#monthly_cost.loading {
    position: relative;
    color: transparent !important;
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #e0e0e0 40px,
        #f0f0f0 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 4px;
    display: inline-block;
    min-width: 80px;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */

/* Tablet and below */
@media (max-width: 991px) {
    .order-summary-wrapper {
        position: static;
        margin-top: 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .wizard-stepper {
        overflow-x: auto;
    }

    .wizard-step-label {
        display: none;
    }

    .wizard-step-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* =============================================================================
   PLAN CARD STYLING
   ============================================================================= */

.plan-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.plan-card.selected {
    border-color: #198754;
    box-shadow: 0px 0px 12px 4px rgba(25, 135, 84, 0.87);
}

.legacy-plan-card {
    opacity: 0.9;
}

/* =============================================================================
   PLAN QUANTITY INPUT
   ============================================================================= */

/* Remove spinner buttons from number inputs - Generic class for all VoIP card quantity inputs */
.voip-quantity-input::-webkit-outer-spin-button,
.voip-quantity-input::-webkit-inner-spin-button,
.plan-quantity::-webkit-outer-spin-button,
.plan-quantity::-webkit-inner-spin-button,
.cd-quantity::-webkit-outer-spin-button,
.cd-quantity::-webkit-inner-spin-button,
.trunk-channels::-webkit-outer-spin-button,
.trunk-channels::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.voip-quantity-input,
.plan-quantity,
.cd-quantity,
.trunk-channels {
    -moz-appearance: textfield;
}

/* =============================================================================
   WIZARD NAVIGATION BUTTONS
   ============================================================================= */

.wizard-nav-buttons {
    padding: 1.5rem 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 2rem;
}

.wizard-nav-buttons .btn {
    min-width: 120px;
    padding: 0.625rem 1.5rem;
    font-weight: 500;
}

/* =============================================================================
   WIZARD STEP CONTAINERS
   ============================================================================= */

.wizard-step-container {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   VOIP VALIDATION - FREE DID ENTITLEMENT DISPLAY
   ============================================================================= */

.free-did-entitlement {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.free-did-entitlement i {
    font-size: 1.25rem;
    color: #155724;
}

.free-did-entitlement strong {
    color: #155724;
}

.free-did-entitlement span {
    color: #155724;
}

.free-did-entitlement .progress {
    background-color: rgba(255, 255, 255, 0.5);
}

.free-did-entitlement small {
    margin-top: 0.5rem;
}
