/* ==========================================
   IRAN SERVER WIZARD - MODERN MULTI-STEP FORM
   ========================================== */

/* Wizard Container */
.wizard-container {
    position: relative;
    width: 100%;
    min-height: 550px; /* Fixed minimum height to prevent jumping */
    display: flex;
    flex-direction: column;
}

/* Step Indicators - Horizontal Progress Bar */
.wizard-progress {
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.wizard-steps-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* Progress Line */
.wizard-progress-line {
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    z-index: 0;
    overflow: hidden;
}

.wizard-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

/* Individual Step */
.wizard-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wizard-step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
    position: relative;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

/* Step States */
.wizard-step.pending .wizard-step-circle {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border-color: transparent;
}

.wizard-step.active .wizard-step-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow:
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 8px 16px rgba(102, 126, 234, 0.3);
    transform: scale(1.08);
}

.wizard-step.completed .wizard-step-circle {
    background: linear-gradient(135deg, #00c851 0%, #007e33 100%);
    color: white;
    border-color: rgba(0, 200, 81, 0.3);
    box-shadow: 0 4px 12px rgba(0, 200, 81, 0.3);
}

/* Checkmark for completed steps */
.wizard-step.completed .wizard-step-circle::before {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
}

.wizard-step.completed .wizard-step-number {
    display: none;
}

/* Step Icon */
.wizard-step-icon {
    font-size: 1.1rem;
}

/* Step Label */
.wizard-step-label {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 100px;
}

.wizard-step.active .wizard-step-label {
    color: var(--text-primary);
    font-weight: 600;
}

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

/* Step Subtitle */
.wizard-step-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: -0.25rem;
}

/* Wizard Content Area */
.wizard-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.wizard-content {
    display: none;
    animation: fadeInSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-content.active {
    display: block;
}

/* Animations */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOutSlide {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Form Section Styling */
.wizard-form-section {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    min-height: 400px;
}

.wizard-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.wizard-section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wizard-section-title {
    flex: 1;
}

.wizard-section-title h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.wizard-section-title p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Form Groups */
.wizard-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.wizard-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wizard-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-form-group input,
.wizard-form-group select,
.wizard-form-group textarea {
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.wizard-form-group input:focus,
.wizard-form-group select:focus,
.wizard-form-group textarea:focus {
    outline: none;
    background: rgba(0,0,0,0.4);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wizard-form-group input::placeholder,
.wizard-form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Info Boxes */
.wizard-info-box {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-top: 1.5rem;
}

.wizard-info-box.tip {
    background: rgba(255, 165, 0, 0.08);
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.wizard-info-box.success {
    background: rgba(0, 200, 81, 0.08);
    border: 1px solid rgba(0, 200, 81, 0.3);
}

.wizard-info-box.error {
    background: rgba(255, 51, 102, 0.08);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.wizard-info-icon {
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

.wizard-info-box.tip .wizard-info-icon {
    color: #ffa500;
}

.wizard-info-box.success .wizard-info-icon {
    color: #00c851;
}

.wizard-info-box.error .wizard-info-icon {
    color: var(--danger);
}

.wizard-info-content strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.wizard-info-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Navigation Buttons */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.2) 0%, transparent 100%);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.wizard-nav-left,
.wizard-nav-right {
    display: flex;
    gap: 0.75rem;
}

.wizard-btn {
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.1);
}

.wizard-btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

.wizard-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wizard-btn-primary:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.wizard-btn-success {
    background: linear-gradient(135deg, #00c851 0%, #007e33 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 200, 81, 0.3);
}

.wizard-btn-success:hover {
    box-shadow: 0 6px 16px rgba(0, 200, 81, 0.4);
    transform: translateY(-2px);
}

.wizard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Status Indicators */
.wizard-status {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wizard-status.loading {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.wizard-status.success {
    background: rgba(0, 200, 81, 0.08);
    border: 1px solid rgba(0, 200, 81, 0.3);
    color: #00c851;
}

.wizard-status.error {
    background: rgba(255, 51, 102, 0.08);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: var(--danger);
}

/* Review Step - Special Styling */
.wizard-review-section {
    display: grid;
    gap: 1.5rem;
}

.wizard-review-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1.5rem;
}

.wizard-review-card h5 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.wizard-review-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.wizard-review-item:last-child {
    border-bottom: none;
}

.wizard-review-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.wizard-review-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-steps-container {
        max-width: 100%;
    }

    .wizard-step-label {
        font-size: 0.7rem;
        max-width: 80px;
    }

    .wizard-step-circle {
        width: 40px;
        height: 40px;
    }

    .wizard-form-row {
        grid-template-columns: 1fr;
    }

    .wizard-body {
        padding: 1.5rem 1rem;
    }

    .wizard-navigation {
        padding: 1rem;
    }

    .wizard-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .wizard-form-section {
        background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
    }
}
