/**
 * Location Viewer Styles
 */

/* Container */
.location-viewer-container {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    min-height: 400px;
}

/* Header Bar */
.lv-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    gap: 15px;
    flex-wrap: wrap;
}

.lv-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.lv-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 0;
}

.view-switcher button {
    padding: 8px 16px;
    border: none;
    background: #e0e0e0;
    color: #333;
    cursor: pointer;
    margin: 0;
    position: relative;
}

/* First visible button - rounded left corners */
.view-switcher button.first-visible {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

/* Last visible button - rounded right corners */
.view-switcher button.last-visible {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Middle buttons - no radius */
.view-switcher button:not(.first-visible):not(.last-visible) {
    border-radius: 0;
}

.view-switcher button:focus {
    outline: none;
}

.view-switcher button:hover {
    background: #0073aa;
    color: white;
}

.view-switcher button.active {
    background: #005a87;
    color: white;
}

/* Content Areas */
.location-content {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 0; /* Allow flex items to shrink */
}

.grid-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    font-weight: normal;
}

/* Editor-specific grid-area adjustments */
.block-editor-writing-flow .grid-area {
    overflow-y: hidden;
    align-items: start !important;
    align-content: start !important;
}

/* Grid section headers - span all columns */
.lv-grid-section-header {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0 0 15px 0;
    padding: 0;
}

/* Add consistent top margin to all headers */
.lv-grid-section-header {
    margin-top: 15px;
}

.lv-grid-section-title {
    padding: 12px 16px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #888;
    border-radius: 0;
}

.lv-grid-section-title i {
    font-size: 16px;
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* Main grid container (when no headers) */
.lv-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
}

/* Editor placeholder grid */
.grid-container.editor-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
    padding: 0;
}

/* Grid view only - force responsive grid layout */
.view-grid .grid-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
    align-content: start;
}

/* Editor placeholder grid adjustments */
.view-grid .grid-area .grid-container.editor-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-content: start;
    width: 100%;
}

.view-split .grid-area .grid-container.editor-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    align-content: start;
    width: 100%;
}

/* Grid item styling */
.lv-grid-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.lv-grid-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.lv-grid-item.highlighted {
    box-shadow: 0 4px 16px rgba(0, 123, 170, 0.3);
}

/* Grid item highlighting for bidirectional map interactions */
.lv-grid-item.lv-grid-highlighted {
    box-shadow: 0 4px 16px rgba(17, 38, 66, 0.7) !important;
    border-color: #007acc;
}


/* Item image */
.lv-item-image {
    width: 100%;
    height: 160px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f5f5f5;
}

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

/* Item content */
.lv-item-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.lv-item-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.lv-item-title a {
    text-decoration: none;
    color: #333;
}

.lv-item-title a:hover {
    color: #007cba;
    text-decoration: underline;
}

.lv-item-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}


/* Item actions */
.lv-item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: auto;
}

.lv-item-actions .button {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #495057;
    transition: all 0.2s ease;
}

.lv-item-actions .button:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.lv-item-actions .lv-item-link {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.lv-item-actions .lv-item-link:hover {
    background: #006ba1;
    border-color: #006ba1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid-area {
        padding: 15px;
    }

    .lv-grid-section-title {
        font-size: 14px;
        padding: 10px 12px;
    }

    .lv-item-image {
        height: 160px;
    }

    /* Hide split view button on mobile */
    .view-switcher button[data-view="split"] {
        display: none;
    }
}

.map-area {
    background: #AAD3DF; /* Match OpenStreetMap water color */
    flex: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    min-height: 0; /* Allow flex to work */
}

/* Map area when it contains a map */
.map-area:has(.leaflet-container) {
    align-items: stretch;
    justify-content: stretch;
}

.map-area .leaflet-container {
    padding: 0;
    width: 100%;
    height: 100%;
    background: #AAD3DF; /* Override transparent to show water color */
    flex: 1;
}

/* Override Leaflet popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2);
}

.lv-marker-popup h4 {
    color: #333;
    font-weight: 600;
}

.lv-marker-popup p {
    line-height: 1.4;
}

.lv-marker-popup a {
    text-decoration: none;
    font-weight: 500;
}

.lv-marker-popup a:hover {
    text-decoration: underline;
}

/* Custom marker styles */
.lv-custom-marker {
    background: transparent !important;
    border: none !important;
}

/* ==========================================================================
   MAP CONTROLS & LEGEND STYLING
   ========================================================================== */

/* Leaflet zoom control styling */
.leaflet-top.leaflet-right {
    top: 10px !important;
    right: 10px !important;
}

.leaflet-control-zoom {
    margin: 0 !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    width: 32px !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    width: 32px !important;
    height: 32px !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
    text-decoration: none !important;
    background: #f5f5f5 !important;
}

.location-viewer-container .leaflet-control-attribution {
    margin-right: 10px;
}

/* Show All button */
.lv-show-all-wrapper {
    position: absolute;
    top: 84px;
    right: 10px;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.lv-show-all-control {
    background: white;
    border: none;
    border-radius: 2px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lv-show-all-wrapper:hover .lv-show-all-control {
    background: #f5f5f5;
}

.lv-show-all-control.disabled {
    background: #f9f9f9;
    cursor: not-allowed;
    opacity: 0.5;
}

.lv-show-all-control.disabled:hover {
    background: #f9f9f9;
}

.lv-show-all-control i {
    font-size: 14px;
    color: #333;
}

.lv-show-all-control.disabled i {
    color: #999;
}

/* Map Legend */
.lv-map-legend {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    font-size: 14px;
    backdrop-filter: blur(10px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    min-width: 150px;
    max-width: 250px;
}

/* Legend spacing when attribution is showing */
.lv-map-legend.has-attribution {
    bottom: 30px;
}

/* Legend toggle button (fixed at bottom) */
.lv-legend-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.2em 1em;
    cursor: pointer;
    user-select: none;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.lv-legend-toggle:hover {
    background: rgba(0,0,0,0.03);
}

.lv-legend-label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lv-legend-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
}

.lv-legend-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

/* Rotate arrow when collapsed */
.lv-map-legend.collapsed .lv-legend-arrow {
    transform: rotate(180deg);
}

/* Legend items container (scrollable, appears above toggle) */
.lv-legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .75em 1em;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
}

/* Hide items when collapsed */
.lv-map-legend.collapsed .lv-legend-items {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
}

/* Custom scrollbar styling */
.lv-legend-items::-webkit-scrollbar {
    width: 6px;
}

.lv-legend-items::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.lv-legend-items::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.lv-legend-items::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

.lv-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.lv-legend-item input[type="checkbox"] {
    display: none;
}

.lv-legend-item label {
    cursor: pointer;
    margin: 0;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.lv-legend-item .label-text {
    padding-top: 8px;
}

/* Legend icon container with stacked icons */
.lv-legend-item .icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding-top: 5px;
}

.lv-legend-item .icon i {
    font-size: 14px;
    text-shadow: none !important;
    filter: none !important;
}

/* Font Awesome stack for overlaying ban symbol */
.lv-legend-item .fa-stack {
    display: inline-block;
    width: 2em;
    height: 2em;
    line-height: 2em;
    position: relative;
    vertical-align: middle;
}

.lv-legend-item .fa-stack .fa-stack-1x {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1em;
}

.lv-legend-item .fa-stack .fa-stack-2x {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: #ff4444 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    display: none;
}

/* Show ban symbol on hover and when item is hidden */
.lv-legend-item:hover .fa-stack .fa-stack-2x {
    display: block;
}

.lv-legend-item.item-hidden .fa-stack .fa-stack-2x {
    display: block;
}

/* Disable hover effect temporarily when just clicked */
.lv-legend-item.no-hover:hover .fa-stack .fa-stack-2x {
    display: none;
}

/* Dim the item when hidden */
.lv-legend-item.item-hidden {
    opacity: 0.6;
}

/* Map popup styles */
.lv-marker-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.lv-marker-popup .popup-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px 6px 0 0;
}

.lv-marker-popup .popup-content {
    padding: 12px;
}

.lv-marker-popup h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.lv-marker-popup p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    font-weight: 400;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Override Leaflet popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 6px;
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
    width: 250px;
    box-sizing: border-box;
}

.leaflet-popup-tip {
    background: white;
}

/* Placeholder/error states when no map */
.map-area .lv-placeholder,
.map-area .lv-loading,
.map-area .lv-error {
    padding: 40px 20px;
    margin: 20px;
    border-radius: 4px;
}

/* View States */
.view-grid .map-area {
    display: none;
}

.view-map .grid-area {
    display: none;
}

.view-split .grid-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    align-content: start;
}

.view-split .map-area {
    display: flex;
}

/* Editor-specific view state overrides for proper display */
/* Use data attributes for more reliable targeting in editor */
.block-editor-writing-flow .location-viewer-container[data-current-view="grid"] .map-area {
    display: none !important;
}

.block-editor-writing-flow .location-viewer-container[data-current-view="grid"] .grid-area {
    display: block !important;
    width: 100%;
    padding: 20px;
}

.block-editor-writing-flow .location-viewer-container[data-current-view="map"] .grid-area {
    display: none !important;
}

.block-editor-writing-flow .location-viewer-container[data-current-view="map"] .map-area {
    display: flex !important;
}

.block-editor-writing-flow .location-viewer-container[data-current-view="split"] .grid-area {
    display: flex !important;
}

.block-editor-writing-flow .location-viewer-container[data-current-view="split"] .map-area {
    display: flex !important;
}

/* Split Positions */
.split-left .location-content {
    flex-direction: row;
}

.split-right .location-content {
    flex-direction: row-reverse;
}

.split-bottom .location-content {
    flex-direction: column-reverse;
}

/* Button Icons */
.view-switcher button i {
    margin-right: 5px;
}

/* Loading and Error States */
.lv-loading, .lv-error, .lv-placeholder {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.lv-error {
    color: #dc3232;
    background: #ffeaea;
    border: 1px solid #dc3232;
    border-radius: 4px;
    margin: 10px;
}

.lv-loading {
    background: #f0f8ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    margin: 10px;
}

.lv-placeholder {
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
    margin: 10px;
}

/* Admin Sources Tab Layout */
#lv-sources-list {
    margin: 20px 0;
}

.lv-source-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    background: #fff;
    margin-bottom: 8px;
    border-radius: 4px;
    gap: 15px;
}

.lv-source-item:hover {
    background: #f9f9f9;
}

.lv-drag-handle {
    color: #ccc;
    cursor: move;
    font-size: 16px;
}

.lv-status-toggle {
    border: none;
    outline: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
    min-width: 95px;
    color: white;
}

.lv-status-toggle.enabled {
    background: #46b450;
}

.lv-status-toggle.disabled {
    background: #999;
}

.lv-status-toggle:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lv-status-toggle.enabled:hover {
    background: #3a9640;
}

.lv-status-toggle.disabled:hover {
    background: #777;
}

.lv-status-toggle.orphaned {
    background: #dc3232;
    color: white;
}

.lv-status-toggle.orphaned:hover {
    background: #b91c1c;
    color: white;
}

.lv-status-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(70, 180, 80, 0.3);
}

.lv-status-toggle.disabled:focus {
    box-shadow: 0 0 0 2px rgba(153, 153, 153, 0.3);
}

.lv-status-toggle.orphaned:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.3);
}

.lv-status-toggle .status-text {
    flex: 1;
    text-align: left;
}

.lv-status-toggle .status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    flex-shrink: 0;
}

.lv-status-toggle.disabled .status-indicator {
    background: #555;
}

.lv-status-toggle.orphaned .status-indicator {
    background: #ffb3d9;
    animation: pulse-pink 2s infinite;
}

@keyframes pulse-pink {
    0%, 100% {
        background: #ffe6f2;
    }
    50% {
        background: #ffb3d9;
    }
}

.lv-source-title-container {
    flex: 1;
    display: flex;
    align-items: center;
}

.lv-source-title {
    font-weight: 600;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: 3px;
}

.lv-source-title:hover {
    color: #0073aa;
    text-decoration: none;
}

.lv-source-title i {
    color: #666;
    font-size: 16px;
    width: 16px;
    text-align: center;
}

.lv-source-title:hover i {
    color: #0073aa;
}

.lv-source-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.lv-source-actions .button {
    font-size: 12px !important;
    padding: 6px 12px !important;
    height: auto !important;
    line-height: 1.2 !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
    min-height: 28px !important;
    box-sizing: border-box !important;
}

/* Ensure both link and button buttons look identical */
.lv-source-actions a.button,
.lv-source-actions button.button {
    font-family: inherit !important;
    font-weight: normal !important;
    background: #f1f1f1 !important;
    border: 1px solid #f1f1f1 !important;
    color: #555 !important;
    cursor: pointer !important;
}

.lv-source-actions a.button:hover,
.lv-source-actions button.button:hover {
    background: #e8e8e8 !important;
    border-color: #e8e8e8 !important;
    color: #333 !important;
    outline: none !important;
    box-shadow: none !important;
}

.lv-source-actions a.button:focus,
.lv-source-actions button.button:focus {
    outline: none !important;
    background: #ddd !important;
    border-color: #ddd !important;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1) !important;
}

/* =======================
   FILTER SYSTEM STYLES
   ======================= */

/* Filter Button in Header */
.lv-header-bar .lv-filters-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lv-header-bar .lv-filters-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.lv-header-bar .lv-filters-button i {
    font-size: 13px;
    color: #50677b;
}

.lv-header-bar .lv-filters-button .lv-filter-count {
    font-weight: 700;
    background: #007bff;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    min-width: 18px;
    text-align: center;
}

/* Filter Chips */
.lv-filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
    flex: 1;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.lv-filter-chips::-webkit-scrollbar {
    height: 6px;
}

.lv-filter-chips::-webkit-scrollbar-track {
    background: transparent;
}

.lv-filter-chips::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.lv-filter-chips::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.lv-filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.4em 0.8em 0.4em 1.1em;
    background: #007bff;
    color: white;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.lv-filter-chip-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.lv-filter-chip-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lv-filter-chip-remove i {
    font-size: 10px;
}

/* Filter Modal */
.lv-filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.lv-filter-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.lv-filter-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.lv-filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #eee;
}

.lv-filter-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.lv-filter-modal-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lv-filter-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.lv-filter-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.lv-filter-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px 24px;
    border-top: 1px solid #eee;
}

.lv-filter-apply-btn,
.lv-filter-clear-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lv-filter-apply-btn {
    background: #007bff;
    color: white;
}

.lv-filter-apply-btn:hover {
    background: #0056b3;
}

.lv-filter-clear-btn {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.lv-filter-clear-btn:hover {
    background: #e9ecef;
}

/* Filter Sections */
.lv-filter-section {
    margin-bottom: 24px;
}

.lv-filter-section:last-child {
    margin-bottom: 0;
}

.lv-filter-section > label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

/* Filter Toggles */
.lv-filter-toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lv-filter-toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.lv-filter-toggle input[type="checkbox"] {
    display: none;
}

.lv-filter-toggle label {
    cursor: pointer;
    margin: 0;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.lv-filter-toggle .label-text {
    padding-top: 8px;
}

.lv-filter-toggle .icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding-top: 5px;
}

.lv-filter-toggle .icon i {
    font-size: 14px;
    text-shadow: none !important;
    filter: none !important;
    font-style: normal !important;
}

.lv-filter-toggle .fa-stack {
    display: inline-block;
    width: 2em;
    height: 2em;
    line-height: 2em;
    position: relative;
    vertical-align: middle;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
}

.lv-filter-toggle .fa-stack .fa-stack-1x {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1em;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
}

.lv-filter-toggle .fa-stack .fa-stack-2x {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: #ff4444 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    display: none;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
}

.lv-filter-toggle:hover .fa-stack .fa-stack-2x {
    display: block;
}

.lv-filter-toggle.item-hidden .fa-stack .fa-stack-2x {
    display: block;
}

.lv-filter-toggle.no-hover:hover .fa-stack .fa-stack-2x {
    display: none;
}

.lv-filter-toggle.item-hidden {
    opacity: 0.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lv-filter-modal-content {
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100vh;
    }

    .lv-header-bar .lv-filters-button .lv-filter-text {
        display: none;
    }

    .lv-filter-chips {
        display: none;
    }
}

@media (min-width: 769px) {
    .lv-filter-chips {
        display: flex;
    }
}

