/* ===== Generate Wizard ===== */
.modal-wizard {
    max-width: 700px;
}

/* Step indicator */
.wizard-steps {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.wizard-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s;
}

.wizard-step-dot.active {
    background: var(--accent);
}

.wizard-step-dot.completed {
    background: var(--success);
}

.wizard-step-bar {
    flex: 1;
    height: 2px;
    background: var(--border);
}

/* Step panels */
.wizard-panel {
    display: none;
    padding: 24px 20px;
}

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

.wizard-panel h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.wizard-panel .step-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

/* Asset type cards */
.asset-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.asset-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
}

.asset-type-card:hover {
    border-color: var(--accent-muted);
    background: var(--bg-hover);
}

.asset-type-card.selected {
    border-color: var(--accent);
    background: var(--accent-muted);
}

.asset-type-card .type-icon {
    font-size: 28px;
    line-height: 1;
}

.asset-type-card .type-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.asset-type-card .type-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Prompt input */
.prompt-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.prompt-textarea:focus {
    border-color: var(--accent);
}

.prompt-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Provider checkboxes */
.provider-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.provider-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.provider-option:hover {
    background: var(--bg-hover);
}

.provider-option.selected {
    border-color: var(--accent);
    background: var(--accent-muted);
}

.provider-option.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
}

.provider-option input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.provider-option .provider-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.provider-option .provider-status {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.provider-status.available {
    color: var(--success);
}

.provider-status.unavailable {
    color: var(--danger);
}

/* Provider wrapper and model selector */
.provider-option-wrapper {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.provider-option-wrapper .provider-option {
    border: none;
    border-radius: 0;
}

.model-selector {
    padding: 8px 16px 12px 44px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
}

.model-select-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.model-dropdown {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.model-dropdown:focus {
    border-color: var(--accent);
}

.model-loading {
    font-size: 12px;
    color: var(--text-muted);
}

/* Generation progress */
.gen-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.gen-result-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-primary);
    transition: border-color 0.2s;
}

.gen-result-card.completed {
    cursor: pointer;
}

.gen-result-card.completed:hover {
    border-color: var(--accent-muted);
}

.gen-result-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-muted);
}

.gen-result-card.failed {
    opacity: 0.6;
}

.gen-result-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gen-result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gen-result-image .spinner {
    width: 40px;
    height: 40px;
}

.gen-result-footer {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gen-result-provider {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.gen-result-status {
    font-size: 11px;
}

.gen-result-status.pending {
    color: var(--warning);
}

.gen-result-status.completed {
    color: var(--success);
}

.gen-result-status.failed {
    color: var(--danger);
}

.gen-error-msg {
    font-size: 12px;
    color: var(--danger);
    padding: 8px 12px;
    text-align: center;
}

/* Wizard footer */
.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
}

.wizard-footer .btn + .btn {
    margin-left: 8px;
}

/* Save form (step 6) */
.save-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.save-preview-img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.save-preview-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.save-form {
    flex: 1;
}

/* Regenerate section */
.regen-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.regen-section h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.regen-prompt {
    display: flex;
    gap: 8px;
}

.regen-prompt input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.regen-prompt input:focus {
    border-color: var(--accent);
}
