/**
 * Project Creation Wizard - Styling
 */

:root {
    --wizard-primary: #667eea;
    --wizard-secondary: #764ba2;
    --wizard-success: #10b981;
    --wizard-warning: #f59e0b;
    --wizard-danger: #ef4444;
    --wizard-bg: #f8fafc;
    --wizard-card: #ffffff;
    --wizard-text: #0f172a;
    --wizard-text-light: #64748b;
    --wizard-border: #e2e8f0;
}

/* Utkast-återställning – kompakt en-rad */
.draft-restore-banner {
    margin: 0 auto 1rem;
    max-width: 900px;
    padding: 0 1rem;
}

.draft-restore-banner-inner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.draft-restore-icon {
    font-size: 1.25rem;
    color: #64748b;
    flex-shrink: 0;
}

.draft-restore-text {
    flex: 1;
    font-size: 0.9375rem;
    color: #334155;
    min-width: 0;
}

.draft-restore-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.draft-restore-btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
}

.draft-restore-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.9375rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem 0;
}

.draft-restore-link:hover {
    color: #475569;
}

@media (max-width: 640px) {
    .draft-restore-banner-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .draft-restore-actions {
        justify-content: center;
    }
}

/* Sidintro ovanför wizarden */
.wizard-page-intro {
    max-width: 920px;
    margin: calc(var(--header-height, 72px) + 1.5rem) auto 0;
    padding: 0 1.25rem 1.25rem;
}

.wizard-intro-header {
    margin-bottom: 1.1rem;
}

.wizard-intro-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f46e5;
}

.wizard-intro-title {
    margin: 0;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--wizard-text);
}

.wizard-journey {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 0.35rem 0.65rem;
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e8edf3;
    border-radius: 18px;
    padding: 1.15rem 1.35rem;
    margin-bottom: 0.85rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 10px 28px rgba(15, 23, 42, 0.06);
}

.wizard-journey-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.wizard-journey-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.wizard-journey-icon--1 {
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
}

.wizard-journey-icon--2 {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
    color: #6d28d9;
}

.wizard-journey-icon--3 {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    color: #047857;
}

.wizard-journey-copy strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.wizard-journey-copy span {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
    margin-top: 0.12rem;
}

.wizard-journey-connector {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    min-width: 28px;
    justify-content: center;
}

.wizard-journey-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
}

.wizard-journey-line {
    flex: 1;
    height: 2px;
    min-width: 10px;
    border-radius: 1px;
    background: linear-gradient(90deg, #e2e8f0, #94a3b8, #e2e8f0);
}

.wizard-account-strip {
    margin-bottom: 1rem;
}

.wizard-account-strip:empty {
    display: none;
}

.wizard-account-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--wizard-border);
    background: var(--wizard-card);
    flex-wrap: wrap;
}

.wizard-account-card--guest {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.wizard-account-card--ready {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
}

.wizard-account-card--warn {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, #f8fafc 100%);
}

.wizard-account-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.wizard-account-card--guest .wizard-account-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.wizard-account-card--ready .wizard-account-icon {
    background: #dcfce7;
    color: #15803d;
}

.wizard-account-card--warn .wizard-account-icon {
    background: #fef3c7;
    color: #b45309;
}

.wizard-account-body {
    flex: 1;
    min-width: 180px;
}

.wizard-account-body strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--wizard-text);
}

.wizard-account-body p {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: var(--wizard-text-light);
    line-height: 1.45;
}

.wizard-account-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wizard-account-btn {
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.wizard-account-btn--primary {
    background: linear-gradient(135deg, var(--wizard-primary), var(--wizard-secondary));
    color: #fff;
}

.wizard-account-btn--secondary {
    background: #fff;
    color: var(--wizard-text);
    border: 1px solid var(--wizard-border);
}

.wizard-mode-banner--edit {
    max-width: 1000px;
    margin: 0 auto 1rem;
    padding: 1.5rem;
}

.wizard-location-card {
    background: #f8fafc;
    border: 1px solid var(--wizard-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.wizard-location-card--missing {
    border-color: #fcd34d;
    background: #fffbeb;
}

.wizard-location-main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.wizard-location-main i {
    color: var(--wizard-primary);
    font-size: 1.1rem;
}

.wizard-location-label {
    font-size: 0.75rem;
    color: var(--wizard-text-light);
    display: block;
}

.wizard-location-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--wizard-text);
}

.wizard-location-edit {
    border: 1px solid var(--wizard-border);
    background: #fff;
    color: var(--wizard-text);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.wizard-review-login-hint {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: #1e3a8a;
    line-height: 1.45;
}

.wizard-review-login-hint i {
    margin-top: 0.15rem;
    color: #2563eb;
}

.image-upload-hero-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #c7d2fe;
}

.image-upload-hero-tip i {
    color: #4f46e5;
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.image-upload-hero-tip strong {
    display: block;
    font-size: 0.9375rem;
    color: #312e81;
}

.image-upload-hero-tip span {
    display: block;
    font-size: 0.8125rem;
    color: #4338ca;
    margin-top: 0.2rem;
    line-height: 1.45;
}

/* Gratis Info Banner */
.wizard-info-banner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.15rem;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.wizard-info-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.wizard-info-banner-copy strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #14532d;
    margin-bottom: 0.15rem;
}

.wizard-info-banner-copy p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #166534;
}

/* Edit Mode Banner */
.wizard-mode-banner {
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wizard-mode-banner.edit-mode {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.wizard-mode-banner i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.wizard-mode-banner strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.wizard-mode-banner .btn-text {
    transition: all 0.2s;
}

.wizard-mode-banner .btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Breadcrumbs */
.breadcrumbs {
    max-width: 1000px;
    margin: 0 auto 1rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #111827;
}

.breadcrumbs i.fa-chevron-right {
    font-size: 0.7rem;
    color: #d1d5db;
}

.breadcrumbs span {
    color: #111827;
    font-weight: 500;
}

/* Back Button */
.btn-back {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Loading State */
.loading-state.edit-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loader-ring {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-steps {
    max-width: 400px;
    margin: 2rem auto;
    text-align: left;
}

.loading-steps .step {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.loading-steps .step.active {
    background: #dcfce7;
    color: #065f46;
}

.loading-steps .step i {
    width: 20px;
    text-align: center;
}

/* Edit Mode - Field Highlighting */
.edit-mode input:not([value=""]):not(:placeholder-shown),
.edit-mode textarea:not(:placeholder-shown),
.edit-mode select:not([value=""]) {
    border-left: 3px solid #f59e0b;
    background: #fffbeb;
}

.edit-mode .form-label::after {
    content: " (förfylld)";
    font-size: 0.8em;
    color: #92400e;
    font-weight: normal;
}

/* Success State */
.success-state {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-state h2 {
    color: var(--wizard-text);
    margin-bottom: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.action-buttons .btn-success,
.action-buttons .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
}

.redirect-info {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 2rem;
}

@media (max-width: 767px) {
    .wizard-page-intro {
        margin-top: calc(var(--header-height, 64px) + 0.85rem);
        padding: 0 0.85rem 0.85rem;
    }

    .wizard-intro-title {
        font-size: 1.25rem;
    }

    .wizard-journey {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0.85rem 1rem;
    }

    .wizard-journey-step {
        padding: 0.65rem 0;
    }

    .wizard-journey-step + .wizard-journey-connector {
        display: none;
    }

    .wizard-journey-step:not(:last-child) {
        border-bottom: 1px solid #f1f5f9;
    }

    .wizard-info-banner {
        align-items: flex-start;
    }

    .wizard-account-card {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-account-actions {
        width: 100%;
    }

    .wizard-account-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .wizard-info-banner {
        flex-direction: row;
        text-align: left;
        padding: 0.85rem 1rem;
    }
    
    /* Edit Mode Banner - Mobile */
    .wizard-mode-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem 1rem;
    }
    
    .wizard-mode-banner .btn-text {
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
    }
    
    /* Breadcrumbs - Mobile */
    .breadcrumbs {
        font-size: 0.8rem;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0.5rem;
    }
    
    .breadcrumbs::-webkit-scrollbar {
        height: 4px;
    }
    
    .breadcrumbs::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 2px;
    }
    
    /* Back Button - Mobile */
    .btn-back {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* Loading State - Mobile */
    .loading-state.edit-loading {
        padding: 2rem 1rem;
    }
    
    .loading-steps {
        font-size: 0.9rem;
    }
    
    /* Success State - Mobile */
    .success-state {
        padding: 2rem 1rem;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .success-state h2 {
        font-size: 1.5rem;
    }
    
    /* Action Buttons - Mobile */
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-buttons .btn-success,
    .action-buttons .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    /* Image Grid - Mobile */
    .image-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Wizard Container */
.wizard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
}

/* Wizard Header */
.wizard-header {
    position: sticky;
    top: 80px;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 100;
    margin-bottom: 2rem;
}

/* Progress Bar */
.wizard-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    height: 8px;
    background: var(--wizard-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.progress-text {
    font-size: 0.875rem;
    color: var(--wizard-text-light);
    font-weight: 500;
    text-align: center;
}

/* Step Indicators */
.step-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--wizard-border);
    color: var(--wizard-text-light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-indicator:hover {
    border-color: var(--wizard-primary);
    transform: scale(1.1);
}

.step-indicator.active {
    background: linear-gradient(135deg, var(--wizard-primary), var(--wizard-secondary));
    color: white;
    border-color: transparent;
}

.step-indicator.completed {
    background: var(--wizard-success);
    color: white;
    border-color: transparent;
}

.step-indicators.mobile .step-indicator {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

/* Wizard Step */
.wizard-step {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    animation: slideIn 0.3s ease;
    margin-bottom: 2rem;
}

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

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wizard-text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.step-subtitle {
    font-size: 1rem;
    color: var(--wizard-text-light);
    text-align: center;
    margin-bottom: 2rem;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: white;
    border: 2px solid var(--wizard-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.category-card:hover {
    border-color: var(--wizard-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.category-card.selected {
    border-color: var(--wizard-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.category-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--wizard-success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--wizard-text);
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.875rem;
    color: var(--wizard-text-light);
    margin-bottom: 1rem;
}

.popular-projects {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wizard-border);
}

.popular-projects span {
    font-size: 0.8125rem;
    color: var(--wizard-text-light);
    text-align: left;
}

/* Wizard Footer */
.wizard-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 100;
}

.wizard-footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.wizard-footer-right button {
    flex: none;
}

.wizard-footer button {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.wizard-footer button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-success:focus-visible {
    outline: 2px solid var(--wizard-primary, #667eea);
    outline-offset: 2px;
}

.category-card:focus-visible,
.template-option:focus-visible {
    outline: 2px solid var(--wizard-primary, #667eea);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--wizard-primary), var(--wizard-secondary));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Toast Notifications – liten på mobil, tablet och desktop */
.toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1rem;
    left: auto;
    width: auto;
    max-width: 260px;
    background: white;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 0.8125rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    border-left: 3px solid var(--wizard-danger);
    color: var(--wizard-danger);
}

.toast.success {
    border-left: 3px solid var(--wizard-success);
    color: var(--wizard-success);
}

.toast.info {
    border-left: 3px solid var(--wizard-primary);
    color: var(--wizard-primary);
}

.toast.loading {
    border-left: 3px solid var(--wizard-primary);
    color: var(--wizard-primary);
}

.toast i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.toast span {
    font-weight: 500;
    color: var(--wizard-text);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--wizard-text);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--wizard-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    outline: 2px solid var(--wizard-primary);
    outline-offset: 2px;
}

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

.field-requirement-hint {
    font-size: 0.8125rem;
    color: var(--wizard-text-light);
    margin: 0.25rem 0 0;
}

.alternate-location-group {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--wizard-border);
    border-radius: 12px;
}

.alternate-location-option {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--wizard-text);
    line-height: 1.45;
}

.alternate-location-option input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--wizard-primary);
    width: 1rem;
    height: 1rem;
}

.alternate-kommun-field {
    margin-top: 1rem;
}

.alternate-kommun-field label {
    display: block;
    margin-bottom: 0.5rem;
}

.alternate-kommun-field select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--wizard-border);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.alternate-kommun-field select:focus {
    outline: none;
    border-color: var(--wizard-primary);
}

.char-counter {
    font-size: 0.8125rem;
    color: var(--wizard-text-light);
    margin-top: 0.5rem;
    text-align: right;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed var(--wizard-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--wizard-bg);
}

.image-upload-area:hover {
    border-color: var(--wizard-primary);
    background: rgba(102, 126, 234, 0.05);
}

.image-upload-area i {
    font-size: 3rem;
    color: var(--wizard-text-light);
    margin-bottom: 1rem;
}

.image-upload-area h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wizard-text);
    margin-bottom: 0.5rem;
}

.image-upload-area p {
    font-size: 0.875rem;
    color: var(--wizard-text-light);
}

.image-upload-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-upload-buttons button {
    flex: 1;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--wizard-border);
    background: white;
    color: var(--wizard-text);
}

.image-upload-buttons button i {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.image-upload-buttons button:hover {
    border-color: var(--wizard-primary);
    background: rgba(102, 126, 234, 0.05);
}

.camera-btn {
    background: linear-gradient(135deg, var(--wizard-primary), var(--wizard-secondary)) !important;
    color: white !important;
    border: none !important;
}

/* Image Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--wizard-bg);
}

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

.image-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.image-item-remove:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Review Step */
.review-section {
    background: var(--wizard-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.review-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--wizard-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.review-label {
    font-weight: 600;
    color: var(--wizard-text-light);
}

.review-value {
    color: var(--wizard-text);
    text-align: right;
    flex: 1;
    margin-left: 1rem;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .wizard-container {
        padding: 1rem 0.5rem;
    }

    .wizard-header {
        padding: 1rem;
        top: 70px;
    }

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

    .step-title {
        font-size: 1.5rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 1.5rem;
    }

    .wizard-footer {
        padding: 1rem;
    }

    .wizard-footer button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .wizard-footer button i {
        font-size: 1.125rem;
    }

    .wizard-footer button span {
        display: none;
    }

    .image-upload-buttons {
        flex-direction: column;
    }

    .camera-btn {
        order: -1;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .toast {
        bottom: calc(80px + env(safe-area-inset-bottom));
        right: 1rem;
        left: auto;
        max-width: min(260px, 85vw);
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    .toast i {
        font-size: 0.8125rem;
    }
}

/* Touch-friendly targets on mobile */
@media (hover: none) and (pointer: coarse) {
    .category-card {
        min-height: 140px;
        padding: 1.5rem;
    }

    button, .step-indicator {
        min-height: 44px;
        min-width: 44px;
    }

    input, select, textarea {
        font-size: 16px; /* Prevents iOS zoom */
    }
}

/* ==================== EDIT FROM REVIEW MODAL ==================== */

.wizard-edit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    box-sizing: border-box;
    animation: fadeIn 0.2s ease;
}

.wizard-edit-modal {
    background: var(--wizard-card, #fff);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

.wizard-edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--wizard-border, #e2e8f0);
    flex-shrink: 0;
}

.wizard-edit-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wizard-text, #0f172a);
}

.wizard-edit-modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--wizard-text-light, #64748b);
    cursor: pointer;
    border-radius: 8px;
}

.wizard-edit-modal-close:hover {
    background: var(--wizard-bg, #f8fafc);
    color: var(--wizard-text, #0f172a);
}

.wizard-edit-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.wizard-edit-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--wizard-border, #e2e8f0);
    flex-shrink: 0;
}

.wizard-edit-modal-footer .btn-primary,
.wizard-edit-modal-footer .btn-secondary {
    padding: 0.65rem 1rem;
    font-size: 0.9375rem;
}

@media (max-width: 767px) {
    .wizard-edit-modal {
        max-height: 85vh;
    }
    .wizard-edit-modal-footer {
        flex-direction: column;
    }
    .wizard-edit-modal-footer .btn-primary,
    .wizard-edit-modal-footer .btn-secondary {
        width: 100%;
    }
}

/* ==================== SHARE PROMPT MODAL ==================== */

.share-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

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

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

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

.share-prompt-modal {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s;
}

.share-prompt-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-prompt-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.share-prompt-text {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.share-prompt-stats {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.share-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-share-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-share-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.btn-share-skip {
    padding: 0.875rem 2rem;
    background: transparent;
    color: #64748b;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-share-skip:hover {
    color: #1e293b;
}

@media (max-width: 767px) {
    .share-prompt-modal {
        padding: 2rem 1.5rem;
    }
    
    .share-prompt-title {
        font-size: 1.5rem;
    }

    .share-prompt-icon {
        width: 70px;
        height: 70px;
    }

    .btn-share-primary {
        font-size: 1rem;
    }
}

/* Respektera användarens preferens för reducerad rörelse */
@media (prefers-reduced-motion: reduce) {
    .wizard-step {
        animation: none;
    }
    .step-dots .dot {
        transition: none;
    }
    .step-dots .dot.active {
        transform: none;
    }
}
