.floor-plan {
  --plan-ink: var(--ink, #292e27);
  --plan-olive: var(--olive, #747c61);
  --plan-paper: var(--paper, #f6f3ec);
  --plan-corridor: #eee9dd;
  --plan-suite: #fcfaf5;
  --plan-shared: #dce0cf;
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  margin-inline: auto;
  overflow: visible;
  font-family: inherit;
  isolation: isolate;
}

.floor-plan__outline {
  fill: var(--plan-corridor);
  stroke: var(--plan-ink);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.floor-plan__room {
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 150ms ease;
}

.floor-plan__shape {
  fill: var(--plan-suite);
  stroke: var(--plan-ink);
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: fill 150ms ease, stroke 150ms ease;
}

.floor-plan__room--shared .floor-plan__shape {
  fill: var(--plan-shared);
}

.floor-plan__room:hover .floor-plan__shape {
  fill: #e7eadc;
  stroke: var(--plan-olive);
}

.floor-plan__room.is-selected .floor-plan__shape {
  fill: var(--plan-olive);
  stroke: var(--plan-ink);
  stroke-width: 1.5;
}

/* SVG buttons have no native focus ring, so the room outline supplies it. */
.floor-plan__room:focus .floor-plan__shape {
  stroke: var(--plan-ink);
  stroke-width: 3;
}

.floor-plan__room.is-dimmed {
  opacity: 0.32;
}

.floor-plan__room.is-dimmed:hover,
.floor-plan__room.is-dimmed:focus {
  opacity: 0.85;
}

.floor-plan__room.is-dimmed.is-selected {
  opacity: 0.78;
}

.floor-plan__number,
.floor-plan__area,
.floor-plan__shared-label {
  fill: var(--plan-ink);
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
  transition: fill 150ms ease;
}

.floor-plan__number {
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.floor-plan__area {
  font-size: 8.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.floor-plan__shared-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

.floor-plan__room.is-selected .floor-plan__number,
.floor-plan__room.is-selected .floor-plan__area,
.floor-plan__room.is-selected .floor-plan__shared-label {
  fill: #fffdf7;
}

.floor-plan__door {
  fill: none;
  stroke: var(--plan-corridor);
  stroke-width: 3;
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.floor-plan__restroom polygon {
  fill: var(--plan-paper);
  stroke: var(--plan-ink);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.floor-plan__restroom text {
  fill: #666a5f;
  font-size: 7.5px;
  text-anchor: middle;
  pointer-events: none;
}

.floor-plan__entry {
  fill: var(--plan-ink);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 2px;
  text-anchor: middle;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {

  .floor-plan__room,
  .floor-plan__shape,
  .floor-plan__number,
  .floor-plan__area,
  .floor-plan__shared-label {
    transition: none;
  }
}

@media (forced-colors: active) {

  .floor-plan__outline,
  .floor-plan__shape,
  .floor-plan__restroom polygon {
    fill: Canvas;
    stroke: CanvasText;
  }

  .floor-plan__room.is-selected .floor-plan__shape {
    fill: Highlight;
    stroke: Highlight;
  }

  .floor-plan__room:focus .floor-plan__shape {
    stroke: Highlight;
    stroke-width: 3;
  }

  .floor-plan__number,
  .floor-plan__area,
  .floor-plan__shared-label,
  .floor-plan__restroom text,
  .floor-plan__entry {
    fill: CanvasText;
  }

  .floor-plan__room.is-selected .floor-plan__number,
  .floor-plan__room.is-selected .floor-plan__area,
  .floor-plan__room.is-selected .floor-plan__shared-label {
    fill: HighlightText;
  }

  .floor-plan__door {
    stroke: Canvas;
  }
}

/* Individual room silhouettes use the exact same polygon as the clickable map. */
.room-footprint {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.room-footprint__wall {
  fill: var(--plan-shared, #dce0cf);
  stroke: var(--ink, #292e27);
  stroke-width: 2.5;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}

.room-footprint__doorway .floor-plan__door {
  stroke: var(--paper, #f6f3ec);
  stroke-width: 4;
}

.room-footprint__labels .floor-plan__number {
  font-family: var(--heading, Georgia, serif);
  font-size: 22px;
}

.room-footprint__labels .floor-plan__area {
  font-size: 7px;
}

.preview-footprint-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 112px;
  padding: 6px 8px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
}

#preview-room-shape {
  height: 90px;
}

.preview-footprint-badge>span {
  display: block;
  font-size: 7px;
  letter-spacing: 1.2px;
  color: var(--muted);
  text-align: center;
}

.preview-footprint-badge .room-footprint__labels {
  display: none;
}

.dialog-room-shape-view {
  min-height: 420px;
  background: var(--paper);
  padding: 22px 24px 18px;
  border: 1px solid var(--line);
}

.room-shape-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

#room-shape-name {
  font-family: var(--heading);
  font-size: 29px;
}

#room-shape-area {
  font-size: 11px;
  color: var(--olive);
}

#dialog-room-shape {
  height: 285px;
  padding: 16px;
}

.dialog-room-shape-view>p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}

.dialog-room-shape-view>.text-button {
  font-size: 10px;
  padding-bottom: 0;
}

.dialog-view-toggle {
  flex-wrap: wrap;
}

@media (max-width: 800px) {
  .dialog-room-shape-view {
    padding: 18px;
  }

  #dialog-room-shape {
    height: 250px;
    padding: 10px;
  }
}

@media (max-width: 580px) {
  .dialog-room-shape-view {
    min-height: 0;
    padding: 16px;
  }

  #dialog-room-shape {
    height: 240px;
  }

  .preview-footprint-badge {
    width: 104px;
  }

  #preview-room-shape {
    height: 80px;
  }
}

@media (forced-colors: active) {
  .room-footprint__wall {
    fill: Canvas;
    stroke: CanvasText;
  }
}

/* Never use a rectangular representative photo for a differently shaped room. */
.preview-photo-wrap.is-footprint-only {
  background: #e9ecdf;
}

.preview-photo-wrap.is-footprint-only .preview-footprint-badge {
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 24px 35px;
  display: flex;
  flex-direction: column;
}

.preview-photo-wrap.is-footprint-only #preview-room-shape {
  flex: 1;
  height: auto;
  min-height: 0;
}

.preview-photo-wrap.is-footprint-only .preview-footprint-badge>span {
  display: none;
}

.preview-photo-wrap.is-footprint-only .room-footprint__labels {
  display: block;
}

.preview-photo-wrap.is-footprint-only .photo-note {
  z-index: 3;
  background: var(--ink);
  font-size: 9px;
}

.gallery-footprint {
  height: 180px;
  background: #e9ecdf;
  padding: 8px 24px;
}

.gallery-footprint .room-footprint__labels {
  display: none;
}

.gallery-footprint .room-footprint__wall {
  stroke-width: 1.5;
}

.room-photo-status {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px !important;
  color: var(--muted);
}

.shared-photo-disclaimer {
  font-size: 9px;
  color: var(--muted);
  margin: -11px 0 17px;
  line-height: 1.6;
}

@media (max-width: 580px) {
  .gallery-footprint {
    height: 170px;
  }

  .preview-photo-wrap.is-footprint-only .preview-footprint-badge {
    padding: 8px 24px 35px;
  }
}

/* Room imagery is restored: never crop away the source-shaped outline. */
.preview-photo-wrap:not(.is-footprint-only) {
  height: 280px;
  padding: 10px 4px 30px;
  background: #f8f6f0;
}

.preview-photo-wrap:not(.is-footprint-only)>img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-card>img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: #f8f6f0;
  padding: 8px;
}

.zoom-photo {
  background: #f8f6f0;
}

.zoom-photo img,
.zoom-photo.is-zoomed img {
  object-fit: contain;
}

.room-photo-status {
  font-size: 10px !important;
}

@media (max-width: 580px) {
  .preview-photo-wrap:not(.is-footprint-only) {
    height: 295px;
  }

  .gallery-card>img {
    height: 180px;
  }
}

.shared-card .shared-image {
  background: #f8f6f0;
}

.shared-card .shared-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.shared-card .shared-image.ascension-image {
  padding: 0;
}