/* Ultra-Minimalist Stepper Design */
.transaction-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 940px;
    margin: 1rem auto;
    padding: 0.5rem 20px;
    background: transparent;
}

.stepper-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0.5rem;
    max-width: 120px;
}

.stepper-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.24rem;
    left: calc(50% + 1.25rem);
    width: calc(100% - 2.5rem);
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
    transition: background 0.3s ease;
}

/* Step number circle - ultra minimalist */
.step-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
    border: 2px solid #e2e8f0;
    background: #e2e8f0;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.step-title {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    color: #94a3b8;
    transition: color 0.3s ease;
    line-height: 1.2;
}

/* States */

/* Default state - not started (wyszarzone) - domyślnie wszystkie szare */
.stepper-step .step-number {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: #94a3b8;
}

.stepper-step .step-title {
    color: #94a3b8;
}

.stepper-step.not-started .step-number {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: #94a3b8;
}

.stepper-step.not-started .step-title {
    color: #94a3b8;
}

/* Current step - when selected but no tasks completed yet */
.stepper-step.current .step-number {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.stepper-step.current .step-title {
    color: #3b82f6;
    font-weight: 600;
}

/* In progress - some tasks completed */
.stepper-step.in-progress .step-number {
    background: #ffffff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.stepper-step.in-progress .step-title {
    color: #374151;
}

.stepper-step.in-progress:not(:last-child)::after {
    background: linear-gradient(90deg, #3b82f6 50%, #e2e8f0 50%);
}

/* Completed - all tasks done */
.stepper-step.completed .step-number {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.stepper-step.completed .step-title {
    color: #064e3b;
    font-weight: 600;
}

.stepper-step.completed:not(:last-child)::after {
    background: #10b981;
}

/* Current step highlight */
.stepper-step.current .step-number {
    background: #ffffff;
    border-color: #f59e0b;
    color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
    animation: pulse 2s infinite;
}

.stepper-step.current .step-title {
    color: #92400e;
    font-weight: 600;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.05); }
    100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .transaction-stepper {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .stepper-step {
        max-width: 80px;
        margin-bottom: 1rem;
    }
    
    .stepper-step:not(:last-child)::after {
        display: none;
    }
    
    .step-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .step-title {
        font-size: 0.65rem;
    }
}

/* Transaction type specific colors */
.transaction-stepper[data-transaction-type="1"] .stepper-step.current .step-number {
    border-color: #0094ff; /* Kupno - blue */
    color: #0094ff;
    box-shadow: 0 0 0 4px rgba(0, 148, 255, 0.1);
}

.transaction-stepper[data-transaction-type="2"] .stepper-step.current .step-number {
    border-color: #0bd3b8; /* Sprzedaż - mint */
    color: #0bd3b8;
    box-shadow: 0 0 0 4px rgba(11, 211, 184, 0.1);
}

/* Clickable stepper links */
.stepper-step {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stepper-step:hover .step-number {
    transform: scale(1.1);
}

.stepper-step:hover .step-title {
    color: #374151 !important;
}

/* Active state - Buy theme (blue) or Sell theme (mint) */
.buy-theme .stepper-step.active .step-number {
    color: #fff;
    border-color: #3182ce;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.buy-theme .stepper-step.active .step-title {
    color: #2b6cb0;
}

.buy-theme .stepper-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, #3182ce, #e2e8f0);
}

.sell-theme .stepper-step.active .step-number {
    color: #fff;
    border-color: #48bb78;
    background: linear-gradient(135deg, #48bb78, #38a169);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.sell-theme .stepper-step.active .step-title {
    color: #38a169;
}

.sell-theme .stepper-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, #48bb78, #e2e8f0);
}

/* Completed state */
.buy-theme .stepper-step.completed .step-number {
    color: #fff;
    border-color: #2b6cb0;
    background: #2b6cb0;
}

.buy-theme .stepper-step.completed .step-title {
    color: #2b6cb0;
}

.buy-theme .stepper-step.completed:not(:last-child)::after {
    background: #3182ce;
}

.sell-theme .stepper-step.completed .step-number {
    color: #fff;
    border-color: #38a169;
    background: #38a169;
}

.sell-theme .stepper-step.completed .step-title {
    color: #38a169;
}

.sell-theme .stepper-step.completed:not(:last-child)::after {
    background: #48bb78;
}

/* Responsive design */
@media (max-width: 768px) {
    .transaction-stepper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stepper-step:not(:last-child)::after {
        display: none;
    }
    
    .stepper-step {
        width: 100%;
        flex-direction: row;
        text-align: left;
        padding: 1rem;
        background: #f8fafc;
        border-radius: 8px;
    }
    
    .step-number {
        margin-right: 1rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .step-content {
        flex: 1;
    }
    
    .step-title {
        text-align: left;
        font-size: 1rem;
    }
    
    .step-description {
        text-align: left;
    }
}