:root {
  --house-color: #0288D1;
  --user-color: #0288D1;
}

/* Página completa y mapa en pantalla completa */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

#map {
  height: 100%;
  width: 100%;
}

/* ---------- MARCADORES ---------- */

/* Estado normal (no expandido) */
.user {
  align-items: center;
  background-color: #FFFFFF;
  border-radius: 50%;
  color: black;
  display: flex;
  font-size: 16px;
  gap: 15px;
  height: 30px;
  justify-content: center;
  padding: 4px;
  position: relative;
  transition: all 0.3s ease-out;
  width: 30px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.user::after {
  content: "";
  position: absolute;
  top: 95%;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #FFFFFF;
  transition: all 0.3s ease-out;
  z-index: 1;
}

/* Icono dentro del marcador */
.user .icon {
  align-items: center;
  display: flex;
  justify-content: center;
  color: #FFFFFF;
}

.user .icon svg {
  height: 20px;
  width: auto;
}

/* Detalles ocultos por defecto */
.user .details {
  display: none;
  flex-direction: column;
  flex: 1;
}

/* ---------- ESTADO EXPANDIDO ---------- */
.user.highlight {
  width: fit-content;
  max-width: 350px;
  height: auto;
  padding: 12px 18px;
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 10px;
  flex-direction: row;
  cursor: default;
  color: black;
}

.user.highlight::after {
  border-top: 9px solid #FFFFFF;
}

.user.highlight .details {
  display: flex;
  vertical-align: top;
  color: black;
}

.user.highlight .icon {
  display: none;
}

/* ---------- DETALLES INTERNOS ---------- */

.user .username {
  font-size: 32px;
  font-weight: bold;
  color: black;
  margin-bottom: 5px;
  word-break: break-word;
}

.user .address {
  color: black;
  font-size: 16px;
  margin: 5px 0 0;
}

.user .biography {
  color: black;
  font-size: 16px;
  margin-top: 5px;
  margin-bottom: 10px;
  max-width: 100%;
  overflow: visible;
  max-height: none;
}

.user .link {
  color: black;
  font-size: 16px;
  margin: 5px 0 10px;
  text-decoration: none;
  word-break: break-word;
}

.avatar-wrapper {
  margin-bottom: 8px;
}

.avatar-image {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ccc;
}

/* ---------- COLORES POR TIPO ---------- */

/* House */
.user.highlight:has(.fa-house) .icon {
  color: var(--house-color);
}
.user:not(.highlight):has(.fa-house) {
  background-color: var(--house-color);
}
.user:not(.highlight):has(.fa-house)::after {
  border-top: 9px solid var(--house-color);
}

/* User */
.user.highlight:has(.fa-user) .icon {
  color: var(--user-color);
}
.user:not(.highlight):has(.fa-user) {
  background-color: var(--user-color);
}
.user:not(.highlight):has(.fa-user)::after {
  border-top: 9px solid var(--user-color);
}

/* ---------- BOTÓN CERRAR ---------- */
.close-popup {
  position: absolute;
  top: 5px;
  right: 5px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: black;
  cursor: pointer;
  z-index: 20;
}
