/* ================================
   Website Generator Wizard Styles
   ================================ */

/* CSS Variables */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #93c5fd;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --white: #ffffff;
    --black: #000000;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    --rounded-sm: 0.375rem;
    --rounded: 0.5rem;
    --rounded-lg: 0.75rem;
    --rounded-xl: 1rem;
    --rounded-2xl: 1.5rem;
    --rounded-full: 9999px;
    
    --transition: all 0.2s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* ================================
   Layout
   ================================ */

.wizard-container {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

/* ================================
   Header
   ================================ */

.wizard-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Progress Bar */
.progress-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.progress-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--rounded-full);
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    width: 20%;
    transition: width 0.4s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.step-indicator:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.step-indicator.active:not(:last-child)::after,
.step-indicator.completed:not(:last-child)::after {
    background: var(--primary);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: var(--rounded-full);
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.step-indicator.active .step-number,
.step-indicator.completed .step-number {
    background: var(--primary);
    color: var(--white);
}

.step-indicator.completed .step-number {
    background: var(--secondary);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    transition: var(--transition);
}

.step-indicator.active .step-label,
.step-indicator.completed .step-label {
    color: var(--gray-800);
}

/* ================================
   Main Content
   ================================ */

.wizard-main {
    flex: 1;
    padding: 2rem;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-content {
    max-width: 1200px;
    margin: 0 auto;
}

.step-content h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

/* Split Layout for Steps 3 & 5 */
.step-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ================================
   Industry Selection (Step 1)
   ================================ */

.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.industry-card {
    position: relative;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    padding: 2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.industry-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.industry-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), var(--shadow-lg);
}

.industry-input {
    position: absolute;
    opacity: 0;
}

.industry-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

.industry-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.industry-content p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.check-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--rounded-full);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
}

.industry-card.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* ================================
   Template Selection (Step 2)
   ================================ */

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.template-card {
    position: relative;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.template-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.template-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), var(--shadow-lg);
}

.template-preview {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--gray-100);
    overflow: hidden;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    padding: 1rem;
}

.preview-mockup {
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: var(--rounded);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Mockup Styles */
.mockup-header {
    height: 20px;
    background: var(--gray-800);
}

.mockup-header.accent {
    background: var(--primary);
}

.mockup-hero {
    height: 50%;
    background: linear-gradient(135deg, var(--gray-300) 0%, var(--gray-200) 100%);
}

.mockup-hero.split {
    display: flex;
}

.split-left {
    width: 50%;
    background: var(--gray-300);
}

.split-right {
    width: 50%;
    background: var(--primary-light);
}

.mockup-hero.full {
    height: 60%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.mockup-content {
    padding: 1rem;
}

.mockup-content.compact {
    padding: 0.75rem;
}

.mockup-line {
    height: 8px;
    background: var(--gray-300);
    border-radius: var(--rounded-full);
    margin-bottom: 6px;
}

.mockup-line.short {
    width: 60%;
}

.mockup-cards {
    display: flex;
    gap: 8px;
}

.mockup-card {
    flex: 1;
    height: 40px;
    background: var(--gray-200);
    border-radius: var(--rounded-sm);
}

.mockup-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: var(--gray-100);
}

.nav-item {
    width: 20px;
    height: 4px;
    background: var(--gray-400);
    border-radius: var(--rounded-full);
}

.mockup-text-block {
    height: 30px;
    background: var(--gray-200);
    border-radius: var(--rounded-sm);
}

.template-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.preview-btn {
    background: var(--white);
    color: var(--gray-900);
    padding: 0.75rem 1.5rem;
    border-radius: var(--rounded);
    font-weight: 600;
    font-size: 0.875rem;
}

.template-info {
    padding: 1.25rem;
}

.template-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.template-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.template-card .check-icon {
    top: auto;
    bottom: 1rem;
    right: 1rem;
}

/* ================================
   Design Customization (Step 3)
   ================================ */

.design-controls {
    padding-right: 1rem;
}

.design-section {
    margin-bottom: 2rem;
}

.design-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.color-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.color-input {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--rounded);
    border: 1px solid var(--gray-200);
}

.color-input label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--rounded);
    cursor: pointer;
    padding: 0;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--gray-300);
    border-radius: var(--rounded);
}

.color-value {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
}

.font-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.font-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.font-input label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded);
    background: var(--white);
    font-size: 0.875rem;
    color: var(--gray-800);
    cursor: pointer;
    transition: var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.font-preview {
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--rounded);
    font-size: 1rem;
    color: var(--gray-700);
    border-left: 3px solid var(--primary);
}

/* Live Preview Panel */
.live-preview-panel,
.final-preview-panel {
    position: sticky;
    top: 200px;
}

.live-preview-panel h3,
.final-preview-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.preview-frame-wrapper {
    background: var(--gray-100);
    border-radius: var(--rounded-lg);
    padding: 1rem;
    border: 1px solid var(--gray-200);
}

.preview-frame-wrapper.large {
    padding: 1.5rem;
}

.preview-frame {
    background: var(--white);
    border-radius: var(--rounded);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 400px;
}

/* Live Preview Elements */
.lp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--white);
}

.lp-logo {
    font-weight: 700;
    font-size: 1.125rem;
}

.lp-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.lp-hero {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--white);
}

.lp-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.lp-hero p {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.lp-cta {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--rounded);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
}

.lp-content {
    padding: 2rem 1.5rem;
}

.lp-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.lp-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.lp-card {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--rounded);
    text-align: center;
}

.lp-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--rounded);
    margin: 0 auto 0.75rem;
}

.lp-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.lp-card p {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ================================
   Content Form (Step 4)
   ================================ */

.content-form {
    max-width: 800px;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded);
    font-size: 0.9375rem;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--rounded-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: var(--gray-50);
}

.upload-content {
    color: var(--gray-500);
}

.upload-content svg {
    margin-bottom: 1rem;
    color: var(--primary);
}

.upload-title {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.875rem;
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.preview-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--rounded);
    overflow: hidden;
    border: 2px solid var(--gray-200);
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    border: none;
    border-radius: var(--rounded-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.preview-remove:hover {
    background: rgba(220, 38, 38, 0.9);
}

/* ================================
   SEO & Final Step (Step 5)
   ================================ */

.seo-controls {
    padding-right: 1rem;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

.summary-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded);
    padding: 1.25rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.summary-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.summary-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
}

.purchase-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
}

.price-box {
    text-align: center;
    margin-bottom: 1.5rem;
}

.price-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.price-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.price-note {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ================================
   Buttons
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--rounded);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    width: 100%;
}

/* ================================
   Footer
   ================================ */

.wizard-footer {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    position: sticky;
    bottom: 0;
}

/* ================================
   Loading Overlay
   ================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: var(--rounded-full);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--gray-600);
    font-weight: 500;
}

/* ================================
   Toast Notifications
   ================================ */

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--white);
    border-radius: var(--rounded-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.success {
    border-left-color: var(--secondary);
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: var(--accent);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
}

.toast-close:hover {
    color: var(--gray-600);
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 1024px) {
    .step-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .live-preview-panel,
    .final-preview-panel {
        position: static;
        order: -1;
    }
    
    .preview-frame-wrapper.large {
        max-height: 400px;
        overflow: auto;
    }
}

@media (max-width: 768px) {
    .wizard-header {
        padding: 1rem;
    }
    
    .wizard-main {
        padding: 1.5rem 1rem;
    }
    
    .wizard-footer {
        padding: 1rem;
    }
    
    .step-content h1 {
        font-size: 1.5rem;
    }
    
    .step-label {
        display: none;
    }
    
    .step-indicator:not(:last-child)::after {
        left: 70%;
        width: 60%;
    }
    
    .industry-grid,
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .lp-cards {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .industry-card {
        padding: 1.5rem;
    }
    
    .upload-zone {
        padding: 1.5rem 1rem;
    }
    
    .color-input {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}
