/**
 * HG Map Manager Frontend Styles
 * 基于 map.html 的样式
 */

:root {
  --building-color: #FF9800;
  --house-color: #0288D1;
  --shop-color: #7B1FA2;
  --warehouse-color: #558B2F;
}

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

.property {
  align-items: center;
  background-color: #FFFFFF;
  border-radius: 50%;
  color: #263238;
  display: flex;
  font-size: 12px;
  gap: 15px;
  height: 40px;
  justify-content: center;
  padding: 4px;
  position: relative;
  transition: all 0.3s ease-out;
  width: 40px;
  transform: translateY(-9px);
}

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

.property .icon {
  align-items: center;
  display: flex;
  justify-content: center;
  color: #FFFFFF;
}

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

.property .icon .text-icon {
  font-size: 16px;
  line-height: 1;
}

.property .details {
  display: none;
  flex-direction: column;
  flex: 1;
}

.property .address {
  color: #9E9E9E;
  font-size: 10px;
  margin-bottom: 10px;
  margin-top: 5px;
}

.property .features {
  align-items: flex-end;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.property .features > div {
  align-items: center;
  background: #F5F5F5;
  border-radius: 5px;
  border: 1px solid #ccc;
  display: flex;
  font-size: 10px;
  gap: 5px;
  padding: 5px;
}

.property.highlight {
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.2);
  height: 80px;
  padding: 8px 15px;
  width: auto;
}

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

.property.highlight .details {
  display: flex;
}

.property.highlight .icon svg {
  width: 50px;
  height: 50px;
}

.property.highlight .icon .text-icon {
  font-size: 40px;
}

.property .bed {
  color: #FFA000;
}

.property .bath {
  color: #03A9F4;
}

.property .size {
  color: #388E3C;
}

.property[data-type="home"].highlight .icon {
  color: var(--house-color);
}

.property[data-type="home"]:not(.highlight) {
  background-color: var(--house-color);
}

.property[data-type="home"]:not(.highlight)::after {
  border-top: 9px solid var(--house-color);
}

.property[data-type="building"].highlight .icon {
  color: var(--building-color);
}

.property[data-type="building"]:not(.highlight) {
  background-color: var(--building-color);
}

.property[data-type="building"]:not(.highlight)::after {
  border-top: 9px solid var(--building-color);
}

.property[data-type="warehouse"].highlight .icon {
  color: var(--warehouse-color);
}

.property[data-type="warehouse"]:not(.highlight) {
  background-color: var(--warehouse-color);
}

.property[data-type="warehouse"]:not(.highlight)::after {
  border-top: 9px solid var(--warehouse-color);
}

.property[data-type="store-alt"].highlight .icon {
  color: var(--shop-color);
}

.property[data-type="store-alt"]:not(.highlight) {
  background-color: var(--shop-color);
}

.property[data-type="store-alt"]:not(.highlight)::after {
  border-top: 9px solid var(--shop-color);
}

/* 从上落下动画效果 */
@keyframes dropInFromTop {
  0% {
    transform: translateY(-500px) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translateY(20px) scale(1.05);
    opacity: 0.8;
  }
  70% {
    transform: translateY(-10px) scale(0.95);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-9px) scale(1);
    opacity: 1;
  }
}

/* 为不同标记添加延迟动画效果 */
.property[data-type="home"] {
  animation-delay: 0.1s;
}

.property[data-type="building"] {
  animation-delay: 0.2s;
}

.property[data-type="warehouse"] {
  animation-delay: 0.3s;
}

.property[data-type="store-alt"] {
  animation-delay: 0.4s;
}