/* ─── 2D FLOORPLAN SVG & ROOM AMBIENCE VISUALS ─────────────────────── */
.fp-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}

.fp-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.fp-dot.is-cyan { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.fp-dot.is-warm { background: var(--accent-warm); box-shadow: 0 0 8px var(--accent-warm); }
.fp-dot.is-alert { background: var(--accent-alert); box-shadow: 0 0 8px var(--accent-alert); }
.fp-dot.is-subtle { background: rgba(255, 255, 255, 0.28); }

.fp-svg {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

.fp-floor-shell {
  fill: #121518;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.5;
}

.fp-room {
  cursor: pointer;
}

.fp-room-base {
  fill: #1b1f24;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.4;
  transition: stroke 0.18s ease, fill 0.18s ease;
}

.fp-room:hover .fp-room-base,
.fp-room.is-selected .fp-room-base {
  stroke: var(--accent-cyan);
  stroke-width: 2;
}

.fp-room-glow {
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fp-room-title {
  fill: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  pointer-events: none;
}

.fp-room-stats {
  fill: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  pointer-events: none;
}

.fp-toggle-btn {
  cursor: pointer;
}

.fp-toggle-btn rect {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
}

.fp-toggle-btn.is-on rect {
  fill: rgba(56, 242, 233, 0.2);
  stroke: rgba(56, 242, 233, 0.65);
}

.fp-toggle-btn text {
  fill: #ffffff;
  font-size: 10px;
  font-weight: 600;
}

.fp-badge rect {
  fill: rgba(13, 15, 16, 0.85);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}

.fp-thermostat-badge.is-heating rect {
  stroke: rgba(255, 191, 123, 0.72);
}

.fp-badge-title {
  fill: #ffffff;
  font-size: 9.5px;
  font-weight: 600;
}

.fp-badge-sub {
  fill: rgba(255, 255, 255, 0.68);
  font-size: 8.5px;
}

.fp-radar-core {
  fill: rgba(255, 255, 255, 0.35);
}

.fp-radar-wave {
  fill: rgba(56, 242, 233, 0.08);
  stroke: rgba(56, 242, 233, 0.3);
  stroke-width: 1;
}

@keyframes fpRadarPulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  70% { transform: scale(1.25); opacity: 0.25; }
  100% { transform: scale(0.85); opacity: 0.9; }
}

.fp-sensor-ring.is-presence-active .fp-radar-core {
  fill: var(--accent-cyan);
}

.fp-sensor-ring.is-presence-active .fp-radar-wave {
  fill: rgba(56, 242, 233, 0.26);
  stroke: var(--accent-cyan);
  transform-box: fill-box;
  transform-origin: center;
  animation: fpRadarPulse 1.4s ease-in-out infinite;
}

.fp-leak-badge.is-water-alarm rect {
  fill: rgba(255, 112, 67, 0.26);
  stroke: var(--accent-alert);
  stroke-width: 1.5;
}

/* ─── ROOM AMBIENCE VISUAL BANNER ──────────────────────────────────── */
.room-visual-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 82px;
  background: #14171a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-end;
}

.room-visual-banner.is-lit {
  border-color: rgba(56, 242, 233, 0.32);
}

.room-visual-banner.is-pulse-warn {
  border-color: var(--accent-alert);
}

.room-visual-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
  transition: filter 0.25s ease;
}

.room-visual-banner.is-lit .room-visual-bg {
  filter: brightness(0.9);
}

.room-visual-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 30%, rgba(255, 191, 123, 0.45), rgba(56, 242, 233, 0.16) 55%, transparent 80%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.room-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 18, 20, 0.22) 0%, rgba(16, 18, 20, 0.88) 100%);
  pointer-events: none;
}

.room-visual-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.room-visual-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-visual-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.room-visual-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.room-visual-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
}

.room-visual-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.room-metric-pill,
.room-hw-pill {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(16, 18, 20, 0.72);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.room-metric-pill.is-on {
  color: var(--accent-cyan);
  border-color: rgba(56, 242, 233, 0.42);
}

.room-metric-pill.is-warm {
  color: var(--accent-warm);
  border-color: rgba(255, 191, 123, 0.45);
}

.room-hw-pill {
  font-size: 9px;
  color: var(--text-subtle);
}
