/**
 * Map Creation Wizard UI Styles
 * Responsive layout with 75/25 split (Desktop) and Bottom-Sheet (Mobile)
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --wizard-primary: #2271b1;
    --wizard-primary-hover: #135e96;
    --wizard-success: #00a32a;
    --wizard-warning: #dba617;
    --wizard-danger: #d63638;
    --wizard-border: #c3c4c7;
    --wizard-bg: #f6f7f7;
    --wizard-text: #1d2327;
    --wizard-text-light: #646970;
    --wizard-shadow: rgba(0, 0, 0, 0.1);
    --wizard-radius: 8px;
    --wizard-transition: 0.3s ease;
}

/* ==========================================================================
   Header: Search + Stepper
   ========================================================================== */
.lm-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid var(--wizard-border);
    gap: 20px;
    flex-wrap: wrap;
}

.lm-wizard-search-section {
    flex: 1;
    min-width: 250px;
    max-width: 450px;
    position: relative;
}

.lm-wizard-search-section .lm-wizard-search-container {
    display: flex;
    gap: 8px;
}

.lm-wizard-search-section .lm-wizard-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    font-size: 14px;
    transition: border-color var(--wizard-transition), box-shadow var(--wizard-transition);
}

.lm-wizard-search-section .lm-wizard-search-input:focus {
    outline: none;
    border-color: var(--wizard-primary);
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.lm-wizard-search-section .lm-wizard-search-btn {
    padding: 10px 14px;
    border-radius: var(--wizard-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lm-wizard-search-section .lm-wizard-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    box-shadow: 0 4px 12px var(--wizard-shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

/* Header Stepper - more compact */
.lm-wizard-header .lm-wizard-stepper {
    padding: 0;
    border-bottom: none;
    flex-shrink: 0;
}

/* Mobile: Stack header vertically */
@media (max-width: 767px) {
    .lm-wizard-header {
        flex-direction: column;
        padding: 12px 16px;
        gap: 12px;
    }

    .lm-wizard-search-section {
        max-width: 100%;
        width: 100%;
    }

    .lm-wizard-header .lm-wizard-stepper {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Main Container Layout
   ========================================================================== */
.lm-wizard-container {
    display: flex;
    flex-direction: column;
    min-height: 75vh;
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 100%;
}

/* ==========================================================================
   Horizontal Stepper (New Layout)
   ========================================================================== */
.lm-wizard-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--wizard-border);
    gap: 0;
    flex-shrink: 0;
}

.lm-wizard-stepper-step {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all var(--wizard-transition);
}

.lm-wizard-stepper-step:last-child .lm-wizard-stepper-line {
    display: none;
}

.lm-wizard-stepper-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background: var(--wizard-bg);
    color: var(--wizard-text-light);
    border: 2px solid var(--wizard-border);
    transition: all var(--wizard-transition);
    flex-shrink: 0;
}

.lm-wizard-stepper-step.active .lm-wizard-stepper-circle {
    background: var(--wizard-primary);
    color: #fff;
    border-color: var(--wizard-primary);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.lm-wizard-stepper-step.completed .lm-wizard-stepper-circle {
    background: var(--wizard-success);
    color: #fff;
    border-color: var(--wizard-success);
}

.lm-wizard-stepper-step.completed .lm-wizard-stepper-circle::before {
    content: '\2713';
    font-size: 16px;
}

.lm-wizard-stepper-step.completed .lm-wizard-stepper-number {
    display: none;
}

.lm-wizard-stepper-label {
    margin-left: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--wizard-text-light);
    white-space: nowrap;
    transition: color var(--wizard-transition);
}

.lm-wizard-stepper-step.active .lm-wizard-stepper-label {
    color: var(--wizard-primary);
    font-weight: 600;
}

.lm-wizard-stepper-step.completed .lm-wizard-stepper-label {
    color: var(--wizard-success);
}

.lm-wizard-stepper-line {
    width: 40px;
    height: 2px;
    background: var(--wizard-border);
    margin: 0 12px;
    transition: background var(--wizard-transition);
}

.lm-wizard-stepper-step.completed + .lm-wizard-stepper-step .lm-wizard-stepper-line,
.lm-wizard-stepper-step.completed .lm-wizard-stepper-line {
    background: var(--wizard-success);
}

/* Hide labels on smaller panels */
@media (max-width: 1200px) {
    .lm-wizard-stepper-label {
        display: none;
    }

    .lm-wizard-stepper-line {
        width: 30px;
        margin: 0 8px;
    }
}

/* Mobile: Compact stepper */
@media (max-width: 767px) {
    .lm-wizard-stepper {
        padding: 12px 16px;
        gap: 0;
    }

    .lm-wizard-stepper-circle {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .lm-wizard-stepper-line {
        width: 24px;
        margin: 0 6px;
    }

    .lm-wizard-stepper-label {
        display: none;
    }
}

/* Desktop: Side-by-side layout */
@media (min-width: 1024px) {
    .lm-wizard-container {
        flex-direction: row;
        /* Fallback for browsers without dvh support */
        height: calc(100vh - 250px);
        /* Dynamic viewport height - account for site header + WooCommerce page title */
        height: calc(100dvh - 250px);
        min-height: 500px;
        max-height: calc(100dvh - 200px);
    }
}

/* ==========================================================================
   Map Area
   ========================================================================== */
.lm-wizard-map-area {
    flex: 1;
    position: relative;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
}

/* Mobile: Simple stacked layout (map on top, steps below) */
@media (max-width: 767px) {
    .lm-wizard-container {
        flex-direction: column;
        height: auto; /* Let content determine height */
        min-height: 100vh;
    }

    .lm-wizard-map-area {
        flex: none; /* Don't grow/shrink */
        width: 100%;
        height: 60vh; /* Fixed height for map area */
        min-height: 350px;
        max-height: 500px;
        padding-bottom: 0;
    }

    .lm-wizard-map {
        width: 100%;
        height: 100%;
    }

    .lm-wizard-map #lm-stl-map {
        width: 100% !important;
        height: 100% !important;
    }

    /* Hide zoom controls on mobile - use pinch-to-zoom instead */
    .leaflet-control-zoom {
        display: none !important;
    }
}

/* Search - Legacy styles (now in header, see .lm-wizard-search-section) */
.lm-wizard-search-container {
    display: flex;
    gap: 8px;
}

.lm-wizard-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    font-size: 14px;
    background: #fff;
    transition: border-color var(--wizard-transition), box-shadow var(--wizard-transition);
}

.lm-wizard-search-input:focus {
    outline: none;
    border-color: var(--wizard-primary);
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.lm-wizard-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    box-shadow: 0 4px 12px var(--wizard-shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    margin-top: 4px;
}

.lm-wizard-search-result {
    padding: 12px 16px;
    border-bottom: 1px solid var(--wizard-border);
    cursor: pointer;
    transition: background var(--wizard-transition);
}

.lm-wizard-search-result:hover {
    background: var(--wizard-bg);
}

.lm-wizard-search-result:last-child {
    border-bottom: none;
}

/* Map Container */
.lm-wizard-map {
    flex: 1;
    min-height: 300px;
}

#lm-stl-map {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

/* Data Quality Badge */
.lm-wizard-quality-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: #fff;
    padding: 8px 12px;
    border-radius: var(--wizard-radius);
    box-shadow: 0 2px 8px var(--wizard-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: transform var(--wizard-transition);
}

.lm-wizard-quality-badge:hover {
    transform: scale(1.05);
}

.lm-wizard-quality-stars {
    color: var(--wizard-warning);
}

/* Preview Overlay (Desktop) */
.lm-wizard-preview-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    background: #fff;
    border-radius: var(--wizard-radius);
    box-shadow: 0 8px 32px var(--wizard-shadow);
    max-width: 90%;
    max-height: 80%;
    overflow: hidden;
    display: none;
}

.lm-wizard-preview-overlay.active {
    display: block;
}

.lm-wizard-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--wizard-border);
    background: var(--wizard-bg);
}

.lm-wizard-preview-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--wizard-text-light);
    transition: color var(--wizard-transition);
}

.lm-wizard-preview-close:hover {
    color: var(--wizard-danger);
}

.lm-wizard-preview-content {
    padding: 16px;
}

.lm-wizard-preview-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.lm-wizard-preview-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--wizard-border);
}

.lm-wizard-preview-tab {
    padding: 8px 16px;
    border: 1px solid var(--wizard-border);
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    transition: all var(--wizard-transition);
}

.lm-wizard-preview-tab.active {
    background: var(--wizard-primary);
    color: #fff;
    border-color: var(--wizard-primary);
}

/* Desktop Layout */
@media (min-width: 1024px) {
    .lm-wizard-map-area {
        flex: 0 0 75%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .lm-wizard-map-area {
        flex: 0 0 60%;
    }
}

/* ==========================================================================
   Wizard Panel (Desktop: Sidebar, Mobile: Bottom-Sheet)
   ========================================================================== */
.lm-wizard-panel {
    background: #fff;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--wizard-border);
    overflow: hidden;
}

/* Mobile: Panel becomes regular block element */
@media (max-width: 767px) {
    .lm-wizard-panel {
        position: relative; /* Normal flow, not fixed */
        border-left: none;
        border-top: 1px solid var(--wizard-border);
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }

    /* Hide drag handle on mobile - not needed for scroll layout */
    .lm-wizard-panel .lm-wizard-drag-handle {
        display: none;
    }

    /* Panel content scrolls with page */
    .lm-wizard-panel .lm-wizard-panel-content {
        padding: 16px;
        overflow: visible; /* Let page scroll handle it */
    }

    /* Step content visible based on accordion state */
    .lm-wizard-panel .lm-wizard-step-content {
        padding: 12px 0;
    }

    /* Compact panel header on mobile */
    .lm-wizard-panel .lm-wizard-panel-header {
        padding: 12px 16px;
        position: sticky;
        top: 0;
        z-index: 10;
        background: #fff;
        border-bottom: 1px solid var(--wizard-border);
    }

    .lm-wizard-panel .lm-wizard-title {
        font-size: 16px;
        margin: 0 0 8px 0;
    }

    /* Show summary on mobile */
    .lm-wizard-panel .lm-wizard-summary {
        display: block;
        margin: 12px 0;
    }

    /* Footer sticks to bottom when scrolled */
    .lm-wizard-panel .lm-wizard-panel-footer {
        padding: 12px 16px;
        position: sticky;
        bottom: 0;
        background: var(--wizard-bg);
        border-top: 1px solid var(--wizard-border);
    }

    /* Mobile steps */
    .lm-wizard-panel .lm-wizard-step {
        margin-bottom: 8px;
    }

    .lm-wizard-panel .lm-wizard-step-header {
        padding: 12px 16px;
        min-height: 48px;
    }
}

/* Tablet Layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .lm-wizard-panel {
        flex: 0 0 40%;
    }
}

/* Desktop Layout */
@media (min-width: 1024px) {
    .lm-wizard-panel {
        flex: 0 0 25%;
        min-width: 320px;
        max-width: 400px;
    }
}

/* Drag Handle (Mobile only) */
.lm-wizard-drag-handle {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px 12px;
    cursor: grab;
    touch-action: none; /* Enable custom touch handling */
}

.lm-wizard-drag-indicator {
    width: 40px;
    height: 4px;
    background: var(--wizard-border);
    border-radius: 2px;
    margin-bottom: 4px;
}

.lm-wizard-drag-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--wizard-text-light);
    transition: opacity 0.3s ease;
}

.lm-wizard-drag-hint .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    animation: bounce-up 1.5s ease-in-out infinite;
}

@keyframes bounce-up {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Hide hint when panel is expanded */
.lm-wizard-panel.half .lm-wizard-drag-hint,
.lm-wizard-panel.full .lm-wizard-drag-hint {
    opacity: 0;
}

@media (max-width: 767px) {
    .lm-wizard-drag-handle {
        display: flex;
    }
}

/* Panel Content */
.lm-wizard-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Progress Indicator */
.lm-wizard-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid var(--wizard-border);
}

.lm-wizard-progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background: var(--wizard-bg);
    color: var(--wizard-text-light);
    transition: all var(--wizard-transition);
}

.lm-wizard-progress-step.active {
    background: var(--wizard-primary);
    color: #fff;
}

.lm-wizard-progress-step.completed {
    background: var(--wizard-success);
    color: #fff;
}

.lm-wizard-progress-line {
    width: 40px;
    height: 2px;
    background: var(--wizard-border);
}

.lm-wizard-progress-line.completed {
    background: var(--wizard-success);
}

/* ==========================================================================
   Accordion Steps
   ========================================================================== */
.lm-wizard-step {
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow var(--wizard-transition);
}

.lm-wizard-step-current {
    box-shadow: 0 2px 8px var(--wizard-shadow);
}

.lm-wizard-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--wizard-bg);
    cursor: pointer;
    user-select: none;
    transition: background var(--wizard-transition);
}

.lm-wizard-step-header:hover {
    background: #e8e9ea;
}

.lm-wizard-step-current .lm-wizard-step-header {
    background: var(--wizard-primary);
    color: #fff;
}

/* Disabled state for upcoming steps */
.lm-wizard-step-upcoming .lm-wizard-step-header {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile specific - ensure touch targets are large enough */
@media (max-width: 767px) {
    .lm-wizard-step-header {
        min-height: 56px;
        padding: 16px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    .lm-wizard-drag-handle {
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    .lm-wizard-nav-prev,
    .lm-wizard-nav-next {
        min-height: 48px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

.lm-wizard-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background: #fff;
    color: var(--wizard-text);
    flex-shrink: 0;
}

.lm-wizard-step-completed .lm-wizard-step-number {
    background: var(--wizard-success);
    color: #fff;
}

.lm-wizard-step-title {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
}

/* Step status indicator */
.lm-wizard-step-status {
    margin-left: auto;
    color: var(--wizard-success);
}

.lm-wizard-step-status .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.lm-wizard-step-optional {
    font-size: 11px;
    background: var(--wizard-bg);
    color: var(--wizard-text-light);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.lm-wizard-step-content {
    padding: 16px;
    background: #fff;
    /* JS controls visibility via slideUp/slideDown */
}

.lm-wizard-step-body {
    padding: 16px;
}

/* Step Navigation Buttons */
.lm-wizard-step-nav {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--wizard-border);
    margin-top: 16px;
}

.lm-wizard-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--wizard-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--wizard-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lm-wizard-btn-primary {
    background: var(--wizard-primary);
    color: #fff;
}

.lm-wizard-btn-primary:hover {
    background: var(--wizard-primary-hover);
}

.lm-wizard-btn-secondary {
    background: var(--wizard-bg);
    color: var(--wizard-text);
    border: 1px solid var(--wizard-border);
}

/* ==========================================================================
   Panel Footer (Simplified - Price only)
   ========================================================================== */
.lm-wizard-panel-footer {
    padding: 16px;
    border-top: 1px solid var(--wizard-border);
    background: var(--wizard-bg);
    flex-shrink: 0;
}

/* Summary Section - Simplified to price only */
.lm-wizard-summary {
    margin-bottom: 12px;
}

/* Hide non-price rows by default (hidden in simplified layout) */
.lm-wizard-summary-row {
    display: none;
}

/* Only show total price row */
.lm-wizard-summary-row.lm-wizard-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    font-size: 18px;
}

.lm-wizard-summary-label {
    color: var(--wizard-text);
    font-weight: 500;
}

.lm-wizard-summary-value {
    font-weight: 600;
}

.lm-wizard-summary-total {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.lm-wizard-summary-total .lm-wizard-summary-value {
    color: var(--wizard-primary);
    font-weight: 700;
    font-size: 20px;
}

/* Navigation Buttons */
.lm-wizard-nav {
    display: flex;
    gap: 12px;
}

.lm-wizard-nav-prev,
.lm-wizard-nav-next {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--wizard-radius);
    cursor: pointer;
    transition: all var(--wizard-transition);
}

.lm-wizard-nav-prev {
    background: #fff;
    border: 1px solid var(--wizard-border);
    color: var(--wizard-text);
}

.lm-wizard-nav-prev:hover {
    background: var(--wizard-bg);
}

.lm-wizard-nav-next {
    background: var(--wizard-primary);
    border: 1px solid var(--wizard-primary);
    color: #fff;
}

.lm-wizard-nav-next:hover {
    background: var(--wizard-primary-hover);
}

.lm-wizard-nav-prev .dashicons,
.lm-wizard-nav-next .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Preview Button */
.lm-wizard-preview-btn {
    width: 100%;
    margin-top: 12px;
    padding: 14px 20px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Panel Header - Hidden with horizontal stepper */
.lm-wizard-panel-header {
    display: none; /* Hidden - using horizontal stepper instead */
    padding: 16px;
    border-bottom: 1px solid var(--wizard-border);
    background: #fff;
}

.lm-wizard-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

/* Step Content Area - Show only active step */
.lm-wizard-step-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.lm-wizard-step-content-area .lm-wizard-step-pane {
    display: none;
}

.lm-wizard-step-content-area .lm-wizard-step-pane.active {
    display: block;
}

/* Step Title inside content area */
.lm-wizard-step-pane-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--wizard-text);
}

/* Progress Bar */
.lm-wizard-progress-bar {
    height: 6px;
    background: var(--wizard-border);
    border-radius: 3px;
    overflow: hidden;
    flex: 1;
}

.lm-wizard-progress-fill {
    height: 100%;
    background: var(--wizard-success);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.lm-wizard-progress-text {
    font-size: 12px;
    color: var(--wizard-text-light);
    min-width: 35px;
    text-align: right;
}

.lm-wizard-btn-secondary:hover {
    background: #e8e9ea;
}

.lm-wizard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Frame Selection (Step 1)
   ========================================================================== */
.lm-wizard-frames {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.lm-wizard-frame-card {
    flex: 0 0 auto;
    min-width: 100px;
    padding: 12px;
    border: 2px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    text-align: center;
    cursor: pointer;
    transition: all var(--wizard-transition);
    scroll-snap-align: start;
    background: #fff;
}

.lm-wizard-frame-card:hover {
    border-color: var(--wizard-primary);
}

.lm-wizard-frame-card.selected {
    border-color: var(--wizard-primary);
    background: rgba(34, 113, 177, 0.05);
}

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

.lm-wizard-frame-price {
    font-size: 14px;
    color: var(--wizard-text-light);
}

.lm-wizard-frame-card.popular {
    position: relative;
}

.lm-wizard-frame-card.popular::before {
    content: 'Beliebt';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--wizard-warning);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Color Selection */
.lm-wizard-colors {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lm-wizard-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all var(--wizard-transition);
    position: relative;
}

.lm-wizard-color-swatch:hover {
    transform: scale(1.1);
}

.lm-wizard-color-swatch.selected {
    border-color: var(--wizard-primary);
}

.lm-wizard-color-swatch.selected::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Size Slider */
.lm-wizard-size-control {
    margin-top: 16px;
}

.lm-wizard-size-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.lm-wizard-size-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: var(--wizard-border);
    border-radius: 4px;
    outline: none;
}

.lm-wizard-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--wizard-primary);
    border-radius: 50%;
    cursor: pointer;
}

.lm-wizard-size-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--wizard-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* ==========================================================================
   Marker Selection (Step 2)
   ========================================================================== */
.lm-wizard-marker-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.lm-wizard-marker-type {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    cursor: pointer;
    font-size: 24px;
    transition: all var(--wizard-transition);
    background: #fff;
}

.lm-wizard-marker-type:hover {
    border-color: var(--wizard-primary);
    transform: scale(1.05);
}

.lm-wizard-marker-type.selected {
    border-color: var(--wizard-primary);
    background: rgba(34, 113, 177, 0.1);
}

.lm-wizard-marker-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lm-wizard-marker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--wizard-bg);
    border-radius: var(--wizard-radius);
    margin-bottom: 8px;
}

.lm-wizard-marker-remove {
    background: none;
    border: none;
    color: var(--wizard-danger);
    cursor: pointer;
    font-size: 18px;
}

/* ==========================================================================
   Summary & Actions (Step 3)
   ========================================================================== */
.lm-wizard-summary {
    background: var(--wizard-bg);
    padding: 16px;
    border-radius: var(--wizard-radius);
    margin-bottom: 16px;
}

.lm-wizard-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--wizard-border);
}

.lm-wizard-summary-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 18px;
}

.lm-wizard-generate-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-bottom: 12px;
}

.lm-wizard-action-btns {
    display: flex;
    gap: 12px;
}

.lm-wizard-action-btns .lm-wizard-btn {
    flex: 1;
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.lm-wizard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}

.lm-wizard-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--wizard-border);
    border-top-color: var(--wizard-primary);
    border-radius: 50%;
    animation: wizard-spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.lm-wizard-loading-text {
    color: var(--wizard-text-light);
    font-size: 14px;
}

/* Progress Bar */
.lm-wizard-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--wizard-border);
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 0;
}

.lm-wizard-progress-fill {
    height: 100%;
    background: var(--wizard-primary);
    transition: width 0.3s ease;
}

/* ==========================================================================
   Mobile Preview (Replaces Map)
   ========================================================================== */
@media (max-width: 767px) {
    .lm-wizard-map-area.preview-mode .lm-wizard-map {
        display: none;
    }

    .lm-wizard-map-area.preview-mode .lm-wizard-mobile-preview {
        display: flex;
    }

    .lm-wizard-mobile-preview {
        display: none;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: var(--wizard-bg);
    }

    .lm-wizard-mobile-preview-image {
        max-width: 100%;
        max-height: 50vh;
        object-fit: contain;
        border-radius: var(--wizard-radius);
        box-shadow: 0 4px 16px var(--wizard-shadow);
    }

    .lm-wizard-mobile-preview-nav {
        display: flex;
        gap: 8px;
        margin-top: 16px;
    }

    .lm-wizard-mobile-preview-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--wizard-border);
    }

    .lm-wizard-mobile-preview-dot.active {
        background: var(--wizard-primary);
    }

    .lm-wizard-back-to-map {
        margin-top: 16px;
        padding: 12px 24px;
        background: #fff;
        border: 1px solid var(--wizard-border);
        border-radius: var(--wizard-radius);
        cursor: pointer;
    }
}

/* ==========================================================================
   Data Quality Modal
   ========================================================================== */
.lm-wizard-quality-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
}

.lm-wizard-quality-modal.active {
    display: flex;
}

.lm-wizard-quality-modal-content {
    background: #fff;
    border-radius: var(--wizard-radius);
    padding: 24px;
    max-width: 400px;
    width: 90%;
}

.lm-wizard-quality-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.lm-wizard-quality-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--wizard-text-light);
}

.lm-wizard-quality-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.lm-wizard-quality-bar-label {
    width: 80px;
    font-size: 14px;
}

.lm-wizard-quality-bar-track {
    flex: 1;
    height: 12px;
    background: var(--wizard-border);
    border-radius: 6px;
    overflow: hidden;
}

.lm-wizard-quality-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.lm-wizard-quality-bar-fill.high {
    background: var(--wizard-success);
}

.lm-wizard-quality-bar-fill.medium {
    background: var(--wizard-warning);
}

.lm-wizard-quality-bar-fill.low {
    background: var(--wizard-danger);
}

.lm-wizard-quality-bar-value {
    width: 40px;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================================================
   Notifications
   ========================================================================== */
.lm-wizard-notifications {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 90%;
    width: 400px;
}

.lm-wizard-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--wizard-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

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

.lm-wizard-notification-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.lm-wizard-notification-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.lm-wizard-notification-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.lm-wizard-notification-message {
    flex: 1;
    font-size: 14px;
}

.lm-wizard-notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    padding: 0 0 0 12px;
    line-height: 1;
}

.lm-wizard-notification-close:hover {
    opacity: 1;
}

/* ==========================================================================
   Inline Preview (Step 3)
   ========================================================================== */
.lm-wizard-preview-inline {
    min-height: 200px;
}

.lm-wizard-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--wizard-bg);
    border: 2px dashed var(--wizard-border);
    border-radius: var(--wizard-radius);
    color: var(--wizard-text-light);
    text-align: center;
}

.lm-wizard-preview-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Hide placeholder when preview is loaded */
.lm-wizard-preview-inline.has-preview .lm-wizard-preview-placeholder {
    display: none;
}

/* Hide preview actions (button + hint) when preview is loaded */
.lm-wizard-step-content.has-preview .lm-wizard-preview-actions {
    display: none;
}

/* Step 3 Generate Preview Button */
#lm-step3-generate-preview {
    width: 100%;
    margin-bottom: 16px;
    padding: 14px 20px;
    font-size: 15px;
}

#lm-step3-generate-preview .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

/* Loading state in preview step */
.lm-wizard-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.lm-wizard-preview-loading .lm-wizard-spinner {
    width: 50px;
    height: 50px;
    border-width: 4px;
    margin-bottom: 20px;
}

.lm-wizard-preview-loading .lm-wizard-loading-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--wizard-text);
    margin: 0 0 8px 0;
}

.lm-wizard-preview-loading .lm-wizard-loading-hint {
    font-size: 14px;
    color: var(--wizard-text-light);
    margin: 0;
}

/* Preview gallery inside step 3 */
.lm-wizard-preview-inline .lm-preview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.lm-wizard-preview-inline .lm-preview-item {
    background: var(--wizard-bg);
    border-radius: var(--wizard-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--wizard-shadow);
}

.lm-wizard-preview-inline .lm-preview-item h4 {
    margin: 0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border-bottom: 1px solid var(--wizard-border);
}

.lm-wizard-preview-inline .lm-preview-item img {
    width: 100%;
    height: auto;
    display: block;
}

.lm-wizard-preview-inline .lm-preview-item a {
    display: block;
    transition: transform var(--wizard-transition);
}

.lm-wizard-preview-inline .lm-preview-item a:hover {
    transform: scale(1.02);
}

/* Mobile: Single column preview */
@media (max-width: 767px) {
    .lm-wizard-preview-inline .lm-preview-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lm-wizard-preview-placeholder {
        padding: 30px 16px;
    }

    .lm-wizard-preview-placeholder .dashicons {
        font-size: 36px;
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.lm-wizard-hidden {
    display: none !important;
}

.lm-wizard-text-center {
    text-align: center;
}

.lm-wizard-text-muted {
    color: var(--wizard-text-light);
}

.lm-wizard-mb-0 { margin-bottom: 0; }
.lm-wizard-mb-8 { margin-bottom: 8px; }
.lm-wizard-mb-16 { margin-bottom: 16px; }
.lm-wizard-mt-16 { margin-top: 16px; }

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */
.lm-wizard-panel-content::-webkit-scrollbar,
.lm-wizard-frames::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.lm-wizard-panel-content::-webkit-scrollbar-track,
.lm-wizard-frames::-webkit-scrollbar-track {
    background: transparent;
}

.lm-wizard-panel-content::-webkit-scrollbar-thumb,
.lm-wizard-frames::-webkit-scrollbar-thumb {
    background: var(--wizard-border);
    border-radius: 3px;
}

.lm-wizard-panel-content::-webkit-scrollbar-thumb:hover,
.lm-wizard-frames::-webkit-scrollbar-thumb:hover {
    background: var(--wizard-text-light);
}

/* ==========================================================================
   Preview Overlay
   ========================================================================== */

/* Overlay backdrop */
.lm-preview-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lm-preview-overlay.is-visible {
    display: block;
    opacity: 1;
}

.lm-preview-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

/* Desktop overlay container */
.lm-preview-overlay.is-desktop .lm-preview-overlay-container {
    background: var(--wizard-surface);
    border-radius: var(--wizard-radius-lg);
    box-shadow: var(--wizard-shadow-lg);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.lm-preview-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--wizard-border);
    background: var(--wizard-surface);
}

.lm-preview-overlay-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--wizard-text);
}

.lm-preview-overlay-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--wizard-text-light);
    transition: all var(--wizard-transition);
}

.lm-preview-overlay-close:hover {
    background: var(--wizard-bg);
    color: var(--wizard-text);
}

.lm-preview-overlay-close .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.lm-preview-overlay-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.lm-preview-overlay-content .lm-preview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.lm-preview-overlay-content .lm-preview-item {
    background: var(--wizard-bg);
    border-radius: var(--wizard-radius);
    overflow: hidden;
}

.lm-preview-overlay-content .lm-preview-item h4 {
    margin: 0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    background: var(--wizard-surface);
    border-bottom: 1px solid var(--wizard-border);
}

.lm-preview-overlay-content .lm-preview-item img {
    width: 100%;
    height: auto;
    display: block;
}

.lm-preview-overlay-content .lm-preview-item a {
    display: block;
}

.lm-preview-overlay-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--wizard-border);
    background: var(--wizard-bg);
}

.lm-preview-overlay-back {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lm-preview-overlay-back .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Mobile fullscreen overlay */
.lm-preview-overlay.is-mobile .lm-preview-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--wizard-surface);
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.lm-preview-overlay.is-mobile .lm-preview-overlay-header {
    position: sticky;
    top: 0;
    z-index: 1;
}

.lm-preview-overlay.is-mobile .lm-preview-overlay-content {
    padding: 16px;
}

.lm-preview-overlay.is-mobile .lm-preview-overlay-content .lm-preview-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
}

.lm-preview-overlay.is-mobile .lm-preview-overlay-footer {
    position: sticky;
    bottom: 0;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.lm-preview-overlay.is-mobile .lm-preview-overlay-back {
    width: 100%;
    justify-content: center;
}

.lm-preview-overlay.is-mobile .lm-preview-overlay-actions {
    width: 100%;
}

.lm-preview-overlay.is-mobile .lm-preview-overlay-actions .action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lm-preview-overlay.is-mobile .lm-preview-overlay-actions .button {
    width: 100%;
    justify-content: center;
}

/* Body state when overlay is open */
body.lm-preview-overlay-open {
    overflow: hidden;
}

/* Animation */
.lm-preview-overlay .lm-preview-overlay-container {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lm-preview-overlay.is-visible .lm-preview-overlay-container {
    transform: translateY(0);
    opacity: 1;
}

/* Desktop-specific positioning */
@media (min-width: 1024px) {
    .lm-preview-overlay.is-desktop .lm-preview-overlay-container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Map Area Preview (Option A: Preview replaces map)
   ========================================================================== */

/* Preview View Container */
.lm-map-preview-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 24px;
    box-sizing: border-box;
}

.lm-map-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.lm-map-preview-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--wizard-text);
}

.lm-map-preview-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    cursor: pointer;
    transition: all var(--wizard-transition);
}

.lm-map-preview-back:hover {
    background: var(--wizard-bg);
    border-color: var(--wizard-primary);
}

.lm-map-preview-back .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Preview Gallery Grid */
.lm-map-preview-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.lm-map-preview-item {
    background: #fff;
    border-radius: var(--wizard-radius);
    box-shadow: 0 2px 8px var(--wizard-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--wizard-transition), box-shadow var(--wizard-transition);
}

.lm-map-preview-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.lm-map-preview-label {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    background: var(--wizard-bg);
    color: var(--wizard-text);
    border-bottom: 1px solid var(--wizard-border);
}

.lm-map-preview-item a {
    display: block;
    flex: 1;
    overflow: hidden;
}

.lm-map-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--wizard-transition);
}

.lm-map-preview-item:hover img {
    transform: scale(1.05);
}

/* Main Image Carousel Layout */
.lm-map-preview-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: var(--wizard-radius);
    box-shadow: 0 2px 8px var(--wizard-shadow);
    overflow: hidden;
    min-height: 0;
    position: relative;
}

.lm-map-preview-main a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.lm-map-preview-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform var(--wizard-transition);
}

.lm-map-preview-main a:hover img {
    transform: scale(1.02);
}

.lm-preview-main-label {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
}

/* Thumbnail Navigation Strip */
.lm-map-preview-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 16px 0;
    flex-shrink: 0;
}

.lm-preview-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #fff;
    border: 2px solid var(--wizard-border);
    border-radius: var(--wizard-radius);
    cursor: pointer;
    transition: all var(--wizard-transition);
    min-width: 80px;
}

.lm-preview-thumb:hover {
    border-color: var(--wizard-primary);
    box-shadow: 0 2px 8px var(--wizard-shadow);
}

.lm-preview-thumb.active {
    border-color: var(--wizard-primary);
    background: var(--wizard-primary-light);
}

.lm-preview-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.lm-preview-thumb-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--wizard-text);
    text-align: center;
}

.lm-preview-thumb.active .lm-preview-thumb-label {
    color: var(--wizard-primary);
}

/* Preview Actions */
.lm-map-preview-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-shrink: 0;
}

.lm-map-preview-btn-primary,
.lm-map-preview-btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--wizard-radius);
    cursor: pointer;
    transition: all var(--wizard-transition);
}

.lm-map-preview-btn-primary {
    background: var(--wizard-primary);
    border: none;
    color: #fff;
}

.lm-map-preview-btn-primary:hover {
    background: var(--wizard-primary-hover);
}

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

.lm-map-preview-btn-secondary:hover {
    border-color: var(--wizard-primary);
    color: var(--wizard-primary);
}

.lm-map-preview-btn-primary .dashicons,
.lm-map-preview-btn-secondary .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.lm-map-preview-btn-report {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--wizard-radius);
    cursor: pointer;
    transition: all var(--wizard-transition);
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.lm-map-preview-btn-report:hover {
    background: #dc3545;
    color: #fff;
}

.lm-map-preview-btn-report .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.lm-map-preview-hint {
    margin: 12px 0 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--wizard-text-light);
}

/* Loading State */
.lm-map-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px;
}

.lm-map-preview-loading-content {
    text-align: center;
    max-width: 400px;
}

.lm-map-preview-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    border: 4px solid var(--wizard-border);
    border-top-color: var(--wizard-primary);
    border-radius: 50%;
    animation: wizard-spin 1s linear infinite;
}

.lm-map-preview-loading-text h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--wizard-text);
}

.lm-map-preview-loading-text p {
    margin: 0;
    font-size: 14px;
    color: var(--wizard-text-light);
}

.lm-map-preview-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.lm-map-preview-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--wizard-border);
    border-radius: 4px;
    overflow: hidden;
}

.lm-map-preview-progress-fill {
    height: 100%;
    background: var(--wizard-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.lm-map-preview-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--wizard-primary);
    min-width: 45px;
    text-align: right;
}

/* Error State */
.lm-map-preview-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #fff5f5 0%, #fee 100%);
    padding: 40px;
}

.lm-map-preview-error-content {
    text-align: center;
    max-width: 400px;
}

.lm-map-preview-error-content .dashicons-warning {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--wizard-danger);
    margin-bottom: 16px;
}

.lm-map-preview-error-content h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--wizard-danger);
}

.lm-map-preview-error-content p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: var(--wizard-text);
}

/* Success State in Step 3 */
.lm-wizard-preview-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #e8f5e9;
    border-radius: var(--wizard-radius);
    color: #2e7d32;
    font-weight: 500;
}

.lm-wizard-preview-success .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--wizard-success);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .lm-map-preview-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .lm-map-preview-view {
        padding: 16px;
    }

    .lm-map-preview-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .lm-map-preview-header h3 {
        font-size: 18px;
    }

    .lm-map-preview-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lm-map-preview-thumbnails {
        gap: 8px;
        padding: 12px 0;
    }

    .lm-preview-thumb {
        padding: 6px;
        min-width: 60px;
    }

    .lm-preview-thumb img {
        width: 45px;
        height: 45px;
    }

    .lm-preview-thumb-label {
        font-size: 10px;
    }

    .lm-preview-main-label {
        font-size: 12px;
        padding: 5px 12px;
    }

    .lm-map-preview-actions {
        flex-direction: column;
    }

    .lm-map-preview-btn-primary,
    .lm-map-preview-btn-secondary,
    .lm-map-preview-btn-report {
        padding: 12px 20px;
    }
}
