/* LRSI Render Filter EF Searchs Styles */

/* Base styles */
.filter-wrapper {
    margin-bottom: 20px;
}

.filter-title {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

/* Main wrapper */
.lrsi-filters-and-map-wrapper {
    position: relative;
}

/* Map fullscreen container */
.lrsi-map-fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    display: none;
    background: white;
}

/* Adjust for WordPress admin bar when logged in - Desktop only */
@media screen and (min-width: 783px) {
    body.admin-bar .lrsi-map-fullscreen-container {
        top: 32px;
        height: calc(100% - 32px);
    }
}

/* Mobile WordPress admin bar adjustment - Only when admin bar is actually visible */
@media screen and (max-width: 782px) {
    /* Only apply if admin bar is visible on mobile (when editing/customizing) */
    body.admin-bar.wp-admin .lrsi-map-fullscreen-container,
    body.admin-bar.customize-active .lrsi-map-fullscreen-container {
        top: 46px;
        height: calc(100% - 46px);
    }

    /* For normal frontend mobile view, use full screen even with admin-bar class */
    body.admin-bar:not(.wp-admin):not(.customize-active) .lrsi-map-fullscreen-container {
        top: 0;
        height: 100%;
    }
}

.lrsi-map-fullscreen-container.active {
    display: block;
}

/* Map container - Adjusted for sidebar */
.lrsi-map-container {
    width: 100%;
    height: 100%;
    margin-left: 30%;
}

/* Desktop map button */
.lrsi-desktop-map-button-container {
    margin-bottom: 20px;
    text-align: center;
}

.lrsi-desktop-map-btn {
    padding: 12px 24px;
    font-size: 16px;
    border: 1.5px solid #ddd;
    border-radius: 22px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lrsi-desktop-map-btn:hover {
    border-color: #d4660a;
    background: #fff9f5;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(212, 102, 10, 0.15);
}

.lrsi-desktop-map-btn .lrsi-btn-icon {
    color: #d4660a;
}

/* Desktop map sidebar - Fixed sidebar layout */
.lrsi-map-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 30%;
    height: 100vh;
    background: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}

/* Adjust sidebar for WordPress admin bar - Desktop only */
@media screen and (min-width: 783px) {
    body.admin-bar .lrsi-map-sidebar {
        top: 32px;
        height: calc(100vh - 32px);
    }
}

/* Mobile sidebar admin bar adjustment - Only when admin bar is actually visible */
@media screen and (max-width: 782px) {
    /* Only apply if admin bar is visible on mobile (when editing/customizing) */
    body.admin-bar.wp-admin .lrsi-map-sidebar,
    body.admin-bar.customize-active .lrsi-map-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
    }

    /* For normal frontend mobile view, use full height even with admin-bar class */
    body.admin-bar:not(.wp-admin):not(.customize-active) .lrsi-map-sidebar {
        top: 0;
        height: 100vh;
    }
}

/* Sidebar columns - Full height container */
.lrsi-sidebar-columns {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Column titles */
.lrsi-column-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid #d4660a;
}

.lrsi-entries-column-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

/* Filters dropdown section - Fixed positioning */
.lrsi-map-filters-column {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1001;
    max-height: 50vh;
    overflow: hidden;
    transform: translateY(-100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.lrsi-map-filters-column.expanded {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.lrsi-filters-toggle {
    background: #f8f9fa;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
}

.lrsi-filters-toggle:hover {
    background: #e9ecef;
}

.lrsi-filters-toggle-icon {
    transition: transform 0.3s ease;
    color: #d4660a;
}

.lrsi-map-filters-column.expanded .lrsi-filters-toggle-icon {
    transform: rotate(180deg);
}

.lrsi-filters-content-wrapper {
    padding: 15px 12px;
    background: #fafafa;
    max-height: calc(50vh - 60px);
    overflow-y: auto;
}

.lrsi-map-filters-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.lrsi-map-filters-content .filter-wrapper {
    margin-bottom: 6px;
    background: white;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
}

.lrsi-map-filters-content .filter-wrapper h4 {
    font-size: 13px;
    margin-bottom: 6px;
    color: #555;
    font-weight: 600;
}

/* Entries list column (full height, scrollable) */
.lrsi-entries-list-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

/* Fixed filter toggle button */
.lrsi-entries-filter-toggle {
    background: white;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.lrsi-entries-filter-toggle:hover {
    background: #f8f9fa;
}

.lrsi-entries-filter-toggle-icon {
    transition: transform 0.3s ease;
    color: #d4660a;
    width: 20px;
    height: 20px;
}

.lrsi-entries-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.lrsi-entries-loading {
    text-align: center;
    color: #999;
    padding: 15px;
    font-size: 14px;
}

.lrsi-entries-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Entry item styles - Optimized for sidebar */
.lrsi-entry-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.lrsi-entry-item:hover {
    border-color: #d4660a;
    box-shadow: 0 3px 12px rgba(212, 102, 10, 0.15);
    transform: translateY(-2px);
}

.lrsi-entry-item.selected {
    background: #fff9f5;
    border-color: #d4660a;
    box-shadow: 0 3px 10px rgba(212, 102, 10, 0.15);
    border-left: 4px solid #d4660a;
}

/* Entry image styles - Smaller for sidebar */
.lrsi-entry-image {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: #f5f5f5;
}

.lrsi-entry-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

span.select2-selection.select2-selection--single {
    margin-bottom: 1vh;
    height: auto;
}


.lrsi-entry-item:hover .lrsi-entry-image img {
    transform: scale(1.05);
}

.lrsi-entry-image .lrsi-entry-like-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #999;
    backdrop-filter: blur(4px);
}

.lrsi-entry-image .lrsi-entry-like-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #e74c3c;
    transform: scale(1.1);
}

.lrsi-entry-image .lrsi-entry-like-btn.liked {
    color: #e74c3c;
    background: rgba(255, 255, 255, 1);
}

/* Entry content styles - Compact for sidebar */
.lrsi-entry-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lrsi-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
}

.lrsi-entry-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lrsi-entry-like-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.lrsi-entry-like-btn:hover {
    color: #e74c3c;
    transform: scale(1.1);
}

.lrsi-entry-like-btn.liked {
    color: #e74c3c;
}

.lrsi-entry-like-btn.liked svg {
    fill: #e74c3c;
}

.lrsi-entry-like-btn svg {
    width: 18px;
    height: 18px;
}

.lrsi-entry-location {
    margin: 0;
    font-size: 12px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lrsi-entry-description {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Entry icons styles */
.lrsi-entry-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lrsi-icon-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #555;
}

.lrsi-icon-item i {
    font-size: 12px;
    flex-shrink: 0;
}

.lrsi-custom-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.lrsi-icon-text {
    font-size: 11px;
    color: #555;
    font-weight: 500;
}


/* Entry meta styles */
.lrsi-entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.lrsi-price {
    color: #d4660a;
    font-weight: 600;
}

.lrsi-response-time {
    color: #28a745;
    font-style: italic;
}

.lrsi-entry-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 12px;
}

.lrsi-rating-stars {
    display: inline-flex;
    gap: 1px;
}

.lrsi-rating-stars .star {
    color: #ddd;
    font-size: 11px;
}

.lrsi-rating-stars .star.filled {
    color: #ffc107;
}

.lrsi-rating-number {
    font-size: 11px;
    font-weight: 600;
    color: #333;
}

.lrsi-reviews-count {
    font-size: 10px;
    color: #999;
}

.lrsi-entry-capacity {
    margin: 3px 0;
    font-size: 12px;
    color: #666;
}

.lrsi-no-entries {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* Entry action buttons */
.lrsi-entry-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

/* Budget checkbox container - Compatible with existing system */
.budget-checkbox-container {
    width: 100%;
}

.budget-checkbox {
    display: none;
}

.budget-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.budget-checkbox-label:before {
    content: "💰";
    font-size: 14px;
}

.budget-checkbox:checked + .budget-checkbox-label {
    background: linear-gradient(135deg, #d4660a 0%, #e67e22 100%);
    color: white;
    border-color: #d4660a;
    box-shadow: 0 2px 8px rgba(212, 102, 10, 0.3);
}

.budget-checkbox:checked + .budget-checkbox-label:before {
    content: "✓";
}

.budget-checkbox-label:hover {
    background: #f8f9fa;
    border-color: #d4660a;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.budget-checkbox:checked + .budget-checkbox-label:hover {
    background: linear-gradient(135deg, #c25a09 0%, #d35400 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 102, 10, 0.4);
}

/* View site button */
.lrsi-view-site-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.lrsi-view-site-btn:before {
    content: "🔗";
    font-size: 14px;
}

.lrsi-view-site-btn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Sidebar optimized button layout */
.lrsi-entry-actions {
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8e8e8;
}

.budget-checkbox-label,
.lrsi-view-site-btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Desktop layout for buttons - Keep stacked in sidebar */
@media (min-width: 768px) {
    .lrsi-entry-actions {
        flex-direction: column;
        gap: 6px;
    }
}

/* Floating budget button */
.lrsi-budget-request-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 24px;
    background: #d4660a;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(212, 102, 10, 0.3);
    z-index: 9999999;
    transition: all 0.3s ease;
}

.lrsi-budget-request-button:hover {
    background: #b85509;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 102, 10, 0.4);
}

/* Notification styles */
.lrsi-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.lrsi-notification.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lrsi-notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.lrsi-notification.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

/* Close button for fullscreen map - Adjusted for new layout */
.lrsi-map-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #666;
    transition: all 0.2s ease;
}

.lrsi-map-close-btn:hover {
    background: #f0f0f0;
    color: #333;
    transform: scale(1.05);
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Mobile controls */
    .lrsi-mobile-controls {
        display: block;
        position: sticky;
        top: 0;
        z-index: 100;
        background: white;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        padding: 12px 15px;
        margin: -15px -15px 15px -15px;
        width: calc(100% + 30px);
        border-bottom: 1px solid #f0f0f0;
    }
    
    .lrsi-filters-header {
        text-align: center;
        margin-bottom: 12px;
    }
    
    .lrsi-filters-question {
        color: #d4660a;
        font-size: 16px;
        font-weight: 500;
        letter-spacing: 0.3px;
    }
    
    .lrsi-filter-buttons {
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .lrsi-filter-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border: 1.5px solid #ddd;
        border-radius: 22px;
        background: white;
        font-size: 15px;
        font-weight: 400;
        color: #333;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
        flex: 0 1 auto;
        min-width: 0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    
    .lrsi-filter-btn:hover, .lrsi-filter-btn:focus {
        border-color: #d4660a;
        background: #fff9f5;
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(212, 102, 10, 0.15);
    }
    
    .lrsi-btn-icon {
        color: #d4660a;
        flex-shrink: 0;
        width: 18px;
        height: 18px;
    }
    
    .lrsi-filter-count {
        position: absolute;
        top: -6px;
        right: -6px;
        background: #d4660a;
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 600;
    }
    
    /* Mobile filters panel */
    .lrsi-mobile-filters-container .lrsi-filters-panel {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 9999;
        overflow-y: auto;
        width: 100%;
    }
    
    .lrsi-filters-panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #e0e0e0;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }
    
    .lrsi-filters-panel-header h3 {
        margin: 0;
        font-size: 20px;
        color: #333;
    }
    
    .lrsi-close-panel {
        background: none;
        border: none;
        font-size: 30px;
        cursor: pointer;
        color: #666;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lrsi-filters-panel-content {
        padding: 20px;
    }
    
    .lrsi-filters-panel-footer {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 20px;
        border-top: 1px solid #e0e0e0;
        display: flex;
        gap: 10px;
    }
    
    .lrsi-apply-filters, .lrsi-clear-filters {
        flex: 1;
        padding: 12px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .lrsi-apply-filters {
        background: #d4660a;
        color: white;
        border: none;
    }
    
    .lrsi-apply-filters:hover {
        background: #b85509;
    }
    
    .lrsi-clear-filters {
        background: white;
        color: #666;
        border: 2px solid #e0e0e0;
    }
    
    .lrsi-clear-filters:hover {
        border-color: #999;
        color: #333;
    }
    
    body.lrsi-panel-open {
        overflow: hidden;
    }
    
    /* Mobile floating filter button on map */
    .lrsi-mobile-map-filter-btn {
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        padding: 12px 24px;
        background: white;
        border: 1.5px solid #ddd;
        border-radius: 25px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 15px;
        font-weight: 500;
        color: #333;
        cursor: pointer;
        z-index: 1002;
    }
    
    .lrsi-mobile-map-filter-btn:hover {
        background: #fff9f5;
        border-color: #d4660a;
    }
    
    /* Hide desktop elements on mobile */
    .lrsi-desktop-map-button-container {
        display: none !important;
    }

    /* Adjust sidebar for mobile - Hide fixed sidebar, show mobile floating panel */
    .lrsi-map-sidebar {
        display: none;
    }

    /* Reset map container for mobile */
    .lrsi-map-container {
        margin-left: 0;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    /* Hide mobile controls on desktop */
    .lrsi-mobile-controls {
        display: none !important;
    }
    
    .lrsi-mobile-map-filter-btn {
        display: none !important;
    }
    
    /* When mobile compact mode is enabled */
    .lrsi-mobile-filters-container .lrsi-filters-panel {
        display: block !important;
        position: static !important;
        background: transparent !important;
        z-index: auto !important;
    }
    
    .lrsi-mobile-filters-container .lrsi-filters-panel-header,
    .lrsi-mobile-filters-container .lrsi-filters-panel-footer {
        display: none !important;
    }
    
    .lrsi-mobile-filters-container .lrsi-filters-panel-content {
        padding: 0 !important;
    }
}

/* Responsive sidebar widths */
@media (min-width: 1200px) {
    .lrsi-map-sidebar {
        width: 25%;
    }
    .lrsi-map-container {
        margin-left: 25%;
    }
}

@media (min-width: 1600px) {
    .lrsi-map-sidebar {
        width: 22%;
    }
    .lrsi-map-container {
        margin-left: 22%;
    }
}

@media (min-width: 1920px) {
    .lrsi-map-sidebar {
        width: 20%;
    }
    .lrsi-map-container {
        margin-left: 20%;
    }
}

/* Filter dropdown overlay - Limited to sidebar area */
.lrsi-filters-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lrsi-filters-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Map popup styles */
.lrsi-map-popup {
    min-width: 280px;
    max-width: 400px;
    overflow: hidden;
}

.lrsi-map-popup-image {
    width: 100%;
    height: 150px;
    margin: -10px -10px 10px -10px;
    overflow: hidden;
    background: #f5f5f5;
}

.lrsi-map-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lrsi-map-popup-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.lrsi-map-popup-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 12px;
}

.lrsi-map-popup-rating .lrsi-rating-stars .star {
    font-size: 12px;
}

.lrsi-map-popup-location {
    margin: 4px 0;
    font-size: 13px;
    color: #666;
}

.lrsi-map-popup-description {
    margin: 6px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.lrsi-map-popup-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.lrsi-popup-icon-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #555;
}

.lrsi-popup-icon-item i {
    font-size: 12px;
    flex-shrink: 0;
}

.lrsi-popup-custom-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.lrsi-popup-icon-text {
    font-size: 11px;
    color: #555;
    font-weight: 500;
}

.lrsi-map-popup-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 12px;
}

.lrsi-popup-price {
    color: #d4660a;
    font-weight: 600;
}

.lrsi-popup-response-time {
    color: #28a745;
    font-style: italic;
}

.lrsi-map-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.lrsi-map-popup-actions .budget-checkbox-container {
    width: 100%;
}

.lrsi-map-popup-actions .lrsi-view-site-btn {
    width: 100%;
}

/* Apply same button styles to popup buttons */
.lrsi-map-popup-actions .budget-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
}

.lrsi-map-popup-actions .lrsi-view-site-btn {
    padding: 8px 12px;
    font-size: 12px;
}

/* Desktop layout for popup buttons */
@media (min-width: 768px) {
    .lrsi-map-popup-actions {
        flex-direction: row;
        gap: 6px;
    }

    .lrsi-map-popup-actions .budget-checkbox-container,
    .lrsi-map-popup-actions .lrsi-view-site-btn {
        flex: 1;
    }
}


.lrsi-map-popup-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #d4660a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s;
    cursor: pointer;
}

.lrsi-map-popup-button:hover {
    background: #b85509;
}

/* Mobile filters panel */
.lrsi-mobile-filters-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: white !important;
    z-index: 999999 !important;
    display: none !important;
    overflow-y: auto !important;
}

.lrsi-mobile-filters-panel.show,
body.lrsi-panel-open .lrsi-mobile-filters-panel {
    display: block !important;
}

.lrsi-filters-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
}

.lrsi-filters-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.lrsi-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lrsi-filters-panel-content {
    padding: 20px;
}

.lrsi-filters-panel-footer {
    position: sticky;
    bottom: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.lrsi-apply-filters,
.lrsi-clear-filters {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lrsi-apply-filters {
    background: #d4660a;
    color: white;
}

.lrsi-apply-filters:hover {
    background: #c25a09;
}

.lrsi-clear-filters {
    background: #6c757d;
    color: white;
}

.lrsi-clear-filters:hover {
    background: #5a6268;
}

/* Very small screens */
@media (max-width: 380px) {
    .lrsi-filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .lrsi-filter-btn span {
        display: none;
    }

    .lrsi-filter-btn .lrsi-btn-icon {
        margin: 0;
    }
}

/* ============================================
   LEAFLET MAP STYLES
   ============================================ */

/* Leaflet map container */
#lrsi-fullscreen-map-container {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Custom Leaflet marker styles */
.lrsi-leaflet-marker {
    background: transparent !important;
    border: none !important;
}

.lrsi-marker-pin {
    width: 24px;
    height: 24px;
    background-color: #d4660a;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lrsi-marker-pin:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
    min-width: 280px;
    max-width: 350px;
}

.lrsi-leaflet-popup .leaflet-popup-content-wrapper {
    padding: 0 !important;
}

.lrsi-leaflet-popup .leaflet-popup-content {
    margin: 0 !important;
}

/* Popup close button */
.leaflet-popup-close-button {
    color: #666 !important;
    font-size: 22px !important;
    padding: 8px !important;
    width: 30px !important;
    height: 30px !important;
    right: 8px !important;
    top: 8px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
}

.leaflet-popup-close-button:hover {
    color: #333 !important;
    background: white !important;
    transform: scale(1.1) !important;
}

/* Popup tip (arrow) */
.leaflet-popup-tip-container {
    margin-top: -1px;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
}

/* Popup content styling */
.lrsi-map-popup {
    padding: 15px;
}

/* Leaflet attribution */
.leaflet-control-attribution {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.8) !important;
    padding: 3px 8px !important;
}

.leaflet-control-attribution a {
    color: #0078a8;
}

/* Leaflet zoom controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    color: #333 !important;
    background: white !important;
    border: none !important;
    transition: background 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
    background: #f5f5f5 !important;
    color: #d4660a !important;
}

.leaflet-control-zoom-in {
    border-bottom: 1px solid #e0e0e0 !important;
    border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 8px 8px !important;
}

/* Loading indicator for map */
.lrsi-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}

.lrsi-map-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #d4660a;
    border-radius: 50%;
    animation: lrsi-spin 0.8s linear infinite;
}

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

/* Mobile Leaflet adjustments */
@media (max-width: 768px) {
    .leaflet-popup-content {
        min-width: 250px;
        max-width: 300px;
    }

    .lrsi-marker-pin {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }

    .leaflet-control-zoom a {
        width: 32px !important;
        height: 32px !important;
        line-height: 32px !important;
        font-size: 16px !important;
    }
}