/* Просмотр этажей дома: canvas + SVG overlay */

#house-cut-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: none;
  background: #1a1a1a;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#house-cut-wrapper.is-visible {
  display: block;
}

body.show-house-cut #panorama {
  pointer-events: none;
}

body.show-house-cut #house-viewer-wrapper {
  display: none !important;
}

body.show-house-cut .ui {
  display: block !important;
  z-index: 100;
  pointer-events: auto;
}

#house-cut-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
}

#house-cut-viewport.is-dragging {
  cursor: grabbing;
}

#house-cut-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

#house-cut-canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#house-cut-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

#house-cut-svg svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#house-cut-svg path[data-floor] {
  cursor: pointer;
  pointer-events: auto;
  transition: fill-opacity 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease;
}

#house-cut-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 26, 0.72);
  color: #fff;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

#house-cut-loading.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Плашка этажа */
.house-cut-tooltip {
  position: absolute;
  z-index: 5;
  box-sizing: border-box;
  min-width: calc(var(--cut-tip-min-width-base, 260px) * var(--ui-scale, 0.7));
  max-width: calc(var(--cut-tip-max-width-base, 340px) * var(--ui-scale, 0.7));
  padding: calc(var(--cut-tip-pad-y-base, 14px) * var(--ui-scale, 0.7))
    calc(var(--cut-tip-pad-x-base, 18px) * var(--ui-scale, 0.7));
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: calc(var(--cut-tip-radius-base, 16px) * var(--ui-scale, 0.7));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  font-family: Manrope, sans-serif;
  color: #1a1a1a;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition: opacity 0.12s ease;
}

.house-cut-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.house-cut-tooltip__title {
  margin: 0 0 calc(10px * var(--ui-scale, 0.7));
  padding-bottom: calc(10px * var(--ui-scale, 0.7));
  border-bottom: 1px solid #e8e8e8;
  font-size: calc(var(--cut-tip-title-base, 18px) * var(--ui-scale, 0.7));
  font-weight: 700;
  line-height: 1.2;
  color: #5c3d3d;
}

.house-cut-tooltip__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.house-cut-tooltip__row {
  display: flex;
  align-items: baseline;
  gap: calc(8px * var(--ui-scale, 0.7));
  margin: 0;
  padding: calc(4px * var(--ui-scale, 0.7)) 0;
  font-size: calc(var(--cut-tip-row-base, 13px) * var(--ui-scale, 0.7));
  line-height: 1.35;
  color: #333;
}

.house-cut-tooltip__label {
  flex: 0 1 auto;
  white-space: nowrap;
}

.house-cut-tooltip__dots {
  flex: 1 1 auto;
  min-width: 12px;
  height: 1em;
  border-bottom: 1px dotted #bdbdbd;
  transform: translateY(-4px);
}

.house-cut-tooltip__price {
  flex: 0 0 auto;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

.house-cut-tooltip__empty {
  margin: 0;
  font-size: calc(var(--cut-tip-row-base, 13px) * var(--ui-scale, 0.7));
  color: #777;
}

.house-cut-tooltip__go {
  display: block;
  width: 100%;
  margin: calc(14px * var(--ui-scale, 0.7)) 0 0;
  padding: calc(var(--cut-tip-btn-pad-y-base, 10px) * var(--ui-scale, 0.7))
    calc(12px * var(--ui-scale, 0.7));
  border: 2px solid #8a4f4a;
  border-radius: calc(10px * var(--ui-scale, 0.7));
  background: transparent;
  color: #8a4f4a;
  font-family: Manrope, sans-serif;
  font-size: calc(var(--cut-tip-btn-base, 14px) * var(--ui-scale, 0.7));
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.house-cut-tooltip__go:hover {
  background: rgba(138, 79, 74, 0.08);
}
