/* ─── Room hotspots ─── */
.room-hotspot {
  position: absolute;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.room-hotspot .room-label {
  display: none;
  /* floor plan images already show room numbers */
}

.room-hotspot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 95, 5, .12);
  transition: background .25s;
}

.room-hotspot:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow), inset 0 0 20px rgba(255, 95, 5, .1);
}

.room-hotspot:hover::after {
  background: rgba(255, 95, 5, .25);
}

/* ─── Coral flagpole branches ─── */
@keyframes gentle-sway {

  0%,
  100% {
    transform: rotate(-1.5deg);
  }

  50% {
    transform: rotate(1.5deg);
  }
}

@keyframes flagpole-in {
  from {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }
}

/* ── Compact chip (default view) ── */
.domain-chip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(10, 35, 75, 0.78);
  border: 1px solid rgba(80, 180, 255, 0.3);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 2;
}

.domain-chip-emojis {
  font-size: 7px;
  letter-spacing: 1px;
  line-height: 1;
}

.domain-chip-count {
  font-size: 6px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1;
}

/* hide chip when expanded */
.room-hotspot.expanded .domain-chip {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  pointer-events: none;
}

/* ── Flagpole (expanded view) ── */
.coral-flagpole {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: bottom center;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s, transform .3s cubic-bezier(.4, 1, .2, 1);
}

.room-hotspot.expanded .coral-flagpole,
.room-hotspot.coral-auto .coral-flagpole {
  opacity: 1;
  transform: translateX(-50%) scaleY(1);
}

.coral-trunk {
  width: 2px;
  background: linear-gradient(to top, rgba(255, 160, 60, 0.9), rgba(255, 120, 80, 0.5), rgba(255, 80, 120, 0.2));
  border-radius: 1px;
  position: relative;
}

.coral-trunk-glow {
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 160, 60, 0.9), rgba(255, 120, 50, 0.3));
  box-shadow: 0 0 6px rgba(255, 140, 50, 0.6);
}

.coral-branches {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 100%;
}

.coral-branch {
  position: absolute;
  display: flex;
  align-items: center;
  transform-origin: left center;
  animation: gentle-sway 4s ease-in-out infinite;
}

.coral-branch.branch-left {
  flex-direction: row-reverse;
  right: 0;
  transform-origin: right center;
}

.coral-branch.branch-right {
  flex-direction: row;
  left: 0;
}

.coral-branch-arm {
  height: 1.5px;
  border-radius: 1px;
  flex-shrink: 0;
}

.coral-tag {
  font-size: 6.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(10, 35, 75, 0.82);
  border: 1px solid rgba(80, 180, 255, 0.4);
  border-radius: 3px;
  padding: 1.5px 4px;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  flex-shrink: 0;
}

.room-hotspot.selected {
  border-color: var(--teal);
  box-shadow: 0 0 30px rgba(29, 88, 167, .35), inset 0 0 20px rgba(29, 88, 167, .1);
}

.room-hotspot.selected::after {
  background: rgba(29, 88, 167, .2);
}
