/*
 * Setup Wizard - Wizard-specific styles only.
 * Base styles (.btn, .form-group, etc.) come from admin.css which is loaded
 * on the same page. This file only adds wizard-specific components.
 */

/* Wizard Layout */
.wizard-container {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wizard-header {
    background: linear-gradient(135deg, var(--primary-color, #2970FF) 0%, #1a5bb8 100%);
    color: white;
    padding: 32px;
    text-align: center;
}

.wizard-header-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.wizard-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.wizard-header p {
    opacity: 0.9;
    font-size: 14px;
}

/* Progress Bar */
.wizard-progress {
    display: flex;
    padding: 24px 32px;
    background: var(--neutral-50, #fafafa);
    border-bottom: 1px solid var(--neutral-200, #e0e0e0);
    overflow-x: auto;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    min-width: 80px;
}

.progress-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--neutral-200, #e0e0e0);
    color: var(--neutral-500, #666);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.progress-step.active .progress-step-number {
    background: var(--primary-color, #2970FF);
    color: white;
}

.progress-step.completed .progress-step-number {
    background: #4caf50;
    color: white;
}

.progress-step-label {
    font-size: 12px;
    color: var(--neutral-500, #666);
}

/* Wizard Body */
.wizard-body {
    padding: 32px;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wizard-footer {
    padding: 24px 32px;
    background: var(--neutral-50, #fafafa);
    border-top: 1px solid var(--neutral-200, #e0e0e0);
    display: flex;
    justify-content: space-between;
}

/* Requirements */
.requirement {
    padding: 16px;
    background: var(--neutral-50, #f5f5f5);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.requirement-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.requirement.pass .requirement-icon {
    background: #4caf50;
    color: white;
}

.requirement.fail .requirement-icon {
    background: #f44336;
    color: white;
}

.requirement-text {
    flex: 1;
    font-size: 14px;
}

.requirement-detail {
    font-size: 12px;
    color: var(--neutral-500, #666);
    margin-top: 4px;
}

/* Card Selector */
.card-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.card-option {
    padding: 24px;
    border: 2px solid var(--neutral-200, #e0e0e0);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.card-option:hover {
    border-color: var(--primary-color, #2970FF);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-option.selected {
    border-color: var(--primary-color, #2970FF);
    background: #fff5f7;
}

.card-option-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.card-option-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.card-option-desc {
    font-size: 12px;
    color: var(--neutral-500, #666);
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.color-option {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.color-option.selected {
    border-color: #333;
    transform: scale(1.1);
}

/* Logo Preview */
.logo-preview {
    margin-top: 12px;
    max-width: 200px;
}

.logo-preview img {
    max-width: 100%;
    border-radius: 8px;
}

/* Messages */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.field-error-message {
    color: #c62828;
    font-size: 12px;
    margin-top: 6px;
}

.wizard-step input[aria-invalid="true"],
.wizard-step textarea[aria-invalid="true"],
.wizard-step select[aria-invalid="true"] {
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.15);
}

.wizard-step .card-option[aria-invalid="true"] {
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.15);
}

.wizard-step .color-option[aria-invalid="true"] {
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.2);
}

.color-option[aria-invalid="true"] {
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.25);
}

.wizard-step[data-step="requirements"][aria-busy="true"] #recheck-requirements-btn {
    pointer-events: none;
}

.success-icon {
    font-size: 64px;
    text-align: center;
    color: #4caf50;
    margin-bottom: 24px;
}

/* Password Strength */
.password-strength {
    height: 4px;
    background: var(--neutral-200, #e0e0e0);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s;
}

.strength-empty {
    width: 0%;
    background: transparent;
}

.strength-weak {
    width: 33%;
    background: #f44336;
}

.strength-medium {
    width: 66%;
    background: #ff9800;
}

.strength-strong {
    width: 100%;
    background: #4caf50;
}

/* Skip Link */
.skip-link {
    text-align: center;
    margin-top: 16px;
}

.skip-link a {
    color: var(--neutral-500, #666);
    font-size: 14px;
    text-decoration: none;
}

.skip-link a:hover {
    color: var(--primary-color, #2970FF);
}

/* Utility overrides (wizard-specific) */
.disabled-interaction {
    pointer-events: none;
    opacity: 0.6;
}

.form-hint {
    font-size: 12px;
    margin-top: 4px;
}

/* Color option backgrounds (CSP-compliant, no inline styles) */
.color-bg-brand { background-color: #2970FF; }
.color-bg-pink { background-color: #f13e5f; }
.color-bg-blue { background-color: #3f51b5; }
.color-bg-green { background-color: #4caf50; }
.color-bg-orange { background-color: #ff9800; }
.color-bg-purple { background-color: #9c27b0; }
.color-bg-cyan { background-color: #00bcd4; }

/* AI Badge & Color Palette */
.ai-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #4caf50;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.ai-color-note {
    margin-top: 12px;
    padding: 12px;
    background: #e8f5e9;
    border-radius: 8px;
    font-size: 13px;
    color: #2e7d32;
}

.ai-color-warning {
    margin-top: 8px;
    padding: 10px;
    background: #fff3e0;
    border-radius: 8px;
    font-size: 12px;
    color: #e65100;
}

.ai-color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.position-relative {
    position: relative;
}

/* Color Preview Component */
.color-preview-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.ai-palette-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.ai-badge-inline {
    background: #4caf50;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-palette-title {
    font-weight: 600;
    color: #334155;
    font-size: 15px;
}

.color-palette-preview {
    margin-bottom: 20px;
}

.color-swatch-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 100px;
    height: 80px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-swatch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-swatch .color-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    background: rgba(0, 0, 0, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.color-swatch .color-hex {
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Live Preview */
.live-preview-container {
    margin-bottom: 16px;
}

.live-preview-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.live-preview-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
}

.preview-header {
    padding: 12px 16px;
    color: white;
    display: flex;
    gap: 16px;
    background-color: var(--preview-primary, #2563eb);
}

.preview-nav-item {
    font-size: 12px;
    opacity: 0.9;
}

.preview-body {
    padding: 16px;
}

.preview-heading {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--preview-primary, #2563eb);
}

.preview-text {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px 0;
}

.preview-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--preview-accent, #f59e0b);
}

.preview-footer {
    padding: 10px 16px;
    color: white;
    background-color: var(--preview-secondary, #64748b);
}

.preview-footer-text {
    font-size: 11px;
    opacity: 0.9;
}

/* Color swatch backgrounds using CSS custom properties */
.color-swatch-primary { background-color: var(--swatch-primary, #2563eb); }
.color-swatch-secondary { background-color: var(--swatch-secondary, #64748b); }
.color-swatch-accent { background-color: var(--swatch-accent, #f59e0b); }

/* AI Suggest Button */
.btn-ai-suggest {
    background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-ai-suggest:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-ai-suggest.applied {
    background: #e8f5e9;
    color: #2e7d32;
    pointer-events: none;
}

.btn-ai-suggest.applied::before {
    content: '\2713';
    margin-right: 4px;
}

/* Go Live Toggle */
.go-live-section {
    max-width: 400px;
    margin: 24px auto 0;
}

.go-live-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    margin-bottom: 16px;
    transition: border-color 0.2s, background-color 0.2s;
}

.go-live-toggle-wrapper:has(input:checked),
.go-live-toggle-wrapper.checked {
    border-color: #4caf50;
    background: #f0fdf4;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0.01;
    cursor: pointer;
    z-index: 1;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4caf50;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.go-live-label {
    flex: 1;
}

.go-live-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 2px;
}

.go-live-desc {
    display: block;
    font-size: 13px;
    color: #64748b;
}

.go-live-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.go-live-info {
    text-align: center;
}

.go-live-info p {
    font-size: 13px;
    line-height: 1.5;
}

/* Hero Image Step */
.hero-ai-suggestion {
    background: #f0fdf4;
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.hero-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #4caf50;
    color: white;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.hero-ai-image-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    max-height: 200px;
}

.hero-ai-image-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.hero-ai-attribution {
    font-size: 11px;
    color: var(--neutral-500, #666);
    margin-bottom: 16px;
}

.hero-ai-attribution a {
    color: #4caf50;
}

.hero-ai-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-use-ai-image {
    background: #4caf50;
    color: white;
}

.btn-use-ai-image:hover {
    background: #43a047;
}

/* Hero Search */
.hero-search-section {
    margin-bottom: 24px;
}

.hero-search-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.hero-search-input {
    flex: 1;
}

.hero-search-btn {
    min-width: 100px;
}

.hero-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.hero-image-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    aspect-ratio: 4/3;
}

.hero-image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-image-card.selected {
    border-color: var(--primary-color, #2970FF);
}

.hero-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-image-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 8px;
    color: white;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.hero-image-card:hover .hero-image-card-overlay {
    opacity: 1;
}

.hero-image-card.selected .hero-image-card-overlay {
    opacity: 1;
}

.hero-image-card-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--primary-color, #2970FF);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.hero-image-card.selected .hero-image-card-check {
    display: flex;
}

.hero-search-loading {
    text-align: center;
    padding: 32px;
    color: var(--neutral-500, #666);
}

.hero-search-empty {
    text-align: center;
    padding: 32px;
    color: var(--neutral-500, #666);
    background: var(--neutral-50, #f5f5f5);
    border-radius: 8px;
}

.hero-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.hero-pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 13px;
}

.hero-pagination-btn:hover {
    border-color: var(--primary-color, #2970FF);
}

.hero-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hero-pagination-info {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--neutral-500, #666);
}

.hero-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: #999;
    font-size: 13px;
}

.hero-divider::before,
.hero-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--neutral-200, #e0e0e0);
}

/* Expandable Sections (progressive disclosure) */
.expandable-section {
    margin-top: 16px;
    margin-bottom: 16px;
}

.expand-toggle {
    background: none;
    border: 1px dashed #ccc;
    color: var(--neutral-500, #666);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.expand-toggle:hover {
    border-color: var(--primary-color, #2970FF);
    color: var(--primary-color, #2970FF);
}

.expand-toggle[aria-expanded="true"] {
    border-style: solid;
    border-color: #ddd;
}

.expandable-content {
    margin-top: 16px;
    padding: 16px;
    background: var(--neutral-50, #fafafa);
    border-radius: 8px;
}

/* Tone Chips (multi-select) */
.tone-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tone-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.tone-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tone-chip span {
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid var(--neutral-200, #e0e0e0);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
    user-select: none;
}

.tone-chip input:checked + span {
    border-color: var(--primary-color, #2970FF);
    background: #fff5f7;
    color: var(--primary-color, #2970FF);
    font-weight: 600;
}

.tone-chip:hover span {
    border-color: var(--primary-color, #2970FF);
}

/* Service Input Rows */
.service-input-row {
    margin-bottom: 8px;
}

.service-input-row input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.service-input-row input:focus {
    outline: none;
    border-color: var(--primary-color, #2970FF);
}

/* Review Summary */
.review-summary {
    background: var(--neutral-50, #fafafa);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.review-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--neutral-200, #e0e0e0);
}

.review-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.review-section h3 {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.review-item {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 14px;
}

.review-item-label {
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.review-item-value {
    color: #555;
}

.review-generate-note {
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .wizard-container {
        margin: 16px;
        border-radius: 12px;
    }

    .wizard-header,
    .wizard-body,
    .wizard-footer {
        padding: 20px;
    }

    .wizard-progress {
        padding: 16px;
    }

    .card-selector {
        grid-template-columns: 1fr;
    }

    .hero-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .color-swatch-group {
        justify-content: center;
    }
}

/* Hero picker on branding step */
.hero-search-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.hero-search-row input[type="search"] {
    flex: 1;
}
.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

/* Pack → website-type auto-switch banner */
.pack-website-type-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--neutral-50, #f5f7fa);
    border: 1px solid var(--neutral-200, #e0e0e0);
    border-radius: 8px;
}
.pack-website-type-banner.hidden {
    display: none;
}
.pack-website-type-banner-text {
    flex: 1 1 220px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--neutral-700, #374151);
}
