/**
 * Virtual House Widget — premium layout & motion.
 *
 * @package Virtual_House_Widget
 */

.vhw--empty {
	padding: 48px 24px;
	text-align: center;
	background: var(--vhw-surface-muted, #f6f8fb);
	border: 1px dashed var(--vhw-border, rgba(15, 23, 42, 0.12));
	border-radius: var(--vhw-radius-lg, 18px);
}

.vhw__empty-msg {
	margin: 0;
	color: var(--vhw-text-muted, #64748b);
	font-size: 1rem;
	line-height: 1.5;
}

.vhw {
	--vhw-active-color: #1a9d5c;
	--vhw-active-bg: rgba(26, 157, 92, 0.12);
	--vhw-zoom-duration: 1s;
	--vhw-zoom-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--vhw-surface: #ffffff;
	--vhw-surface-muted: #f6f8fb;
	--vhw-border: rgba(15, 23, 42, 0.08);
	--vhw-text: #0f172a;
	--vhw-text-muted: #64748b;
	--vhw-shadow: 0 18px 45px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
	--vhw-radius-lg: 18px;
	--vhw-radius-md: 12px;
	--vhw-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--vhw-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	color: var(--vhw-text);
	font-family: var(--vhw-font);
}

.vhw *,
.vhw *::before,
.vhw *::after {
	box-sizing: border-box;
}

.vhw__layout {
	display: flex;
	align-items: stretch;
	gap: 20px;
	width: 100%;
	min-width: 0;
}

.vhw__sidebar {
	flex: 0 0 22%;
	max-width: 22%;
	min-width: 0;
}

.vhw__menu {
	list-style: none;
	margin: 0;
	padding: 8px;
	background: var(--vhw-surface-muted);
	border: 1px solid var(--vhw-border);
	border-radius: var(--vhw-radius-lg);
	box-shadow: var(--vhw-shadow);
	max-height: 520px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
}

.vhw__menu-item {
	margin: 0 0 8px;
}

.vhw__menu-item:last-child {
	margin-bottom: 0;
}

.vhw__menu-button {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	text-align: left;
	border: 2px solid transparent;
	background: var(--vhw-surface);
	color: var(--vhw-text);
	border-radius: var(--vhw-radius-md);
	padding: 12px 14px;
	cursor: pointer;
	font: inherit;
	line-height: 1.3;
	transition:
		border-color var(--vhw-transition),
		background-color var(--vhw-transition),
		box-shadow var(--vhw-transition),
		transform var(--vhw-transition);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.vhw__menu-button:hover {
	border-color: rgba(26, 157, 92, 0.35);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
	transform: translateY(-1px);
}

.vhw__menu-button:focus-visible {
	outline: 2px solid var(--vhw-active-color);
	outline-offset: 2px;
}

.vhw__menu-button.is-active {
	border-color: var(--vhw-active-color);
	background: var(--vhw-active-bg);
	box-shadow: 0 10px 26px rgba(26, 157, 92, 0.15);
}

.vhw__menu-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.04);
	color: var(--vhw-active-color);
	flex-shrink: 0;
	transition: background var(--vhw-transition), color var(--vhw-transition), transform var(--vhw-transition);
}

.vhw__menu-button.is-active .vhw__menu-icon {
	background: rgba(26, 157, 92, 0.18);
	color: var(--vhw-active-color);
	transform: scale(1.04);
}

.vhw__menu-icon svg {
	width: 1.1em;
	height: 1.1em;
}

.vhw__menu-label {
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
}

.vhw__house {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vhw__house-inner {
	position: relative;
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	background: #fff;
	border-radius: var(--vhw-radius-lg);
	box-shadow: var(--vhw-shadow);
	border: 1px solid var(--vhw-border);
	overflow: hidden;
}

.vhw__house-media {
	overflow: hidden;
	line-height: 0;
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

.vhw__house-img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
	transform-origin: var(--vhw-origin-x, 50%) var(--vhw-origin-y, 50%);
	transform: scale3d(1, 1, 1);
	transition:
		transform var(--vhw-zoom-duration, 1s) var(--vhw-zoom-ease, cubic-bezier(0.22, 1, 0.36, 1)),
		transform-origin var(--vhw-zoom-duration, 1s) var(--vhw-zoom-ease, cubic-bezier(0.22, 1, 0.36, 1));
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transform-style: preserve-3d;
}

.vhw__house-media.is-zoomed .vhw__house-img {
	transform: scale3d(var(--vhw-zoom-scale, 1.35), var(--vhw-zoom-scale, 1.35), 1);
	will-change: transform;
}

.vhw__house-media:not(.is-zoomed) .vhw__house-img {
	will-change: auto;
}

.vhw__house-placeholder {
	min-height: 280px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 40px 24px;
	background: linear-gradient(145deg, #f8fafc, #eef2ff);
	color: var(--vhw-text-muted);
	text-align: center;
}

.vhw__house-placeholder-icon {
	font-size: 3rem;
	line-height: 1;
	opacity: 0.45;
}

.vhw__house-placeholder-text {
	margin: 0;
	max-width: 280px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.vhw__hotspots {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.vhw__hotspot {
	pointer-events: auto;
	position: absolute;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid rgba(15, 23, 42, 0.14);
	background: #ffffff;
	color: #0f172a;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
	transition:
		transform var(--vhw-transition),
		box-shadow var(--vhw-transition),
		background-color var(--vhw-transition),
		border-color var(--vhw-transition),
		color var(--vhw-transition);
	z-index: 2;
}

.vhw__hotspot:hover {
	transform: translate(-50%, -50%) scale(1.08);
	border-color: rgba(15, 23, 42, 0.28);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}

.vhw__hotspot:focus-visible {
	outline: 3px solid rgba(15, 23, 42, 0.35);
	outline-offset: 3px;
}

.vhw__hotspot-pulse {
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid #b8d624;
	opacity: 0;
	pointer-events: none;
}

.vhw__hotspot.is-active .vhw__hotspot-pulse {
	animation: vhw-pulse 2s ease-out infinite;
}

.vhw__hotspot.is-active {
	background: #cde34b;
	color: #0f172a;
	border-color: rgba(15, 23, 42, 0.18);
	box-shadow: 0 10px 28px rgba(180, 220, 60, 0.45);
}

.vhw__hotspot.is-active .vhw__hotspot-plus {
	display: none;
}

.vhw__hotspot.is-active .vhw__hotspot-eye {
	display: flex;
}

@keyframes vhw-pulse {
	0% {
		transform: scale(0.85);
		opacity: 0.55;
	}
	70% {
		transform: scale(1.35);
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}

.vhw__hotspot-plus {
	position: relative;
	z-index: 1;
	font-size: 1.35rem;
	line-height: 1;
	transition:
		opacity 0.32s var(--vhw-zoom-ease, cubic-bezier(0.22, 1, 0.36, 1)),
		transform 0.32s var(--vhw-zoom-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.vhw__hotspot-eye {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: center;
	color: #0f172a;
	pointer-events: none;
	transition:
		opacity 0.32s var(--vhw-zoom-ease, cubic-bezier(0.22, 1, 0.36, 1)),
		transform 0.32s var(--vhw-zoom-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.vhw__hotspot-eye-svg {
	width: 56%;
	height: 56%;
	display: block;
}

.vhw__panel {
	flex: 0 0 28%;
	max-width: 28%;
	min-width: 0;
	display: flex;
	align-items: stretch;
}

.vhw__panel-inner {
	width: 100%;
	background: var(--vhw-surface);
	border-radius: var(--vhw-radius-lg);
	border: 1px solid var(--vhw-border);
	box-shadow: var(--vhw-shadow);
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 280px;
}

.vhw__panel-inner--with-idle {
	gap: 0;
	padding: 0;
	overflow: hidden;
}

.vhw__panel-detail {
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1 1 auto;
	min-height: 0;
}

.vhw__panel-inner--with-idle .vhw__panel-detail {
	padding: 28px;
	padding-top: 22px;
}

.vhw__panel-idle {
	display: flex;
	flex-direction: column;
	text-align: center;
}

.vhw__panel-idle-header {
	padding: 28px 24px 20px;
	background: #e3f2fd;
	border-radius: var(--vhw-radius-lg) var(--vhw-radius-lg) 0 0;
}

.vhw__panel-idle-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: 0 auto;
	color: #0f172a;
	font-size: 2.25rem;
}

.vhw__panel-idle-icon-wrap svg {
	width: 1em;
	height: 1em;
}

.vhw__panel-idle-msg {
	margin: 0;
	padding: 28px 24px 32px;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.45;
	font-family: Georgia, "Times New Roman", serif;
	color: #1e293b;
}

.vhw__panel-offer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin-top: 2px;
	transition: opacity var(--vhw-transition), transform var(--vhw-transition);
}

.vhw__panel-savings {
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--vhw-text-muted);
	letter-spacing: 0.02em;
}

.vhw__panel-price {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.35em 0.85em;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	background-color: var(--vhw-active-color);
	color: #fff;
}

.vhw__panel-price:empty {
	display: none;
}

.vhw__panel-cta-wrap {
	margin-top: 4px;
	transition: opacity var(--vhw-transition), transform var(--vhw-transition);
}

.vhw__panel-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 20px;
	border-radius: 999px;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	border: none;
	cursor: pointer;
	background-color: #ffe607;
	color: #0f172a;
	transition: transform var(--vhw-transition), box-shadow var(--vhw-transition), filter var(--vhw-transition);
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.vhw__panel-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
	filter: brightness(1.02);
}

.vhw__panel-cta:focus-visible {
	outline: 2px solid var(--vhw-active-color);
	outline-offset: 3px;
}

.vhw__panel-cta--static {
	cursor: default;
}

.vhw__panel-cta--static:hover {
	transform: none;
	filter: none;
}

.vhw__panel-icon {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--vhw-active-bg);
	color: var(--vhw-active-color);
	flex-shrink: 0;
	transition: opacity var(--vhw-transition), transform var(--vhw-transition);
}

.vhw__panel-icon svg {
	width: 1.5em;
	height: 1.5em;
}

.vhw__panel-title {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.25;
	transition: opacity var(--vhw-transition), transform var(--vhw-transition);
}

.vhw__panel-desc {
	margin: 0;
	color: var(--vhw-text-muted);
	font-size: 0.98rem;
	line-height: 1.65;
	transition: opacity var(--vhw-transition), transform var(--vhw-transition);
	flex: 1 1 auto;
}

.vhw__panel-desc p:first-child {
	margin-top: 0;
}

.vhw__panel-desc p:last-child {
	margin-bottom: 0;
}

.vhw.is-content-fade .vhw__panel-icon,
.vhw.is-content-fade .vhw__panel-offer,
.vhw.is-content-fade .vhw__panel-title,
.vhw.is-content-fade .vhw__panel-desc,
.vhw.is-content-fade .vhw__panel-cta-wrap .vhw__panel-cta {
	opacity: 0;
	transform: translateY(6px);
}

@media (prefers-reduced-motion: reduce) {
	.vhw__house-img {
		transition-duration: 0.05s;
	}

	.vhw__hotspot-plus,
	.vhw__hotspot-eye {
		transition-duration: 0.05s;
	}

	.vhw__hotspot.is-active .vhw__hotspot-pulse {
		animation: none;
	}
}

@media (max-width: 1024px) {
	.vhw__layout {
		flex-wrap: wrap;
	}

	.vhw__sidebar {
		flex: 1 1 100%;
		max-width: 100%;
		order: 1;
	}

	.vhw__menu {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		max-height: none;
		padding: 10px;
	}

	.vhw__menu-item {
		flex: 1 1 calc(50% - 8px);
		margin: 0;
		min-width: 140px;
	}

	.vhw__house {
		order: 2;
		flex: 1 1 100%;
	}

	.vhw__panel {
		order: 3;
		flex: 1 1 100%;
		max-width: 100%;
	}
}

@media (max-width: 600px) {
	.vhw__menu-item {
		flex: 1 1 100%;
	}

	.vhw__panel-inner {
		padding: 22px;
	}

	.vhw__panel-title {
		font-size: 1.2rem;
	}
}
