/*
==========================================================================
  React Property Plugin - Gold & Black Theme
==========================================================================
*/

/* --- 0. Theme Variables --- */
:root {
    --rpp-bg: #0d0d0d;
    --rpp-card-bg: #1a1a1a;
    --rpp-text: #ffffff;
    --rpp-text-muted: #a1a1a1;
    --rpp-gold: #ffd700;
    --rpp-border: #2c2c2c;
}

/* --- 1. Global & Theme Overrides --- */
.react-property-plugin-container,
.react-property-plugin-container * {
    box-sizing: border-box;
}

.react-property-plugin-container {
    background: var(--rpp-bg) !important;
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--rpp-text);
    font-weight: 500;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

body:has(.react-property-plugin-container) {
    background-color: var(--rpp-bg);
}

/* Fix app layout to prevent any border/line artifacts */
.rpp-app-layout {
    display: flex;
    width: 100%;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
    background: var(--rpp-bg);
}
/* Ensure main content doesn't have overflow issues */
.rpp-main-content-wrapper {
    flex-grow: 1;
    width: 100%;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Fix black line on right side when filter is closed */
.rpp-filter-sidebar {
    width: 0;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--rpp-bg);
    transition: width 0.3s ease, padding 0.3s ease;
    border: none !important; /* Remove any borders */
    border-left: none !important; /* Specifically remove left border */
    height: 100vh;
    position: sticky;
    top: 0;
    box-shadow: none !important; /* Remove any box shadows */
}

.rpp-app-layout.filter-is-open .rpp-main-content-wrapper {
    width: calc(100% - 420px);
}

.rpp-app-layout.filter-is-open .rpp-filter-sidebar {
    width: 420px;
}

/* --- 3. Top Controls Bar --- */
.rpp-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: var(--rpp-card-bg);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--rpp-border);
}

.rpp-view-toggle {
    display: flex;
    gap: 8px;
}

/* --- 3. Top Controls Bar --- */

.rpp-view-btn, .rpp-show-filter-btn {
    background: transparent;
    border: 1px solid var(--rpp-gold);
    color: var(--rpp-gold);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold; /* Ensures text is bold */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* This is the rule to change */
.rpp-view-btn.active {
    background: var(--rpp-gold); /* This provides the visual cue for the active view */
    color: #000;
    font-weight: bold;
}

.rpp-view-btn:not(.active):hover {
    background: rgba(218, 165, 32, 0.1);
    font-weight: bold;
}

/* --- 4. Property Grid & Cards --- */
.rpp-property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.rpp-property-card {
    background: var(--rpp-card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--rpp-border);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.rpp-property-card:hover {
    transform: translateY(-5px);
    border-color: var(--rpp-gold);
    box-shadow: 0 10px 30px rgba(218, 165, 32, 0.1);
}

.rpp-card-image-container {
    height: 240px !important; /* Added !important */
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

/* 2. Force the image height to match */
.rpp-card-image {
    width: 100%;
    height: 240px !important; /* Keep !important */
    object-fit: cover;
    object-position: center;
    display: block;
}
/* Alternative approach for better fitting */
@media (max-width: 768px) {
    .rpp-card-image {
        height: auto;
        max-width: 100%;
        max-height: 100%;
    }
}
.rpp-property-card:hover .rpp-card-image {
    transform: scale(1.05);
}

.rpp-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.rpp-card-title {
    font-size: 1.25rem;
    margin: 0 0 8px 0;
    color: var(--rpp-text);
    font-weight: bold;
}

.rpp-card-location {
    font-size: 12px !important;
    font-family: Arial, sans-serif !important;
    color: #ffffff !important; /* Changed from var(--rpp-text-muted) to white */
    margin: 0 0 16px 0;
    font-weight: bold;
}

.rpp-card-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.rpp-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: bold;
}

.rpp-detail-icon {
    color: var(--rpp-gold);
    font-size: 13px;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Ensure SVG icons inside detail icons are sized correctly */
.rpp-detail-icon svg {
    width: 13px !important;
    height: 13px !important;
    fill: #ffd700 !important;
}
/* --- 5. Filter Form --- */
.rpp-filter-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 420px;
}
/* Ensure no duplicate headers */
.rpp-filter-panel-header {
    flex-shrink: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--rpp-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--rpp-card-bg);
}

/* Make sure there's only one h3 in header */
.rpp-filter-panel-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--rpp-gold);
}

/* Remove any potential duplicate styles */
.rpp-filter-panel h3:not(.rpp-filter-panel-header h3) {
    display: none; /* Hide any other h3 elements */
}
.rpp-filter-panel-close {
    background: none; border: none; font-size: 28px; cursor: pointer; color: var(--rpp-text-muted);
}
.rpp-filter-panel-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}
.rpp-filter-panel-footer {
    flex-shrink: 0;
    padding: 16px 24px;
    border-top: 1px solid var(--rpp-border);
    background-color: var(--rpp-card-bg);
}
.rpp-filter-field label {
    display: block; margin-bottom: 8px; font-weight: bold; color: var(--rpp-text-muted);
}
.rpp-simple-select, .rpp-dropdown-toggle, .rpp-filter-field input {
    width: 100%;
    background-color: var(--rpp-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 6px;
    padding: 12px;
    color: var(--rpp-text);
    font-weight: bold;
}
.rpp-apply-filters-btn {
    width: 100%; padding: 14px; font-size: 1em; font-weight: bold; border-radius: 8px; cursor: pointer; border: none; background-color: var(--rpp-gold); color: #000;
}

/* --- 6. Property Details Page --- */
.rpp-details-back { padding: 24px 40px 0 40px; }

.rpp-back-btn {
    background: transparent;
    color: var(--rpp-gold); /* Gold text by default */
    border: 1px solid var(--rpp-gold);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rpp-back-btn:hover {
    background: var(--rpp-gold); /* Gold background on hover */
    color: #000; /* Black text on hover */
    border-color: var(--rpp-gold);
    transform: translateX(-2px);
}
.rpp-details-header {
    color: var(--rpp-text);
    position: relative;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
     margin: 0 40px;
}
.rpp-details-hero {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
}
.rpp-details-header-content {
    position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 400px; padding: 30px 40px; color: white;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}
.rpp-details-header-content h1 { font-size: 2.5rem; font-weight: bold; margin-bottom: 10px; color: var(--rpp-text) !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.rpp-details-header-content > div { color: var(--rpp-text) !important; }
.rpp-details-header-content div[key="price"] { color: var(--rpp-gold) !important; }

.rpp-details-tabs {
    display: flex; justify-content: center; gap: 12px; margin: 30px 40px; flex-wrap: wrap; padding: 0 24px;
}

.rpp-tab-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background-color: transparent;
    color: var(--rpp-gold); /* Set default text color to gold */
    border: 1px solid var(--rpp-gold);
    border-radius: 50px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.rpp-tab-button:hover span:first-child svg,
.rpp-tab-button.active span:first-child svg {
    fill: #000 !important; /* Black icons on hover/active */
}

.rpp-tab-button:hover {
    background-color: var(--rpp-gold);
    color: #000; /* Black text on gold background on hover */
    border-color: var(--rpp-gold);
}
.rpp-tab-button.active {
    background-color: var(--rpp-gold);
    color: #000; /* Black text on gold background when active */
    border-color: var(--rpp-gold);
}

.rpp-details-content { padding: 0 40px 24px 40px; }
.rpp-overview-section h3 { color: var(--rpp-gold); margin-bottom: 1rem; }

.rpp-fact-grid, .rpp-features-grid, .rpp-payment-plan-grid, .rpp-units-grid {
     display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.rpp-fact, .rpp-feature-item, .rpp-payment-plan-item {
    background: var(--rpp-card-bg); border: 1px solid var(--rpp-border); border-radius: 12px; padding: 20px; transition: all 0.3s ease;
}
.rpp-fact:hover, .rpp-feature-item:hover, .rpp-payment-plan-item:hover { transform: translateY(-4px); box-shadow: 0 8px 15px rgba(218, 165, 32, 0.07); border-color: var(--rpp-gold); }
.rpp-feature-item, .rpp-payment-plan-item { display: flex; align-items: center; gap: 12px; font-weight: bold; }
.rpp-feature-item span:first-child, .rpp-payment-plan-item span:first-child { color: var(--rpp-gold); font-size: 1.8rem; }
.rpp-fact-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rpp-fact-icon { font-size: 1.8rem; color: var(--rpp-gold); }
.rpp-fact-label { font-size: 15px; color: var(--rpp-text-muted); font-weight: bold; }
.rpp-fact-value { font-size: 18px; font-weight: bold; color: var(--rpp-text); padding-left: calc(1.8rem + 10px); }

/* Details Page Map Container */
.rpp-details-map-container {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--rpp-border);
}
.rpp-details-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- 7. Loading & Load More --- */
.rpp-loading, .rpp-no-results { text-align: center; padding: 60px 20px; color: var(--rpp-text-muted); font-size: 16px; background: var(--rpp-card-bg); border-radius: 12px; }
.rpp-load-more-container { display: flex; justify-content: center; margin-top: 40px; }
.rpp-load-more-btn {
    padding: 16px 32px; background: var(--rpp-gold); color: #000; border: none; border-radius: 12px;
    font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s ease;
}
.rpp-load-more-btn:hover { opacity: 0.9; }

/* --- 8. Responsive --- */
@media (max-width: 768px) {  /* Changed from 1024px to 768px */
    .rpp-app-layout.filter-is-open .rpp-main-content-wrapper { display: none; }
    .rpp-app-layout.filter-is-open .rpp-filter-sidebar { width: 100%; }
    .rpp-property-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .rpp-controls { flex-direction: column; gap: 16px; }
    .rpp-main-content-wrapper { padding: 16px; }
    .rpp-property-grid { grid-template-columns: 1fr; }
}
/* --- 8. Map Container Fixes --- */
.rpp-map-container {
    width: 100% !important;
    height: 600px !important; /* Fixed height instead of flex-grow */
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--rpp-border);
    position: relative;
    margin: 0;
    box-sizing: border-box;
}
/* Ensure the inner Google Maps div takes full size */
.rpp-map-container > div {
    width: 100% !important;
    height: 100% !important;
}

.rpp-map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--rpp-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rpp-text);
    font-weight: bold;
    z-index: 1000;
}

.rpp-map-placeholder {
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 8px;
    color: var(--rpp-text-muted);
    font-weight: bold;
}

.rpp-map-error {
    color: #ef4444;
    background: #fef2f2;
}
/* --- Enhanced Filter Dropdown Styles --- */
.rpp-searchable-dropdown {
    position: relative;
    width: 100%;
}

.rpp-dropdown-toggle {
    width: 100%;
    background-color: var(--rpp-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 6px;
    padding: 12px;
    color: var(--rpp-text);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rpp-dropdown-toggle:hover {
    border-color: var(--rpp-gold);
}

.rpp-dropdown-toggle.active {
    border-color: var(--rpp-gold);
    box-shadow: 0 0 0 2px rgba(218, 165, 32, 0.1);
}

.rpp-selected-count {
    background: var(--rpp-gold);
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.rpp-dropdown-arrow {
    transition: transform 0.2s ease;
}

.rpp-dropdown-arrow.up {
    transform: rotate(180deg);
}

.rpp-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow: hidden;
}

.rpp-dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid var(--rpp-border);
    background: var(--rpp-bg);
    color: var(--rpp-text);
    outline: none;
}

.rpp-dropdown-options {
    max-height: 160px;
    overflow-y: auto;
}

.rpp-dropdown-option {
    display: flex;
    align-items: center; /* Keep center alignment */
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 11px;
    min-height: 32px; /* Ensure consistent option height */
}

.rpp-dropdown-option span {
    font-size: 11px;
    line-height: 1.3;
    display: flex;
    align-items: center; /* Center the text too */
}

.rpp-simple-select option {
    font-size: 11px; /* NEW: Make simple select options smaller */
}

.rpp-dropdown-option:hover {
    background: rgba(218, 165, 32, 0.1);
}

/* Make filter checkboxes smaller to match text size */
.rpp-dropdown-option input[type="checkbox"] {
    margin: 0;
    width: 11px;
    height: 11px;
    transform: scale(0.8);
    flex-shrink: 0;
    align-self: center; /* Force checkbox to center */
    vertical-align: middle; /* Additional centering */
}

.rpp-dropdown-no-options {
    padding: 12px;
    text-align: center;
    color: var(--rpp-text-muted);
    font-style: italic;
}
/* --- Selected Tags Styling --- */
.rpp-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--rpp-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 6px;
    min-height: 40px;
    align-items: center;
}

.rpp-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--rpp-gold);
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    max-width: 150px;
}

.rpp-selected-tag span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rpp-selected-tag-remove {
    background: none;
    border: none;
    color: #000;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.rpp-selected-tag-remove:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* Update dropdown toggle when selections exist */
.rpp-dropdown-toggle {
    margin-top: 0 !important;
}

/* Mobile responsiveness for tags */
@media (max-width: 768px) {
    .rpp-selected-tags {
        padding: 6px;
        gap: 4px;
    }
    
    .rpp-selected-tag {
        font-size: 10px;
        padding: 3px 6px;
        max-width: 120px;
        gap: 4px;
    }
    
    .rpp-selected-tag-remove {
        width: 14px;
        height: 14px;
        font-size: 12px;
    }
}

/* Ensure selected tags container doesn't interfere with dropdown positioning */
.rpp-searchable-dropdown {
    position: relative;
    width: 100%;
}

.rpp-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow: hidden;
    margin-top: 4px;
}
/* --- Enhanced Property Details Styles --- */
.rpp-details-map-container {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--rpp-border);
    background: #f5f5f5;
}

.rpp-details-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Payment Plan Grid Enhancements --- */
.rpp-payment-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.rpp-payment-plan-item {
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
}

.rpp-payment-plan-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(218, 165, 32, 0.07);
    border-color: var(--rpp-gold);
}

.rpp-payment-plan-item span:first-child {
    color: var(--rpp-gold);
    font-size: 1.8rem;
    flex-shrink: 0;
}

/* --- Units Grid Enhancements --- */
.rpp-units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* --- Feature Grid Enhancements --- */
.rpp-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.rpp-feature-item {
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
}

.rpp-feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(218, 165, 32, 0.1);
    border-color: var(--rpp-gold);
}

.rpp-feature-item span:first-child {
    color: var(--rpp-gold);
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* --- Loading and Error States --- */
.rpp-details-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    font-size: 1.2rem;
    color: var(--rpp-text-muted);
    background: var(--rpp-card-bg);
    border-radius: 8px;
}

.rpp-details-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    font-size: 1.2rem;
    color: #ef4444;
    background: var(--rpp-card-bg);
    border-radius: 8px;
}

/* --- Responsive Enhancements --- */
@media (max-width: 768px) {
    .rpp-details-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 30px 20px;
        padding: 0 16px;
    }
    
    .rpp-tab-button {
        font-size: 12px;
        padding: 10px 12px;
        text-align: center;
        justify-content: center;
        min-height: 44px; /* Ensure good touch target */
        word-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
    }
    .rpp-tab-button span {
    font-size: 13px; /* Consistent icon and text size */
}
    .rpp-tab-button span:last-child {
        font-size: 11px; /* Make tab text smaller on mobile */
    } }

/* --- Filter Field Spacing --- */
.rpp-filter-field {
    margin-bottom: 20px;
}

.rpp-filter-field:last-child {
    margin-bottom: 0;
}

/* --- Property Card Font Fixes --- */
.rpp-card-title {
    font-size: 20.5px !important;
    font-family: Arial, sans-serif !important;
    margin: 0 0 8px 0;
    color: var(--rpp-text);
    font-weight: bold;
    line-height: 1.2;
}

.rpp-card-location {
    font-size: 12px !important;
    font-family: Arial, sans-serif !important;
    color: var(--rpp-text-muted);
    margin: 0 0 16px 0;
    font-weight: bold;
}

.rpp-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-family: Arial, sans-serif !important;
}

/* Price styling */
.rpp-detail-item:first-child span:last-child {
    font-size: 10.5px !important;
    font-weight: bold;
    color: var(--rpp-text);
}

/* Area, Amenities, Developer styling */
.rpp-detail-item:not(:first-child) span:last-child {
    font-size: 10.5px !important;
    font-weight: bold;
    color: var(--rpp-text);
}

.rpp-detail-icon {
    color: var(--rpp-gold);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.rpp-detail-icon {
    color: var(--rpp-gold);
    font-size: 13px;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* --- Property Gallery Slider Styles --- */
.rpp-gallery-slider {
    max-width: 100%;
    margin: 0 auto;
}

.rpp-gallery-main-display {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    margin-bottom: 20px;
}

.rpp-gallery-large-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.rpp-gallery-image-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(10px);
}

.rpp-gallery-thumbnail-bar {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--rpp-gold) var(--rpp-card-bg);
}

.rpp-gallery-thumbnail-bar::-webkit-scrollbar {
    height: 8px;
}

.rpp-gallery-thumbnail-bar::-webkit-scrollbar-track {
    background: var(--rpp-card-bg);
    border-radius: 4px;
}

.rpp-gallery-thumbnail-bar::-webkit-scrollbar-thumb {
    background: var(--rpp-gold);
    border-radius: 4px;
}

.rpp-gallery-thumb {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: var(--rpp-card-bg);
}

.rpp-gallery-thumb:hover {
    border-color: var(--rpp-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.2);
}

.rpp-gallery-thumb.active {
    border-color: var(--rpp-gold);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4);
    transform: translateY(-2px);
}

.rpp-gallery-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rpp-gallery-thumb:hover .rpp-gallery-thumb-img {
    transform: scale(1.05);
}

.rpp-gallery-cover-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--rpp-gold);
    color: #000;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Mobile Responsive Gallery Slider */
@media (max-width: 768px) {
    .rpp-gallery-main-display {
        height: 350px;
    }
    
    .rpp-gallery-image-counter {
        top: 15px;
        right: 15px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .rpp-gallery-thumb {
        width: 100px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .rpp-gallery-main-display {
        height: 280px;
    }
    
    .rpp-gallery-thumb {
        width: 80px;
        height: 60px;
    }
    
    .rpp-gallery-thumbnail-bar {
        gap: 8px;
    }
}

/* Responsive Margins */
@media (max-width: 1200px) {
    .rpp-main-content-wrapper {
        padding: 24px 30px; /* Medium screens: 30px sides */
    }
    
    .rpp-details-back {
        padding: 24px 30px 0 30px;
    }
    
    .rpp-details-header {
        margin: 0 30px;
    }
    
    .rpp-details-tabs {
        margin: 30px 30px;
    }
    
    .rpp-details-content {
        padding: 0 30px 24px 30px;
    }
}

@media (max-width: 768px) {
    .rpp-main-content-wrapper {
        padding: 16px 20px; /* Mobile: 20px sides */
    }
    
    .rpp-details-back {
        padding: 24px 20px 0 20px;
    }
    
    .rpp-details-header {
        margin: 0 20px;
    }
    
    .rpp-details-tabs {
        margin: 30px 20px;
    }
    
    .rpp-details-content {
        padding: 0 20px 24px 20px;
    }
}
/* --- Property Status Badge --- */

.rpp-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #ffd700;
    color: #000000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #ffd700;
}

.rpp-property-card:hover .rpp-status-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .rpp-status-badge {
        top: 8px;
        right: 8px;
        font-size: 10px;
        padding: 4px 8px;
    }
}
/* --- 9. Floating Contact Button & Box --- */

/* Floating Contact Button (always visible) */
.rpp-contact-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--rpp-gold);
    border: 2px solid var(--rpp-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    color: #000;
    font-size: 1.5rem;
}

.rpp-contact-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Contact Box Modal (shown when button is clicked) */
.rpp-contact-box {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 340px;
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    z-index: 1001;
    transition: all 0.3s ease-in-out;
    color: var(--rpp-text);
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.rpp-contact-box.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
}

.rpp-contact-box:hover {
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.1);
    border-color: var(--rpp-gold);
}

.rpp-contact-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rpp-contact-box h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--rpp-gold);
}

.rpp-contact-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--rpp-text-muted);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.rpp-contact-close:hover {
    background-color: var(--rpp-border);
    color: var(--rpp-text);
}

.rpp-contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.rpp-contact-form input,
.rpp-contact-form textarea {
    width: 100%;
    background-color: var(--rpp-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 8px;
    padding: 14px;
    color: var(--rpp-text);
    font-weight: 500;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.rpp-contact-form input::placeholder,
.rpp-contact-form textarea::placeholder {
    color: var(--rpp-text-muted);
}

.rpp-contact-form input:focus,
.rpp-contact-form textarea:focus {
    outline: none;
    border-color: var(--rpp-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.rpp-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rpp-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid var(--rpp-gold);
    text-decoration: none;
    transition: all 0.2s ease;
}

.rpp-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border-color: var(--rpp-gold);
}

.rpp-contact-btn.call {
    background-color: transparent;
    color: var(--rpp-gold);
    border: 2px solid var(--rpp-gold);
}

.rpp-contact-btn.call:hover {
    background-color: var(--rpp-gold);
    color: #000;
}

.rpp-contact-btn.whatsapp {
    background-color: transparent;
    color: var(--rpp-gold);
    border: 2px solid var(--rpp-gold);
}

.rpp-contact-btn.whatsapp:hover {
    background-color: var(--rpp-gold);
    color: #000;
}

.rpp-contact-btn.email {
    background: var(--rpp-gold);
    color: #000;
    border: 2px solid var(--rpp-gold);
}

.rpp-contact-btn.email:hover {
    background-color: transparent;
    color: var(--rpp-gold);
}

/* Responsive styles */
@media (max-width: 768px) {
    .rpp-contact-button {
        bottom: 16px;
        right: 16px;
    }
    
    .rpp-contact-box {
        width: calc(100% - 32px);
        bottom: 16px;
        right: 16px;
        left: 16px;
        padding: 20px;
    }
}
/* --- Overview Text Content Sizing --- */
.rpp-overview-section div[key="content"] {
    font-size: 7px !important;
    line-height: 1.4;
}

/* Also target any text content within the overview section */
.rpp-overview-section div[key="content"] p,
.rpp-overview-section div[key="content"] div,
.rpp-overview-section div[key="content"] span {
    font-size: 11px !important;
}

/* For very small screens (phones in portrait) */
@media (max-width: 480px) {
    .rpp-details-tabs {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin: 20px 16px;
        padding: 0 8px;
    }
    
    .rpp-tab-button {
        font-size: 11px;
        padding: 8px 10px;
        min-height: 40px;
    }
    
    .rpp-tab-button span:first-child {
        font-size: 14px; /* Icon size */
    }
    
    .rpp-tab-button span:last-child {
        font-size: 10px; /* Text size */
        display: block;
        margin-top: 2px;
    }
}

/* For tablets and medium screens */
@media (max-width: 1024px) and (min-width: 769px) {
    .rpp-details-tabs {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .rpp-tab-button {
        font-size: 13px;
        padding: 10px 18px;
        flex: 0 1 auto;
        min-width: 120px;
    }
}

/* Ensure tabs don't overflow on any screen */
.rpp-details-tabs {
    overflow: hidden;
}

.rpp-tab-button {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Allow text wrapping on mobile only */
@media (max-width: 768px) {
    .rpp-tab-button {
        white-space: normal;
        text-overflow: unset;
    }
}

/* Ensure all SVG icons in property cards are consistently sized */
.rpp-detail-icon svg,
.rpp-card-location svg {
    width: 13px !important;
    height: 13px !important;
    fill: #ffd700 !important;
    flex-shrink: 0;
}

/* Property card location icon spacing */
.rpp-card-location span:first-child {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    vertical-align: middle;
}
/* Handle both fill and stroke SVG icons */
.rpp-detail-icon svg,
.rpp-card-location svg {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0;
}

/* For fill-based icons */
.rpp-detail-icon svg[fill]:not([fill="none"]) {
    fill: #ffd700 !important;
}

/* For stroke-based icons */
.rpp-detail-icon svg path[stroke],
.rpp-detail-icon svg rect[stroke] {
    stroke: #ffd700 !important;
}

/* Ensure location icon fill is applied */
.rpp-card-location svg {
    fill: #ffd700 !important;
}
/* Clear Filters Button Styling - MATCH APPLY BUTTON */
.rpp-clear-filters-btn {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    border: none !important;
    background-color: var(--rpp-gold) !important;
    color: #000 !important;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.rpp-clear-filters-btn:hover {
    opacity: 0.9 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(218, 165, 32, 0.3) !important;
}

.rpp-clear-filters-btn:active {
    transform: translateY(0) !important;
}

/* Update footer layout for two buttons */
.rpp-filter-panel-footer {
    flex-shrink: 0;
    padding: 16px 24px;
    border-top: 1px solid var(--rpp-border);
    background-color: var(--rpp-card-bg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Apply button styling update */
.rpp-apply-filters-btn {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background-color: var(--rpp-gold);
    color: #000;
    transition: all 0.3s ease;
}

.rpp-apply-filters-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(218, 165, 32, 0.3);
}

.rpp-apply-filters-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* Tab content headers - smaller */
.rpp-tab-content h2 {
    font-size: 1.5rem !important; /* Reduced from 1.875rem */
    font-weight: bold;
    margin-bottom: 1.25rem !important; /* Reduced margin */
    color: var(--rpp-text);
    display: flex;
    align-items: center;
    gap: 10px; /* Reduced gap */
}

.rpp-tab-content h2 span {
    color: var(--rpp-gold);
    font-size: 1.5rem !important; /* Match header size */
}

/* Fact grid items - smaller text */
.rpp-fact-label {
    font-size: 13px !important; /* Reduced from 15px */
    color: var(--rpp-text-muted);
    font-weight: bold;
}

.rpp-fact-value {
    font-size: 15px !important; /* Reduced from 18px */
    font-weight: bold;
    color: var(--rpp-text);
    padding-left: calc(13px + 10px); /* Adjusted for smaller icon */
}

.rpp-fact-icon {
    font-size: 13px !important; /* Consistent with card icons */
    color: var(--rpp-gold);
    width: 13px;
    height: 13px;
}

/* Feature items - smaller and consistent */
.rpp-feature-item {
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 12px;
    padding: 14px; /* Reduced padding */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px; /* Reduced gap */
    font-weight: bold;
    font-size: 13px; /* Smaller text */
}

.rpp-feature-item span:first-child {
    color: var(--rpp-gold);
    font-size: 13px !important; /* Consistent icon size */
    flex-shrink: 0;
    width: 13px;
    height: 13px;
}

.rpp-feature-item div {
    font-size: 13px; /* Consistent text size */
}

/* Payment plan items - fix large text */
.rpp-payment-plan-item {
    background: var(--rpp-card-bg);
    border: 1px solid var(--rpp-border);
    border-radius: 12px;
    padding: 16px; /* Reduced padding */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px; /* Reduced gap */
    font-weight: bold;
    font-size: 13px; /* Smaller base font */
}

.rpp-payment-plan-item span:first-child {
    color: var(--rpp-gold);
    font-size: 13px !important; /* Consistent icon size */
    flex-shrink: 0;
}

.rpp-payment-plan-item div span {
    font-size: 13px !important; /* Fix large payment plan text */
    line-height: 1.3;
}

/* Ensure all SVG icons in details page are consistent */
.rpp-tab-content svg {
    width: 13px !important;
    height: 13px !important;
    fill: #ffd700 !important;
}
/* Ensure all fact icons match grid card icon styling */
.rpp-fact-icon,
.rpp-fact-icon svg {
    color: #ffd700 !important;
    fill: #ffd700 !important;
    width: 13px !important;
    height: 13px !important;
    font-size: 13px !important;
    flex-shrink: 0;
}

/* Consistent icon container styling */
.rpp-fact-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure text sizes are also consistent */
.rpp-fact-value {
    font-size: 15px !important;
    font-weight: bold;
    color: var(--rpp-text);
    padding-left: calc(13px + 10px);
}

/* Make all detail text consistent */
.rpp-tab-content div[style*="fontSize: '13px'"],
.rpp-tab-content div[style*="font-size: 13px"] {
    font-size: 13px !important;
}
/* Tab button icon styling */
.rpp-tab-button span:first-child {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0;
}
.rpp-tab-button span:first-child svg {
    fill: var(--rpp-gold) !important; /* Gold icons by default */
}
.rpp-tab-button span:first-child svg {
    width: 13px !important;
    height: 13px !important;
    fill: #ffd700 !important;
}

/* Handle stroke-based SVGs */
.rpp-tab-button span:first-child svg path[stroke],
.rpp-tab-button span:first-child svg rect[stroke],
.rpp-tab-button span:first-child svg line[stroke] {
    stroke: var(--rpp-gold) !important;
}

/* Active tab icon styling */
.rpp-tab-button.active span:first-child svg {
    fill: #000 !important;
}

.rpp-tab-button:hover span:first-child svg path[stroke],
.rpp-tab-button:hover span:first-child svg rect[stroke],
.rpp-tab-button:hover span:first-child svg line[stroke],
.rpp-tab-button.active span:first-child svg path[stroke],
.rpp-tab-button.active span:first-child svg rect[stroke],
.rpp-tab-button.active span:first-child svg line[stroke] {
    stroke: #000 !important;
}

/* Tab button text sizing */
.rpp-tab-button span:last-child {
    font-size: 13px !important;
    font-weight: bold;
}
/* Property details location styling */
.rpp-details-location {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: var(--rpp-text) !important;
    flex-wrap: nowrap !important;
}

.rpp-details-location-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* Allow text to shrink */
}

/* Mobile responsive location styling */
@media (max-width: 768px) {
    .rpp-details-location {
        font-size: 13px !important;
        gap: 4px !important;
    }
    
    .rpp-details-location-text {
        font-size: 13px !important;
        line-height: 1.2;
        /* Ensure single line on mobile */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 80px); /* Leave space for icon and padding */
    }
    
    /* Make sure the header content has proper spacing */
    .rpp-details-header-content {
        padding: 20px !important;
    }
}

@media (max-width: 480px) {
    .rpp-details-location {
        font-size: 12px !important;
        gap: 3px !important;
    }
    
    .rpp-details-location-text {
        font-size: 12px !important;
        max-width: calc(100vw - 60px); /* Even less space on very small screens */
    }
    
    .rpp-details-header-content h1 {
        font-size: 1.75rem !important; /* Smaller title on mobile */
    }
}

/* Ensure location icon stays consistent */
.rpp-details-location svg {
    width: 13px !important;
    height: 13px !important;
    fill: #ffd700 !important;
    flex-shrink: 0 !important;
}
/* Enhanced mobile header layout */
@media (max-width: 768px) {
    .rpp-details-header {
        min-height: 350px; /* Smaller on mobile */
    }
    
    .rpp-details-header-content {
        min-height: 350px !important;
        justify-content: flex-end !important;
        gap: 8px; /* Add gap between elements */
    }
    
    .rpp-details-header-content > div {
        margin-bottom: 4px;
    }
    
    /* Ensure price text is also readable */
    .rpp-details-header-content div[style*="color: var(--rpp-gold)"] {
        font-size: 16px !important;
        font-weight: bold;
    }
}

@media (max-width: 480px) {
    .rpp-details-header {
        min-height: 280px;
    }
    
    .rpp-details-header-content {
        min-height: 280px !important;
    }
    
    .rpp-details-header-content div[style*="color: var(--rpp-gold)"] {
        font-size: 14px !important;
    }
}
/* Fix mobile filter visibility - ensure full width and proper display */
@media (max-width: 1024px) {
    .rpp-app-layout.filter-is-open .rpp-main-content-wrapper {
        display: none; /* Hide main content when filter is open on mobile */
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-sidebar {
        width: 100vw !important; /* Full viewport width */
        height: 100vh !important; /* Full viewport height */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
    }
    
    .rpp-filter-sidebar {
        width: 0;
        overflow: hidden;
        background: var(--rpp-bg);
        transition: all 0.3s ease;
        border: none; /* Remove border that might cause issues */
    }
}

@media (max-width: 768px) {
    /* Ensure filter panel takes full screen on mobile */
    .rpp-app-layout.filter-is-open .rpp-filter-sidebar {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .rpp-filter-panel {
        height: 100vh !important;
        max-height: 100vh !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .rpp-filter-panel-body {
        padding: 16px !important;
        overflow-y: auto !important;
        max-height: calc(100vh - 120px) !important; /* Account for header and footer */
    }
    
    .rpp-filter-panel-header {
        padding: 16px !important;
        flex-shrink: 0;
    }
    
    .rpp-filter-panel-footer {
        padding: 16px !important;
        flex-shrink: 0;
    }
}
/* Ensure no border artifacts when filter is open */
.rpp-app-layout.filter-is-open .rpp-filter-sidebar {
    border: none !important;
    box-shadow: none !important;
}
/* Desktop filter sidebar when open */
@media (min-width: 1025px) {
    .rpp-app-layout.filter-is-open .rpp-main-content-wrapper {
        width: calc(100% - 420px);
        padding-right: 20px; /* Reduce right padding to prevent gaps */
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-sidebar {
        width: 420px;
        border: none !important;
        background: var(--rpp-bg);
    }
}
/* Improve mobile filter interaction */
@media (max-width: 768px) {
    /* Prevent body scroll when filter is open */
    body.filter-open {
        overflow: hidden !important;
    }
    
    /* Ensure filter dropdown options are visible */
    .rpp-dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
        max-height: 200px !important;
        overflow-y: auto !important;
    }
    
    /* Make sure filter fields don't overflow */
    .rpp-filter-field {
        margin-bottom: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .rpp-filter-field input,
    .rpp-dropdown-toggle,
    .rpp-simple-select {
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}
/* Enhanced close button styling */
.rpp-filter-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--rpp-text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.rpp-filter-panel-close:hover {
    background-color: var(--rpp-border);
    color: var(--rpp-text);
    transform: scale(1.1);
}

.rpp-filter-panel-close:active {
    transform: scale(0.95);
}

/* Mobile close button improvements */
@media (max-width: 768px) {
    .rpp-filter-panel-close {
        font-size: 28px;
        width: 40px;
        height: 40px;
        /* Make it more prominent on mobile */
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--rpp-gold);
        border: 1px solid var(--rpp-border);
    }
    
    .rpp-filter-panel-close:hover {
        background-color: var(--rpp-gold);
        color: #000;
    }
    
    /* Ensure header has proper spacing on mobile */
    .rpp-filter-panel-header {
        padding: 20px 24px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1px solid var(--rpp-border);
        background-color: var(--rpp-card-bg);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .rpp-filter-panel-header h3 {
        margin: 0 !important;
        font-size: 1.25rem !important;
        font-weight: 700;
        color: var(--rpp-gold);
    }
}
/* Fix mobile filter panel height and scrolling - CLEANED VERSION */
@media (max-width: 768px) {
    /* Only apply to filter sidebar when open */
    .rpp-app-layout.filter-is-open .rpp-filter-panel {
        height: 100vh !important;
        max-height: 100vh !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-header {
        flex-shrink: 0 !important;
        padding: 12px 20px !important;
        border-bottom: 1px solid var(--rpp-border);
        background-color: var(--rpp-card-bg);
        position: relative !important;
        z-index: 10;
        min-height: 60px !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-header h3 {
        font-size: 1.2rem !important;
        margin: 0 !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-body {
        flex: 1 !important;
        padding: 16px 20px !important;
        padding-bottom: 120px !important; /* Space for fixed footer */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: calc(100vh - 160px) !important;
        min-height: 0 !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        /* Show scrollbar */
        scrollbar-width: thin;
        scrollbar-color: var(--rpp-gold) var(--rpp-card-bg);
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-body::-webkit-scrollbar {
        width: 8px;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-body::-webkit-scrollbar-track {
        background: var(--rpp-card-bg);
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-body::-webkit-scrollbar-thumb {
        background-color: var(--rpp-gold);
        border-radius: 4px;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-body form {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        padding-bottom: 40px !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1001 !important;
        background-color: var(--rpp-card-bg) !important;
        border-top: 1px solid var(--rpp-border) !important;
        padding: 12px 20px !important;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1) !important;
        min-height: 80px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    /* Filter field spacing when filter is open */
    .rpp-app-layout.filter-is-open .rpp-filter-field {
        margin-bottom: 16px !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-field:nth-last-child(2),
    .rpp-app-layout.filter-is-open .rpp-filter-field:nth-last-child(1) {
        margin-bottom: 24px !important;
    }
    

    .rpp-app-layout.filter-is-open .rpp-clear-filters-btn:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(218, 165, 32, 0.3) !important;
}
    /* Input field styling when filter is open */
    .rpp-app-layout.filter-is-open .rpp-simple-select,
    .rpp-app-layout.filter-is-open .rpp-dropdown-toggle,
    .rpp-app-layout.filter-is-open .rpp-filter-field input {
        padding: 10px 12px !important;
        font-size: 15px !important;
        min-height: 40px !important;
    }
    
    /* Dropdown positioning when filter is open */
    .rpp-app-layout.filter-is-open .rpp-dropdown-menu {
        position: fixed !important;
        max-height: 40vh !important;
        z-index: 10002 !important;
    }
}

/* Very small screens - only when filter is open */
@media (max-width: 480px) {
    .rpp-app-layout.filter-is-open .rpp-filter-panel-header {
        padding: 10px 16px !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-body {
        padding: 12px 16px !important;
        padding-bottom: 120px !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer {
        padding: 10px 16px !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-field {
        margin-bottom: 12px !important;
    }
}

/* iOS Safari fixes - only when filter is open */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .rpp-app-layout.filter-is-open .rpp-filter-panel {
            height: 100vh !important;
            height: -webkit-fill-available !important;
        }
        
        .rpp-app-layout.filter-is-open .rpp-filter-panel-body {
            max-height: calc(100vh - 160px) !important;
            max-height: calc(-webkit-fill-available - 160px) !important;
        }
    }
}
/* Ensure main page buttons are not affected */
.rpp-apply-filters-btn,
.rpp-clear-filters-btn {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Remove any position fixed styles here */
    position: relative !important; /* Override any fixed positioning */
}

/* Only apply fixed positioning when filter is open on mobile */
@media (max-width: 768px) {
    .rpp-app-layout:not(.filter-is-open) .rpp-apply-filters-btn,
    .rpp-app-layout:not(.filter-is-open) .rpp-clear-filters-btn {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
    }
}
/* This rule now includes the .rpp-show-filter-btn class */
.rpp-view-btn, 
.rpp-view-btn.active,
.rpp-show-filter-btn {
    background: transparent !important;
    color: var(--rpp-gold) !important;
    border: 1px solid var(--rpp-gold) !important;
    font-weight: bold !important;
}

/* This adds the hover effect to the filter button as well */
.rpp-view-btn:hover,
.rpp-show-filter-btn:hover {
    background: rgba(218, 165, 32, 0.1) !important;
    color: var(--rpp-gold) !important;
}
.rpp-tab-button {
    background-color: transparent !important;
    color: var(--rpp-gold) !important;
    border: 1px solid var(--rpp-gold) !important;
}

.rpp-tab-button:hover,
.rpp-tab-button.active {
    background-color: var(--rpp-gold) !important;
    color: #000 !important;
}
.rpp-back-btn {
    background: transparent !important;
    color: var(--rpp-gold) !important;
    border: 1px solid var(--rpp-gold) !important;
}

.rpp-back-btn:hover {
    background: var(--rpp-gold) !important;
    color: #000 !important;
}
/* Ensure desktop screens (1025px+) don't get mobile layout */
@media (min-width: 1025px) {
    .rpp-app-layout .rpp-main-content-wrapper {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .rpp-app-layout .rpp-filter-sidebar {
        width: 0 !important;
        max-width: 420px !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-sidebar {
        width: 420px !important;
    }
    
    .rpp-property-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
/*
==========================================================================
  FINAL OVERRIDE: Forcing the Plugin Container to Full Width
==========================================================================
*/

/* This targets the main container of your plugin and forces its width */
.react-property-plugin-container {
    width: 100% !important;
    max-width: none !important; /* This overrides any max-width set by Elementor */
    box-sizing: border-box !important;
}

/* This forces the element inside it to also obey the full width */
.rpp-app-layout {
    width: 100% !important;
    max-width: none !important;
}
/* Force full-width map */
.rpp-map-container,
.rpp-details-map-container {
    width: 100vw !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* Override Elementor containers */
.elementor-widget-container:has(.rpp-map-container),
.elementor-section:has(.rpp-map-container),
.elementor-column:has(.rpp-map-container) {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove padding from parent */
.rpp-main-content-wrapper:has(.rpp-map-container),
.rpp-main-content-wrapper:has(.rpp-details-map-container) {
    padding: 0 !important;
}

/* Ensure iframe takes full space */
.rpp-map-container > div,
.rpp-details-map-container iframe {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* Fix sidebar interference */
@media (min-width: 1025px) {
    .rpp-app-layout.filter-is-open .rpp-main-content-wrapper:has(.rpp-map-container) {
        width: 100% !important;
    }
}

@media (max-width: 1024px) {
    .rpp-app-layout.filter-is-open .rpp-main-content-wrapper:has(.rpp-map-container) {
        display: flex !important;
        width: 100% !important;
    }
}

/* Mobile viewport fix */
@media (max-width: 768px) {
    .rpp-map-container,
    .rpp-details-map-container {
        width: 100vw !important;
        margin-left: calc(-1 * var(--wp-admin--admin-bar--height, 0px)) !important;
        left: 0 !important;
    }
}
/* Fix dropdown toggle clickability on mobile */
@media (max-width: 768px) {
    /* Ensure filter panel is fully interactive */
    .rpp-app-layout.filter-is-open .rpp-filter-panel {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: none !important;
        z-index: 10000 !important;
        overflow: visible !important;
        background: var(--rpp-bg) !important;
        pointer-events: auto !important;
    }
/* Ensure main page buttons are not affected */
.rpp-apply-filters-btn,
.rpp-clear-filters-btn {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative !important; /* Override any fixed positioning */
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
}
    /* Ensure filter panel body doesn't block interactions */
    .rpp-app-layout.filter-is-open .rpp-filter-panel-body {
        overflow-y: auto !important;
        max-height: calc(100vh - 140px) !important;
        position: relative !important;
        z-index: 10001 !important;
        padding-bottom: 120px !important;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto !important;
    }

    /* Ensure filter fields are interactive - BASE Z-INDEX */
    .rpp-app-layout.filter-is-open .rpp-filter-field {
        position: relative !important;
        z-index: 10002 !important;
        pointer-events: auto !important;
        margin-bottom: 16px !important;
    }

    /* ACTIVE DROPDOWN GETS HIGHER Z-INDEX */
    .rpp-app-layout.filter-is-open .rpp-filter-field:has(.rpp-dropdown-menu) {
        z-index: 10010 !important;
    }

    /* Ensure searchable dropdown is clickable */
    .rpp-app-layout.filter-is-open .rpp-searchable-dropdown {
        position: relative !important;
        z-index: inherit !important;
        width: 100% !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    /* Ensure dropdown toggle is fully clickable */
    .rpp-app-layout.filter-is-open .rpp-dropdown-toggle {
        background: var(--rpp-bg) !important;
        color: var(--rpp-text) !important;
        font-size: 15px !important;
        padding: 12px !important;
        z-index: inherit !important;
        position: relative !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        user-select: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        border: 1px solid var(--rpp-border) !important;
        border-radius: 6px !important;
    }

    /* Ensure dropdown arrow is visible and clickable */
    .rpp-app-layout.filter-is-open .rpp-dropdown-arrow {
        pointer-events: none !important;
        font-size: 12px !important;
        transition: transform 0.2s ease !important;
        color: var(--rpp-text) !important;
    }

    .rpp-app-layout.filter-is-open .rpp-dropdown-arrow.up {
        transform: rotate(180deg) !important;
    }

    /* Style dropdown menu - WHITE BACKGROUND WITH HIGH Z-INDEX */
    .rpp-app-layout.filter-is-open .rpp-dropdown-menu {
        position: absolute !important;
        top: calc(100% + 4px) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 40vh !important;
        background: #ffffff !important;
        border: 1px solid #e5e5e5 !important;
        border-radius: 6px !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
        z-index: 10015 !important;
        overflow-y: auto !important;
        pointer-events: auto !important;
    }

    /* Style dropdown options - WHITE BACKGROUND */
    .rpp-app-layout.filter-is-open .rpp-dropdown-options {
        max-height: 35vh !important;
        overflow-y: auto !important;
        background: #ffffff !important;
        padding: 4px 0 !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 10016 !important;
    }

    .rpp-app-layout.filter-is-open .rpp-dropdown-option {
        font-size: 13px !important;
        min-height: 36px !important;
        padding: 6px 12px !important;
        color: #000000 !important;
        background: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        transition: background-color 0.2s ease !important;
        position: relative !important;
        z-index: 10017 !important;
    }

    .rpp-app-layout.filter-is-open .rpp-dropdown-option:hover {
        background-color: #f0f0f0 !important;
        color: #000000 !important;
    }

    /* Ensure checkboxes are clickable */
    .rpp-app-layout.filter-is-open .rpp-dropdown-option input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
        margin: 0 6px 0 0 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        flex-shrink: 0 !important;
        z-index: 10018 !important;
        position: relative !important;
    }

    /* Dropdown search input - WHITE BACKGROUND */
    .rpp-app-layout.filter-is-open .rpp-dropdown-search {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 14px !important;
        padding: 8px 12px !important;
        border: none !important;
        border-bottom: 1px solid #e5e5e5 !important;
        pointer-events: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
        outline: none !important;
        position: relative !important;
        z-index: 10016 !important;
    }

    .rpp-app-layout.filter-is-open .rpp-dropdown-search::placeholder {
        color: #666666 !important;
    }

    /* Ensure filter panel form is interactive */
    .rpp-app-layout.filter-is-open .rpp-filter-panel form {
        pointer-events: auto !important;
        width: 100% !important;
    }

    /* Ensure labels are visible */
    .rpp-app-layout.filter-is-open .rpp-filter-field label {
        color: var(--rpp-text-muted) !important;
        font-size: 13px !important;
        margin-bottom: 6px !important;
        display: block !important;
        position: relative !important;
        z-index: 10003 !important;
    }

    /* Selected tags styling for mobile */
    .rpp-app-layout.filter-is-open .rpp-selected-tags {
        background: var(--rpp-bg) !important;
        border: 1px solid var(--rpp-border) !important;
        padding: 6px !important;
        margin-bottom: 6px !important;
        border-radius: 6px !important;
        min-height: 32px !important;
        position: relative !important;
        z-index: 10003 !important;
    }

    .rpp-app-layout.filter-is-open .rpp-selected-tag {
        background: var(--rpp-gold) !important;
        color: #000 !important;
        font-size: 11px !important;
        padding: 3px 6px !important;
        margin: 2px !important;
        border-radius: 10px !important;
    }

    .rpp-app-layout.filter-is-open .rpp-selected-tag-remove {
        color: #000 !important;
        background: none !important;
        font-size: 12px !important;
        width: 14px !important;
        height: 14px !important;
    }

    /* INPUT FIELDS AND SELECT DROPDOWNS */
    .rpp-app-layout.filter-is-open .rpp-simple-select,
    .rpp-app-layout.filter-is-open .rpp-filter-field input[type="text"],
    .rpp-app-layout.filter-is-open .rpp-filter-field input[type="number"],
    .rpp-app-layout.filter-is-open .rpp-filter-field input[type="date"] {
        position: relative !important;
        z-index: 10003 !important;
        background: var(--rpp-bg) !important;
        color: var(--rpp-text) !important;
        border: 1px solid var(--rpp-border) !important;
        padding: 12px !important;
        border-radius: 6px !important;
        font-size: 15px !important;
    }
}

/* iOS Safari fix for full height */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .rpp-app-layout.filter-is-open .rpp-filter-panel {
            height: -webkit-fill-available !important;
        }
        .rpp-app-layout.filter-is-open .rpp-filter-panel-body {
            max-height: calc(-webkit-fill-available - 140px) !important;
        }
        .rpp-app-layout.filter-is-open .rpp-dropdown-menu {
            max-height: 40vh !important;
        }
    }
}

/* Override Elementor or theme overlays */
.elementor-widget-container:has(.rpp-filter-panel),
.elementor-popup-modal:has(.rpp-filter-panel) {
    overflow: visible !important;
    z-index: 10007 !important;
    pointer-events: auto !important;
}

/* Fix potential Elementor modal overlay */
body.filter-open .rpp-filter-panel {
    z-index: 10008 !important;
    pointer-events: auto !important;
}
/* Mobile footer buttons - DON'T OVERRIDE FOOTER POSITIONING */
@media (max-width: 768px) {
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1001 !important;
        background-color: var(--rpp-card-bg) !important;
        border-top: 1px solid var(--rpp-border) !important;
        padding: 12px 20px !important;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1) !important;
        min-height: 80px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    /* Style buttons INSIDE the fixed footer - don't override positioning */
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer .rpp-clear-filters-btn,
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer .rpp-apply-filters-btn {
        min-height: 40px !important;
        font-size: 14px !important;
        padding: 10px 16px !important;
        background-color: var(--rpp-gold) !important;
        color: #000 !important;
        border: none !important;
        border-radius: 8px !important;
        font-weight: bold !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        width: 100% !important;
        margin: 0 !important;
        position: relative !important; /* Keep buttons relative inside footer */
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer .rpp-clear-filters-btn:hover,
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer .rpp-apply-filters-btn:hover {
        opacity: 0.9 !important;
        transform: translateY(-1px) !important;
    }
    
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer .rpp-clear-filters-btn:active,
    .rpp-app-layout.filter-is-open .rpp-filter-panel-footer .rpp-apply-filters-btn:active {
        transform: translateY(0) !important;
    }
}