/* Noemi: styles for the real estate filter sidebar */

.filter-sidebar {
  background-color: #f9f9f9;
  padding: 25px 25px 25px 5px;
  border-radius: 10px;
  width: 107%;
  margin: 66px auto 20px auto;
  padding-bottom: 190px;
  margin-top: 60px;
}

.filter-sidebar h2,
.section-title {
  font-size: 16px;
  margin-bottom: 30px;
  font-weight: normal;
  color: #333;
}

.filter-group {
  margin-bottom: 40px;
  margin-left: 0;
}

.filter-group label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
  cursor: pointer;
  font-weight: normal;
}

.filter-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  margin-left: 20px;
  flex-shrink: 0;
}

.filter-group input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid gray;
  border-radius: 0;
  font-size: 14px;
  outline: none;
}

.filter-group input[type="text"]:hover,
.filter-group input[type="text"]:focus {
  border: 1px solid gray;
}

/* Noemi: dynamic search */
.location-searchDesktop {
  position: relative;
  border-radius: 0;
  padding-left: 18px;
}

.location-searchDesktop input {
  border-radius: 5px !important;
  padding-left: 12px !important;
}

.location-resultsDesktop {
  position: absolute;
  top: 100%;
  left: 18px; /* 👈 coincide con el padding-left del contenedor */
  width: calc(100% - 18px); /* 👈 ajusta el ancho compensando ese espacio */
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  max-height: 240px;
  overflow-y: auto;
  z-index: 999;
}

/* caja de sugerencias de resultados en desktop */
.location-item {
  display: flex;
  align-items: flex-start;
  padding: 5px 6px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}

.location-item:hover {
  background-color: #f5f5f5;
}

.location-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  flex-shrink: 0;
}

.location-texts {
  font-size: 11px;
}

.location-title {
  font-weight: 500;
  color: #333;
  font-size: 11px;
}

.location-description {
  font-size: 11px;
  color: #777;
}

/* ------------------------------------------------------------ */

/* Noemi: By default (desktop): hide mobile navbar */
.mobile-only {
  display: none;
}

/* NAVBAR */
.bg {
  background-color: #004cb9 !important;
}

/* Barra superior */
.real-estate-mobile-menu {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 10px;
}

.real-estate-search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 5px !important;
  overflow: hidden;
  flex: 1;
  max-width: 60%;
  height: 38px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #333;
}

.real-estate-search-box input {
  border: none;
  outline: none;
  padding: 0 12px;
  width: 100%;
  font-size: 14px;
  line-height: 38px;
}

/* Botón de la lupa a la derecha */
.real-estate-search-box button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 100%;
  background: #f3f4f6;
  border: none;
  border-left: 1px solid #e5e7eb;
  cursor: pointer;
}

.real-estate-search-box img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.real-estate-actions {
  display: flex;
  align-items: center;
  gap: 5px; /* espacio entre Filters y Add Property */
  margin-left: auto;
}

.real-estate-menu-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  min-width: 64px;
  gap: 5px;

  margin: -10px 0;
  padding: 10px 22px;
  border-radius: none;
}
/* Tamaño de los iconos */
.real-estate-menu-button img {
  width: 22px;
  height: 22px;
  margin: 0;
  display: block;
}

.real-estate-menu-button:hover,
.real-estate-menu-button.active {
  background-color: #fff !important;
  color: #000000 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.real-estate-menu-button:hover img,
.real-estate-menu-button.active img {
  filter: invert(0%) brightness(0%);
}

.real-estate-menu-button:hover img {
  filter: invert(0%) brightness(0%);
}

.real-estate-mobile-menu .real-estate-menu-button + .real-estate-menu-button {
  margin-left: 24px;
}

/*  ---------------------------------DORPDOWN DE RESULTADOS------------------------------ */
@media (max-width: 991px) {
  .location-results {
    position: fixed;
    background: #fff;
    border-radius: 0 0 0px 0px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    z-index: 2000;
    max-height: 55vh;
    overflow-y: auto;
    padding: 0;

    /* mas ancho a la derecha  */
    width: 550px !important;
  }
}

/* Ajuste preciso para pantallas pequeñas (≤ 635px) en mobile y que quede como el figma, mas largo a la derecha sin romper las medidad  */
@media (max-width: 649px) {
  .location-results {
    position: fixed;
    background: #fff;
    border-radius: 0 0 0px 0px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    z-index: 2000;
    max-height: 55vh;
    overflow-y: auto;
    padding: 0;

    /* 🔧 Ajustes de Noemí */
    width: 400px !important; /* ancho de acuerdo al breakpoint */
  }
}

.location-results[hidden] {
  display: none !important;
}

@media (min-width: 992px) {
  .location-results {
    display: none !important;
  }
}

/* Ítems */
.location-item {
  display: grid;
  grid-template-columns: 26px auto;
  gap: 10px;
  padding: 14px 16px;
  align-items: center;
  cursor: pointer;
  background: #fff;
}
.location-item:hover {
  background: #f9fafb;
}
.location-item + .location-item {
  border-top: 1px solid #eaecef;
}
.location-item div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Icono */
.location-icon {
  width: 20px;
  height: 20px;
  opacity: 0.9;
}

/* Texto gris */
.location-title {
  font-size: 15px;
  font-weight: 500;
  color: #4b5563;
  line-height: 1.2;
  text-align: left;
}
.location-description {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
  text-align: left;
}

/* Sin resultados */
.location-empty {
  padding: 14px 16px;
  font-size: 13px;
  color: #6b7280;
}

/* ------------------------------------FILTERS----------------------------------------- */
/* Por defecto: oculto */
.filters-dropdown {
  display: none;
  position: fixed;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  padding: 15px;
  box-sizing: border-box;
  z-index: 2000;
  animation: dropdownFade 0.18s ease-out forwards;
}

/* Cuando se activa */
.filters-dropdown.show {
  display: block;
}
.filter-title {
  font-size: 20px;
  color: #333;
  margin-bottom: 8px;
  padding-bottom: 5px;
  padding-left: 15px;
  text-align: left;
}

.filter-section + .filter-section {
  margin-top: 16px;
}

/* en mobile los titulos de select category y property type  */
.filter-group h2 {
  padding-left: 10px;
  color: #333;
  text-align: left;
  font-weight: normal;
  margin-bottom: 15px;
}

@media (max-width: 820px) {
  .real-estate-mobile-menu {
    align-items: center;
    flex-wrap: nowrap;
  }

  .real-estate-search-box {
    flex: 0 1 50%;
    max-width: 100%;
    height: 38px;
  }

  .real-estate-actions {
    flex: 0 1 40%;
    margin-left: 0;
    justify-content: flex-end;
    gap: 16px;
  }

  .real-estate-menu-button {
    min-width: 56px;
    padding: 8px 14px;
  }

  .real-estate-search-box button {
    width: 38px;
  }
}
@media (min-width: 991px) {
  .filters-dropdown {
    display: none !important;
  }
}

@media (max-width: 375px) {
  .real-estate-search-box {
    flex-basis: 58%;
    max-width: 55%;
  }
  .real-estate-actions {
    flex-basis: 42%;
    gap: 12px;
  }
}

/* skeleton */
/* Dropdown skeleton */
.skeleton .location-icon,
.skeleton-line {
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton .location-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.skeleton-line.short {
  width: 60px;
  height: 12px;
  margin-bottom: 6px;
}

.skeleton-line.long {
  width: 120px;
  height: 12px;
}

/* Listado skeleton estilo card */
.property-card.skeleton-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  width: 100%;
}

.skeleton-img-big {
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-body {
  padding: 10px;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 60px;
}

.skeleton-line.medium {
  width: 120px;
}

.skeleton-line.long {
  width: 80%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Error */
.error-msg {
  padding: 10px;
  text-align: center;
  color: red;
  font-size: 14px;
}
