/* T-21 #1: interactive floor plans (D-090) – brand guide §10.2. Own file (D-103); tokens from site.css. */
.plan-map { position: relative; }
.plan-map .plan-base { display: block; width: 100%; height: auto; filter: grayscale(1); }
.plan-overlay { position: absolute; top: 0; left: 0; width: 100%; height: auto; } /* height from the viewBox – the card below never stretches it */
.plan-unit { cursor: pointer; outline: none; }
.plan-unit path, .plan-extra { vector-effect: non-scaling-stroke; stroke-width: 1.5px; fill-opacity: .12; stroke-linejoin: round; transition: fill-opacity .15s, stroke-width .15s; }
.plan-extra { fill-opacity: .06; stroke-dasharray: 4 3; pointer-events: none; }
.plan-unit.status-free path, .plan-extra.status-free { fill: var(--ok); stroke: var(--ok); }
.plan-unit.status-reserved path, .plan-extra.status-reserved { fill: var(--warn); stroke: var(--warn); }
.plan-unit.status-sold path, .plan-extra.status-sold { fill: var(--sold); stroke: var(--sold); }
.plan-unit:hover path, .plan-unit.is-active path { fill-opacity: .3; stroke-width: 3px; }
.plan-extra.is-active { fill-opacity: .15; stroke-width: 3px; }
.plan-unit:focus-visible path { fill-opacity: .3; stroke-width: 3px; stroke: var(--ink); }
/* the unit of the unit page (brand §10.2 "избран обект") */
.plan-unit.is-current path { fill: var(--copper); fill-opacity: .32; stroke: var(--copper-text); stroke-width: 3px; }
.plan-extra.is-current { fill: var(--copper); fill-opacity: .16; stroke: var(--copper-text); stroke-width: 3px; }

/* card: preview on hover, pinned (with actions) on click / Enter / tap */
.plan-card { position: absolute; z-index: 5; width: 290px; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 16px 40px rgba(24, 33, 40, .18); padding: 16px 18px; font-size: .9rem; line-height: 1.45; }
.plan-card[hidden] { display: none; }
.plan-card:not(.is-pinned) { pointer-events: none; }
.plan-card-title { margin: 0 32px 6px 0; font-size: 1.05rem; }
.plan-card .status { margin-bottom: 8px; }
.plan-card dl { margin: 0; display: grid; gap: 2px; }
.plan-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.plan-card dt { color: var(--muted); } .plan-card dd { margin: 0; font-weight: 700; white-space: nowrap; }
.plan-card .plan-card-price dd { font-size: 1.05rem; }
.plan-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.plan-card-actions .btn { min-height: 44px; padding: .45em 1em; font-size: .9rem; flex: 1 1 auto; }
.plan-card-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font: inherit; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.plan-card-close:hover { background: var(--beige); }
.plan-card:not(.is-pinned) .plan-card-close { display: none; }
@media (max-width: 767px) {
  .plan-card { position: relative; left: auto !important; top: auto !important; width: auto; margin-top: 12px; box-shadow: none; }
}

/* T-21 #2: calculator picture – own block (D-103 #4): left column under the choice, the result spans both rows */
.calc > .calc-plan { grid-column: 1; grid-row: 2; margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calc > .calc-result { grid-column: 2; grid-row: 1 / span 2; }
.calc-plan img { display: block; width: 100%; height: auto; }
.calc-plan figcaption { padding: 10px 16px; border-top: 1px solid var(--line); font-size: .9rem; text-align: right; }
.calc-plan figcaption a { color: var(--copper-text); font-weight: 700; text-decoration: none; }
@media (max-width: 900px) { .calc > .calc-plan, .calc > .calc-result { grid-column: auto; grid-row: auto; } }
