/**
 * Designer Beta - Scrollable Single-Page CSS
 *
 * Simple scrollable page layout with sticky bottom navigation.
 * No overlays, no modals, just scroll.
 */

/* Google Fonts - Lato */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;500;600;700&display=swap');

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* CD Colors (Corporate Design) */
    --lm-cd-light-blue: #d7ebff;
    --lm-cd-blue: #156ae5;
    --lm-cd-dark-blue: #00418e;
    --lm-cd-muted-blue: #4778a8;
    --lm-cd-teal: #10e393;
    --lm-cd-dark: #0a131c;

    /* Primary colors based on CD */
    --lm-primary: #156ae5;
    --lm-primary-hover: #00418e;
    --lm-success: #10e393;
    --lm-success-hover: #0bc77d;
    --lm-warning: #dba617;
    --lm-danger: #d63638;
    --lm-text: #0a131c;
    --lm-text-light: #4778a8;
    --lm-border: #c3c4c7;
    --lm-bg: #f6f7f7;
    --lm-bg-white: #ffffff;
    --lm-radius: 8px;
    --lm-radius-lg: 12px;
    --lm-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    --lm-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.16);
    --lm-transition: 0.2s ease;

    /* Safe areas for iPhone notch/home indicator */
    --lm-safe-top: env(safe-area-inset-top, 0px);
    --lm-safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Font family */
    --lm-font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base font */
.lm-designer-page,
.lm-designer-page * {
    font-family: var(--lm-font-family);
}

/* ============================================
   Page Container
   ============================================ */
.lm-designer-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
    padding-bottom: calc(80px + var(--lm-safe-bottom)); /* Space for sticky nav */
    background: var(--lm-bg-white);
}

/* ============================================
   Section Styling
   ============================================ */
.lm-section {
    padding: 24px 0;
    border-bottom: 1px solid var(--lm-border);
}

.lm-section:last-of-type {
    border-bottom: none;
}

.lm-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.lm-section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--lm-primary);
    color: var(--lm-bg-white);
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.lm-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--lm-text);
    margin: 0;
}

.lm-section-title .lm-optional {
    font-size: 14px;
    font-weight: 400;
    color: var(--lm-text-light);
}

.lm-section-desc {
    font-size: 14px;
    color: var(--lm-text-light);
    margin: 0 0 16px;
}

.lm-section-content {
    /* Content area */
}

/* ============================================
   Frame Selection Grid
   ============================================ */
.lm-frames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.lm-frame-card {
    padding: 16px;
    background: var(--lm-bg-white);
    border: 2px solid var(--lm-border);
    border-radius: var(--lm-radius);
    cursor: pointer;
    transition: all var(--lm-transition);
    text-align: center;
}

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

.lm-frame-card.selected {
    border-color: var(--lm-primary);
    background: #e8f4fc;
}

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

.lm-frame-card.popular::before {
    content: 'Beliebt';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    background: var(--lm-warning);
    color: var(--lm-text);
    font-size: 10px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.lm-frame-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--lm-text);
    margin-bottom: 4px;
}

.lm-frame-size {
    font-size: 12px;
    color: var(--lm-text-light);
    margin-bottom: 8px;
}

.lm-frame-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--lm-primary);
}

/* ============================================
   Search Bar
   ============================================ */
.lm-search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--lm-bg-white);
    border: 2px solid var(--lm-border);
    border-radius: var(--lm-radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color var(--lm-transition);
}

.lm-search-bar:focus-within {
    border-color: var(--lm-primary);
}

/* Icon-only search button */
.lm-search-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 44px;
    padding: 0;
    background: var(--lm-primary);
    border: none;
    cursor: pointer;
    transition: background var(--lm-transition);
    flex-shrink: 0;
}

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

.lm-search-icon-btn .dashicons {
    color: var(--lm-bg-white);
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.lm-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--lm-text);
    outline: none;
    padding: 12px 14px;
    min-width: 0;
}

.lm-search-bar input::placeholder {
    color: var(--lm-text-light);
}

/* Legacy search button (not used in new design) */
.lm-search-btn {
    padding: 8px 16px;
    background: var(--lm-primary);
    color: var(--lm-bg-white);
    border: none;
    border-radius: var(--lm-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--lm-transition);
}

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

/* Search Results Dropdown */
.lm-search-results {
    background: var(--lm-bg-white);
    border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius);
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.lm-search-result-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--lm-border);
    cursor: pointer;
    font-size: 14px;
    transition: background var(--lm-transition);
}

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

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

/* ============================================
   Map Container
   ============================================ */
.lm-map-container {
    position: relative;
    height: 55vh;
    min-height: 300px;
    max-height: 450px;
    border-radius: var(--lm-radius-lg);
    overflow: hidden;
    background: var(--lm-bg);
}

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

.lm-map .leaflet-container,
#lm-designer-map {
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
}

/* Size badge below map */
.lm-map-size-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: var(--lm-cd-dark-blue);
    color: var(--lm-bg-white);
    border-radius: var(--lm-radius);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.lm-map-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--lm-text-light);
}

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

/* ============================================
   DOM-Based BBox Selector (CityLoader Style)
   ============================================ */
.lm-bbox-selector {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

/* Shade overlay - 4 boxes around the selection */
.lm-bbox-shade {
    position: absolute;
    background: rgba(10, 19, 28, 0.4);
    pointer-events: none;
}

/* The selected area box */
.lm-bbox-selected {
    position: absolute;
    border: 3px solid var(--lm-cd-blue);
    background: rgba(21, 106, 229, 0.08);
    box-sizing: border-box;
    pointer-events: auto;
    cursor: move;
    touch-action: none;
}

/* Corner handles */
.lm-bbox-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--lm-bg-white);
    border: 2px solid var(--lm-cd-blue);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: auto;
    touch-action: none;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, background 0.15s ease;
    z-index: 1001;
}

.lm-bbox-handle:hover {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--lm-cd-light-blue);
}

.lm-bbox-handle.dragging {
    transform: translate(-50%, -50%) scale(1.2);
    background: var(--lm-cd-light-blue);
}

.lm-bbox-handle-nw { cursor: nw-resize; }
.lm-bbox-handle-ne { cursor: ne-resize; }
.lm-bbox-handle-sw { cursor: sw-resize; }
.lm-bbox-handle-se { cursor: se-resize; }

/* Size labels on edges */
.lm-bbox-size-label {
    position: absolute;
    background: var(--lm-cd-dark-blue);
    color: var(--lm-bg-white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1002;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.lm-bbox-size-label-width {
    transform: translateX(-50%);
}

.lm-bbox-size-label-height {
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Mobile: larger touch targets */
@media (max-width: 768px) {
    .lm-bbox-handle {
        width: 28px;
        height: 28px;
    }

    .lm-bbox-size-label {
        font-size: 11px;
        padding: 3px 8px;
    }
}

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

.lm-color-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    background: var(--lm-bg-white);
    border: 2px solid var(--lm-border);
    border-radius: var(--lm-radius);
    cursor: pointer;
    transition: all var(--lm-transition);
    min-width: 80px;
}

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

.lm-color-card.selected {
    border-color: var(--lm-primary);
    background: #e8f4fc;
}

.lm-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--lm-border);
}

.lm-color-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--lm-text);
    text-align: center;
}

.lm-hint {
    font-size: 14px;
    color: var(--lm-text-light);
    font-style: italic;
}

/* ============================================
   Marker Section
   ============================================ */

/* Step labels */
.lm-marker-step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--lm-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Style section */
.lm-marker-style-section {
    margin-bottom: 16px;
}

/* Divider */
.lm-marker-divider {
    height: 1px;
    background: var(--lm-border);
    margin: 20px 0;
}

/* Placement section */
.lm-marker-placement-section {
    margin-bottom: 16px;
}

.lm-placement-option {
    margin-bottom: 16px;
}

.lm-placement-option:last-child {
    margin-bottom: 0;
}

.lm-placement-option-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--lm-text);
    margin-bottom: 8px;
}

.lm-placement-option-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--lm-text-light);
}

/* Inline search bar variant */
.lm-search-bar-inline {
    display: flex;
    margin-bottom: 0;
}

.lm-search-bar-inline input {
    border-radius: var(--lm-radius) 0 0 var(--lm-radius);
}

.lm-search-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    padding: 0;
    background: var(--lm-primary);
    border: 2px solid var(--lm-primary);
    border-left: none;
    border-radius: 0 var(--lm-radius) var(--lm-radius) 0;
    cursor: pointer;
    transition: background var(--lm-transition);
}

.lm-search-submit-btn:hover {
    background: var(--lm-primary-hover);
    border-color: var(--lm-primary-hover);
}

.lm-search-submit-btn .dashicons {
    color: var(--lm-bg-white);
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.lm-marker-search {
    margin-bottom: 0;
}

.lm-marker-search .lm-search-results {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
}

.lm-marker-search-result .dashicons {
    color: var(--lm-primary);
    margin-right: 8px;
}

.lm-marker-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.lm-marker-colors,
.lm-marker-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lm-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--lm-text);
}

.lm-color-swatches,
.lm-icon-options {
    display: flex;
    gap: 8px;
}

.lm-marker-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--lm-transition);
}

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

.lm-marker-color-swatch.selected {
    box-shadow: 0 0 0 2px var(--lm-bg-white), 0 0 0 4px var(--lm-primary);
}

.lm-marker-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--lm-bg);
    border: 2px solid var(--lm-border);
    border-radius: var(--lm-radius);
    cursor: pointer;
    transition: all var(--lm-transition);
}

.lm-marker-icon-btn:hover {
    border-color: var(--lm-primary);
}

.lm-marker-icon-btn.selected {
    border-color: var(--lm-primary);
    background: #e8f4fc;
}

.lm-add-marker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--lm-bg);
    border: 2px dashed var(--lm-border);
    border-radius: var(--lm-radius);
    color: var(--lm-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--lm-transition);
}

.lm-add-marker-btn:hover {
    border-color: var(--lm-primary);
    color: var(--lm-primary);
}

.lm-add-marker-btn.active {
    background: #e8f4fc;
    border-color: var(--lm-primary);
    border-style: solid;
    color: var(--lm-primary);
}

.lm-marker-list {
    margin-top: 20px;
}

.lm-marker-list:empty {
    display: none;
}

.lm-marker-list-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--lm-text-light);
    margin-bottom: 8px;
}

.lm-marker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--lm-bg);
    border: 2px solid transparent;
    border-radius: var(--lm-radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--lm-transition);
}

.lm-marker-item:hover {
    border-color: var(--lm-border);
}

.lm-marker-item.editing {
    border-color: var(--lm-primary);
    background: #e8f4fc;
}

.lm-marker-item:last-child {
    margin-bottom: 0;
}

.lm-marker-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.lm-marker-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lm-marker-item-icon .dashicons {
    color: #fff;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.lm-marker-item-text {
    flex: 1;
    min-width: 0;
}

.lm-marker-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--lm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lm-marker-item-hint {
    font-size: 12px;
    color: var(--lm-text-light);
}

.lm-marker-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lm-marker-item-move,
.lm-marker-item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--lm-transition);
}

.lm-marker-item-move {
    color: var(--lm-primary);
}

.lm-marker-item-move:hover {
    background: rgba(21, 106, 229, 0.1);
}

.lm-marker-item-move.active {
    background: var(--lm-primary);
    color: #fff;
}

.lm-marker-item-remove {
    color: var(--lm-danger);
}

.lm-marker-item-remove:hover {
    background: rgba(214, 54, 56, 0.1);
}

/* Edit mode indicator */
.lm-marker-edit-banner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--lm-primary);
    color: #fff;
    border-radius: var(--lm-radius);
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
}

.lm-marker-edit-banner.active {
    display: flex;
}

.lm-marker-edit-banner .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.lm-marker-edit-cancel {
    margin-left: auto;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--lm-radius);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.lm-marker-edit-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Marker Edit Overlay (Fixed Pin Mode)
   ============================================ */
.lm-marker-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
}

.lm-marker-edit-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.lm-marker-edit-pin {
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 3px solid #fff;
}

.lm-marker-edit-pin .dashicons {
    transform: rotate(45deg);
    color: #fff;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.lm-marker-edit-shadow {
    width: 20px;
    height: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    margin-top: 4px;
}

.lm-marker-edit-toolbar {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: var(--lm-bg-white);
    border-radius: var(--lm-radius-lg);
    padding: 16px;
    box-shadow: var(--lm-shadow-lg);
    pointer-events: auto;
}

.lm-marker-edit-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--lm-text);
    margin-bottom: 12px;
}

.lm-marker-edit-hint .dashicons {
    color: var(--lm-primary);
}

.lm-marker-edit-buttons {
    display: flex;
    gap: 10px;
}

.lm-marker-edit-cancel-btn {
    flex: 1;
    padding: 12px;
    background: var(--lm-bg);
    border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--lm-text);
    cursor: pointer;
    transition: background var(--lm-transition);
}

.lm-marker-edit-cancel-btn:hover {
    background: var(--lm-border);
}

.lm-marker-edit-confirm-btn {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: var(--lm-success);
    border: none;
    border-radius: var(--lm-radius);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background var(--lm-transition);
}

.lm-marker-edit-confirm-btn:hover {
    background: var(--lm-success-hover);
}

.lm-marker-edit-confirm-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ============================================
   Order Summary
   ============================================ */
.lm-order-summary {
    padding: 16px;
    background: var(--lm-bg);
    border-radius: var(--lm-radius);
    margin-bottom: 16px;
}

.lm-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

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

.lm-summary-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--lm-text);
}

.lm-summary-total {
    border-top: 1px solid var(--lm-border);
    margin-top: 8px;
    padding-top: 12px;
}

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

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

/* ============================================
   Preview Button & Status
   ============================================ */
.lm-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: var(--lm-primary);
    color: var(--lm-bg-white);
    border: none;
    border-radius: var(--lm-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--lm-transition);
}

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

.lm-preview-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lm-preview-status {
    margin-top: 16px;
    text-align: center;
}

.lm-progress {
    height: 6px;
    background: var(--lm-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.lm-status-text {
    font-size: 14px;
    color: var(--lm-text-light);
    margin: 0;
}

/* Preview Result Images */
.lm-preview-result {
    margin-top: 16px;
}

.lm-preview-images {
    text-align: center;
}

.lm-preview-main {
    background: var(--lm-bg);
    border-radius: var(--lm-radius);
    overflow: hidden;
    margin-bottom: 12px;
}

.lm-preview-main img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    cursor: zoom-in;
    transition: transform var(--lm-transition);
}

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

.lm-preview-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.lm-thumb {
    padding: 8px 16px;
    background: var(--lm-bg);
    border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--lm-transition);
}

.lm-thumb:hover {
    border-color: var(--lm-primary);
}

.lm-thumb.active {
    background: #e8f4fc;
    border-color: var(--lm-primary);
    color: var(--lm-primary);
}

/* ============================================
   Cart Button
   ============================================ */
.lm-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    background: var(--lm-success);
    color: var(--lm-bg-white);
    border: none;
    border-radius: var(--lm-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--lm-transition);
}

.lm-cart-btn:hover {
    background: var(--lm-success-hover);
}

.lm-cart-price {
    font-weight: 700;
}

/* ============================================
   Sticky Bottom Navigation (CD-Farben)
   ============================================ */
.lm-sticky-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: linear-gradient(180deg, var(--lm-cd-dark-blue) 0%, var(--lm-cd-dark) 100%);
    border-top: 2px solid var(--lm-cd-teal);
    padding: 10px 0;
    padding-bottom: max(10px, var(--lm-safe-bottom));
    z-index: 9999; /* Ensure always on top */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.lm-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--lm-cd-light-blue);
    text-decoration: none;
    font-size: 11px;
    transition: all var(--lm-transition);
    border-radius: var(--lm-radius);
    position: relative;
}

.lm-nav-item:hover {
    color: var(--lm-bg-white);
    background: rgba(255, 255, 255, 0.1);
}

.lm-nav-item.active {
    color: var(--lm-cd-teal);
}

.lm-nav-item.active::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--lm-cd-teal);
    border-radius: 0 0 3px 3px;
}

.lm-nav-item .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.lm-nav-label {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ============================================
   Loading State
   ============================================ */
.lm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--lm-text-light);
}

/* ============================================
   Bottom Spacer (ensures content visible above sticky nav)
   ============================================ */
.lm-bottom-spacer {
    height: 100px;
}

/* ============================================
   Modal Styles (Coverage Warning, etc.)
   ============================================ */
.lm-stl-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.lm-stl-modal.active {
    display: flex;
}

.lm-stl-modal .lm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.lm-stl-modal .lm-modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--lm-radius-lg);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--lm-shadow-lg);
}

.lm-stl-modal .lm-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--lm-text-light);
}

.lm-stl-modal h3 {
    margin: 0 0 16px;
}

.lm-stl-modal .lm-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.lm-stl-modal .button {
    padding: 10px 20px;
    border-radius: var(--lm-radius);
    font-weight: 500;
    cursor: pointer;
}

/* Coverage warning/error specific */
.coverage-warning-icon,
.coverage-error-icon {
    text-align: center;
    margin-bottom: 16px;
}

.coverage-warning-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #f59e0b;
}

.coverage-error-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #dc2626;
}

.coverage-missing-list {
    background: #fef3c7;
    border-radius: var(--lm-radius);
    padding: 12px;
    margin: 12px 0;
}

.coverage-missing-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.coverage-missing-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
}

#lm-coverage-continue-btn {
    background: var(--lm-primary);
    color: #fff;
    border: none;
}

#lm-coverage-report-btn {
    background: var(--lm-bg);
    border: 1px solid var(--lm-border);
}

/* ============================================
   Preview Lightbox
   ============================================ */
.lm-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.lm-lightbox.active {
    display: flex;
}

.lm-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--lm-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lm-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--lm-transition);
}

.lm-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lm-lightbox-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* ============================================
   Responsive
   ============================================ */
@media (min-width: 768px) {
    .lm-designer-page {
        max-width: 700px;
        padding: 0 24px;
    }

    .lm-section {
        padding: 32px 0;
    }

    .lm-frames-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lm-map-container {
        height: 50vh;
        max-height: 500px;
    }
}

/* Landscape mobile */
@media (orientation: landscape) and (max-height: 500px) {
    .lm-map-container {
        height: 70vh;
        max-height: none;
    }

    .lm-sticky-nav {
        padding: 6px 0;
    }

    .lm-nav-label {
        display: none;
    }
}