
:host {
    --wizard-bg: white;
    --wizard-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --wizard-radius: 8px;

    --step-inactive-bg: #f3f4f6;
    --step-inactive-color: #9ca3af;
    --step-active-ring: rgba(59, 130, 246, 0.1);

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --border-default: #e5e7eb;
    --border-hover: #d1d5db;
    --border-strong: #9ca3af;

    --btn-secondary-bg: #f3f4f6;
    --btn-secondary-color: #374151;
    --btn-secondary-disabled: #f9fafb;
    --btn-secondary-hover: #e5e7eb;
}

.gb-wizard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.wizard-header {
    background: var(--wizard-bg);
    border-radius: var(--wizard-radius);
    padding: 8px 12px;
    box-shadow: var(--wizard-shadow);
}

.wizard-steps-container {
    background: var(--wizard-bg);
    border-radius: var(--wizard-radius);
    padding:8px 12px;
    box-shadow: var(--wizard-shadow);
}

.wizard-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;

    [dir="rtl"] & {
        flex-direction: row-reverse;
    }
}

.wizard-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    &:focus-visible {
        outline: 2px solid var(--action-primary-default);
        outline-offset: 2px;
        border-radius: 4px;
    }

    &.disabled {
        cursor: not-allowed;
        opacity: 0.5;
        pointer-events: none;
    }

    &.completed {
        cursor: pointer;
        pointer-events: auto;

        &:hover .step-number {
            transform: scale(1.05);
        }
    }

    &.active {
        cursor: default;
    }

    &:not(.disabled):not(.active):hover .step-number {
        transform: scale(1.05);
    }
}

.step-indicator {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    background: var(--step-inactive-bg); 
    color: var(--step-inactive-color); 

    .wizard-step.active & {
        background: var(--action-primary-default);
        color: white;
        box-shadow: 0 0 0 4px var(--step-active-ring); 
    }

    .wizard-step.completed & {
        background: var(--action-primary-default);
        color: white;
    }
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 2px;
}

.step-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary); 
    line-height: 1.4;

    .wizard-step.active & {
        color: var(--text-primary);
    }

    
    .wizard-step.completed & {
        color: var(--text-primary);
    }

    
}

.step-subtitle {
    font-size: 11px;
    color: var(--text-muted); 
    line-height: 1.4;

    .wizard-step.active & {
        color: var(--text-secondary);
    }

    
}

.step-connector {
    flex: 1;
    height: 1px;
    background: var(--border-default); 
    margin: 16px 10px 0 10px;
    align-self: flex-start;

    [dir="rtl"] & {
        margin: 24px 16px 0 16px;
    }
}

.wizard-main-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;

    [dir="rtl"] & {
        flex-direction: row-reverse;
    }
}

.wizard-content {
    flex: 1;
    background: var(--wizard-bg);
    border-radius: var(--wizard-radius);
    padding: 14px;
    min-height: 200px;
    max-height: 52dvh;
    overflow-y: auto;
    box-shadow: var(--wizard-shadow);
}

.wizard-sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.wizard-actions {
    background: var(--wizard-bg); 
    border-radius: var(--wizard-radius);
    padding: 12px;
    box-shadow: var(--wizard-shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;

    .btn {
        padding: 8px 14px;
        border-radius: 6px;
        font-weight: 500;
        font-size: 14px;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;

        [dir="rtl"] & {
            flex-direction: row-reverse;
        }

        mat-icon {
            font-size: 18px;
            width: 18px;
            height: 18px;
            line-height: 18px;
        }

        &:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        &.btn-primary {
            background: var(--action-primary-default);
            color: white;

            &:hover:not(:disabled) {
                box-shadow: 0 2px 4px var(--step-active-ring); 
            }
        }

        &.btn-secondary {
            background: var(--btn-secondary-bg); 
            color: var(--btn-secondary-color); 
            border: 1px solid var(--border-default); 

            &:hover:not(:disabled) {
                background: var(--btn-secondary-hover); 
                border-color: var(--border-hover); 
            }

            &:disabled {
                opacity: 0.5;
                cursor: not-allowed;
                background: var(--btn-secondary-disabled); 
            }
        }

        &.btn-outline {
            background: transparent;
            color: var(--btn-secondary-color); 
            border: 1px solid var(--border-hover); 

            &:hover:not(:disabled) {
                background: var(--btn-secondary-disabled); 
                border-color: var(--border-strong); 
            }
        }

        &.btn-full {
            width: 100%;
        }
    }
}

.step-info {
    background: var(--wizard-bg); 
    border-radius: var(--wizard-radius);
    padding: 10px 12px;
    box-shadow: var(--wizard-shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;

    [dir="rtl"] & {
        text-align: right;
    }
}

.step-number-display {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary); 
}

.step-description {
    font-size: 13px;
    color: var(--text-secondary); 
    line-height: 1.5;
}

// Responsive
@media (max-width: 1200px) {
    .wizard-main-content {
        flex-direction: column;

        [dir="rtl"] & {
            flex-direction: column;
        }
    }

    .wizard-sidebar {
        width: 100%;
        flex-direction: row;

        .wizard-actions {
            flex: 1;
            flex-direction: row;

            [dir="rtl"] & {
                flex-direction: row-reverse;
            }

            .btn {
                flex: 1;
            }
        }

        .step-info {
            flex: 1;
        }
    }
}

@media (max-width: 768px) {
    .wizard-steps {
        flex-direction: column;
        gap: 16px;
    }

    .step-connector {
        display: none;
    }

    .wizard-sidebar {
        flex-direction: column;

        .wizard-actions {
            flex-direction: column;
        }
    }
}