/**
 * Ceniza interactive floor plan.
 *
 * @package Ceniza
 */

.ceniza-floorplan {
	--fp-ink: #4d433a;
	--fp-stone: #68635f;
	--fp-wood: #6f4f36;
	--fp-sand: #f3efe9;
	--fp-paper: #fbf9f6;
	--fp-water: #a9cbc6;
	--fp-green: #a3ab8a;
	position: relative;
	margin: 0;
}

.ceniza-floorplan__svg {
	display: block;
	width: 100%;
	height: auto;
	background-color: var(--fp-paper);
	background-image: var(--fp-texture, none);
	background-position: center;
	background-size: cover;
	border-radius: 4px;
}

/* Zones */
.ceniza-floorplan__zone {
	fill: transparent;
	cursor: pointer;
	transition: fill 0.2s ease;
	outline: none;
}

.ceniza-floorplan__zone.is-active,
.ceniza-floorplan__zone:focus-visible {
	fill: rgba(111, 79, 54, 0.22);
}

.ceniza-floorplan__zone:focus-visible {
	stroke: var(--fp-wood);
	stroke-width: 3;
}

/* Drawing */
.ceniza-floorplan__walls path {
	fill: none;
	stroke: var(--fp-ink);
	stroke-width: 8;
	stroke-linecap: square;
}

.ceniza-floorplan__furniture,
.ceniza-floorplan__furniture * {
	fill: none;
	stroke: var(--fp-stone);
	stroke-width: 2;
	pointer-events: none;
}

.ceniza-floorplan__water {
	fill: var(--fp-water);
	pointer-events: none;
}

.ceniza-floorplan__garden circle {
	fill: var(--fp-green);
	opacity: 0.55;
	pointer-events: none;
}

.ceniza-floorplan__labels text {
	font-family: "EB Garamond", Georgia, serif;
	font-size: 22px;
	fill: var(--fp-ink);
	text-anchor: middle;
	pointer-events: none;
}

.ceniza-floorplan__labels .is-small {
	font-size: 17px;
}

.ceniza-floorplan__labels .is-tiny {
	font-size: 13px;
}

.ceniza-floorplan__labels .is-light {
	fill: #fff;
}

/* Tooltip card */
.ceniza-floorplan__card {
	position: absolute;
	z-index: 5;
	width: 240px;
	padding: 0 0 14px;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 10px 30px rgba(43, 36, 30, 0.18);
	color: var(--fp-ink);
	pointer-events: none;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.ceniza-floorplan__card.is-visible {
	opacity: 1;
	transform: none;
}

.ceniza-floorplan__card img[hidden] {
	display: none;
}

.ceniza-floorplan__card img {
	display: block;
	width: 100%;
	height: 130px;
	object-fit: cover;
	border-radius: 4px 4px 0 0;
}

.ceniza-floorplan__card-title {
	margin: 12px 16px 4px;
	font-family: "EB Garamond", Georgia, serif;
	font-size: 22px;
	line-height: 1.15;
}

.ceniza-floorplan__card-text {
	margin: 0 16px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--fp-stone);
}

.ceniza-floorplan__hint {
	margin-top: 10px;
	font-size: 13px;
	color: var(--fp-stone);
	text-align: center;
}

/* Phones: the card sits below the plan instead of floating */
@media (max-width: 767px) {
	.ceniza-floorplan__card {
		position: static;
		width: auto;
		margin-top: 12px;
		display: none;
	}

	.ceniza-floorplan__card.is-visible {
		display: block;
	}

	.ceniza-floorplan__card img {
		height: 180px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ceniza-floorplan__zone,
	.ceniza-floorplan__card {
		transition: none;
	}
}

/* Materials */
.ceniza-floorplan__furniture .is-counter {
	stroke: var(--fp-ink);
	stroke-width: 8;
	stroke-linecap: square;
}

.ceniza-floorplan__furniture .is-bed {
	stroke: var(--fp-ink);
	stroke-width: 4;
}

.ceniza-floorplan__furniture .is-mark {
	stroke: #3f51b5;
	stroke-width: 4;
	stroke-linecap: round;
}

.ceniza-floorplan__furniture .is-wood {
	fill: #b08a68;
	stroke: var(--fp-wood);
}

.ceniza-floorplan__furniture .is-mirror {
	fill: #cfe0e3;
	stroke: #8fb3b8;
}

/* Feature badge (e.g. A/C) */
.ceniza-floorplan__badge rect {
	fill: var(--fp-wood);
}

.ceniza-floorplan__labels .ceniza-floorplan__badge text {
	font-family: Inter, Arial, sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	fill: #fff;
}

/* Upper floor: corridors, door swings and the open area over the ground floor */
.ceniza-floorplan__corridor {
	fill: rgba(104, 99, 95, 0.14);
	pointer-events: none;
}

.ceniza-floorplan__furniture .is-door {
	stroke: var(--fp-wood);
	stroke-width: 1.5;
}

.ceniza-floorplan__labels .is-void {
	font-style: italic;
	fill: var(--fp-stone);
}
