/* wp-content/themes/hello-elementor-child/staronline/assets/building-map-styles.css */
/* Archivo CSS completo y corregido para el mapa de buildings */
/* Popups con fondo blanco, bordes suaves, botón azul y comportamiento correcto */

.custom-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}
select.custom-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    background-color: #fff;
    cursor: pointer;
}
.custom-select-wrapper::after {
    content: "\25BC";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #1a2154;
    pointer-events: none;
}
select.custom-select:focus {
    outline: none;
    border-color: #1c2c50;
    box-shadow: 0 0 0 2px rgba(28, 44, 80, 0.2);
}

/* Contenedor principal del mapa */
#building-map-container {
    display: flex;
    height: 80vh;
    width: 100%;
}
#building-map-container,
#building-map-container * {
    font-family: Avenir, sans-serif;;
}
#building-custom-map {
    flex: 5;
}
#building-properties-panel {
    flex: 6;
    overflow-y: auto;
    background: white;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: start;
    scrollbar-width: thin;
    scrollbar-color: #1c2c50 transparent;
    height: fit-content;
}
#building-properties-panel::-webkit-scrollbar {
    width: 10px;
}
#building-properties-panel::-webkit-scrollbar-track {
    background: #ffffff;
}
#building-properties-panel::-webkit-scrollbar-thumb {
    background: #1c2c50;
    border-radius: 5px;
}
#building-properties-panel:hover::-webkit-scrollbar-thumb,
#building-properties-panel.scrolling::-webkit-scrollbar-thumb {
    opacity: 1;
}
#building-properties-panel .e-loop-item {
    width: 50%;
}
#beds-baths-filter-popup-wrap #beds-baths-filter-popup {
    display: flex;
    flex-wrap: wrap;
}
#beds-baths-filter-popup-wrap #beds-baths-filter-popup div{
    width: 50%;
}
#beds-baths-apply {

}
.apply-btn {
    background: #1c2c50 !important;
    color: white !important;
}
/* Estilos de las propiedades */
.property-item {
    width: 50%;
    padding: 10px;
    box-sizing: border-box;
}
.property-item .property-inner {
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 480px;
    transition: background 0.3s;
}
.property-item .property-inner:hover {
    background: #f8f9fa;
}
.property-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 15px;
}
.property-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
}
.property-item .property-price {
    font-size: 24px;
    font-weight: 700;
    color: #1c2c50;
    margin: 10px 0;
}
.property-item .options {
    display: flex;
    gap: 20px;
    margin: 10px 0;
    font-size: 15px;
    color: #555;
}
.property-item a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #1c2c50;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
}

/* Loader */
.loader {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #333;
}
.loader::after {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-left: 12px;
    border: 4px solid #1c2c50;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Contenedor de filtros */
#building-filter {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    background: transparent;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}
#building-filter > div {
    position: relative;
}

/* Botones de filtro (todos con el mismo estilo) */
#building-filter button {
    background: #F2F2F2;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a2154;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}
#building-filter button:hover {
    background: #e5e5e5;
}

/* Popups de filtro - fondo blanco, bordes suaves y botón azul */
.filter-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 300px;
}
.filter-popup .wrap {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.filter-popup label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}
.filter-popup select,
.filter-popup input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}
.filter-popup button {
    background: #1c2c50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
    transition: background 0.3s;
}
.filter-popup button:hover {
    background: #0f1a3a;
}

/* Botones de Beds & Baths */
#beds-baths-filter-popup .filter-btn {
    padding: 8px 14px;
    margin: 4px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}
#beds-baths-filter-popup .filter-btn.active {
    background: #1c2c50;
    color: white;
    border-color: #1c2c50;
}
.loader {
    text-align: center;
    padding: 80px 20px;
    font-size: 18px;
    color: #1c2c50;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    min-height: 400px;
}

.loader::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 4px solid #1c2c50;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.building-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 0 20px;
    width: 100%;
}
.building-header h2 {
    margin: 0;
    font-size: 14pt;
    font-weight: 400;
    color: #1c2c50;
    display: block;
    width: 45%;
}
.building-header .banner {
    text-align: center;
    background: #1c2c50;
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    display: block;
    width: 100%;
}
.building-header .banner .title {
    font-size: 14pt;
    font-weight: 400;
    line-height: 1.2;
}
.building-header .banner .subtitle {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.2;
}
/* Responsive */
@media (max-width: 767px) {
    #building-properties-panel .e-loop-item {
        width: 100%;
    }

    #building-map-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    #building-custom-map {
        min-height: 70vh;
    }
    .property-item {
        width: 100%;
    }
    #building-filter {
        flex-direction: column;
    }
    #building-filter > div {
        width: 100%;
    }
    .filter-popup {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 12px 12px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }
}
