/* =========================================================
   The floor-plan styles — the booking map's CSS from the project, unchanged,
   scoped under .rz-app so none of it can leak into the portfolio.
   ========================================================= */

.rz-app {
	--chapel-white: #ffff;
	--deep-taupe: #503d22;
	--ease: cubic-bezier(0.4, 0, 0.2, 1);
	--font-fa: 'Baloo Bhaijaan 2', Tahoma, sans-serif;
	--font-serif: 'Lora', Georgia, serif;
	--line: rgba(66, 46, 47, 0.12);
	--ok: #6e8151;
	--r-sm: 8px;
	--r-xs: 5px;
	--rich-sabel: #3b3229;
	--table-edge: rgba(66, 46, 47, 0.24);
	--table-label-bg: #efeae4;
	--table-label-ink: #422e2f;
	--table-side: #827367;
	--table-top: #c7bcae;

	/* map.css — استایل نقشه‌ی SVG واقعی روف + کارت/نوار ابزار/لجند اطراف نقشه. فقط index.html و admin.html لازمش دارن (چون map-renderer.js بین این دوتا مشترکه). */

	/* ==========================================================================
	   Reservation map
	   ========================================================================== */

	.map-card {
		padding: 20px;
	}
	.map-toolbar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		flex-wrap: wrap;
		padding: 0 2px 14px;
	}
	.legend {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
	}
	.legend span {
		display: flex;
		align-items: center;
		gap: 6px;
		color: var(--deep-taupe);
		font-size: 12px;
	}
	.dot {
		width: 9px;
		height: 9px;
		border-radius: 50%;
		display: inline-block;
	}
	.dot.perfect {
		background: var(--ok);
	}
	.dot.soft {
		background: #a9b98c;
	}
	.dot.reserved {
		background: rgba(66, 46, 47, 0.3);
	}
	.dot.selected {
		background: var(--rich-sabel);
	}

	.map-wrap {
		border: 1px solid var(--line);
		border-radius: var(--r-sm);
		overflow: hidden;
		background: #fff;
		position: relative;
	}
	#floorMap {
		width: 100%;
		height: auto;
		display: block;
		font-family: var(--font-fa);
	}
	#floorMap text {
		font-family: var(--font-fa);
	}

	/* Position comes from --tx/--ty/--rot (set in JS) so hover can extend the
	   same transform instead of fighting an SVG transform attribute. */
	.map-table {
		cursor: pointer;
		transform: translate(calc(var(--tx, 0) * 1px), calc(var(--ty, 0) * 1px)) rotate(var(--rot, 0deg));
		transition:
			transform 0.3s var(--ease),
			filter 0.3s var(--ease);
		filter: drop-shadow(0 6px 10px rgba(11, 15, 30, 0.1));
	}
	.map-table:hover:not(.disabled) {
		transform: translate(calc(var(--tx, 0) * 1px), calc(var(--ty, 0) * 1px)) rotate(var(--rot, 0deg)) translateY(-6px);
		filter: drop-shadow(0 16px 20px rgba(11, 15, 30, 0.18));
	}
	.map-table.disabled {
		opacity: 0.4;
		cursor: not-allowed;
	}
	.map-table.selected {
		filter: drop-shadow(0 16px 22px rgba(66, 46, 47, 0.3));
	}

	.bubble {
		position: absolute;
		transform: translate(50%, -100%);
		background: var(--rich-sabel);
		color: var(--chapel-white);
		border-radius: var(--r-xs) var(--r-xs) 2px var(--r-xs);
		padding: 4px 9px;
		font-size: 11px;
		pointer-events: none;
		white-space: nowrap;
		animation: pop 0.25s var(--ease) both;
	}

	.side-panel {
		margin-top: 14px;
		display: grid;
		gap: 10px;
	}
	.table-detail {
		padding: 16px;
		border-radius: var(--r-sm);
		background: rgba(255, 255, 255, 0.35);
		border: 1px solid var(--line);
	}
	.table-detail h4 {
		color: var(--rich-sabel);
		font-size: 15px;
		margin-bottom: 6px;
	}
	.table-detail p {
		color: var(--deep-taupe);
		line-height: 1.75;
		margin-bottom: 5px;
		font-size: 13px;
	}
	.combo-list {
		display: grid;
		gap: 7px;
	}
	.combo-item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		border: 1px solid var(--line);
		border-radius: var(--r-xs);
		padding: 11px 13px;
	}
	.combo-item span {
		font-size: 13px;
		color: var(--rich-sabel);
	}

	.sheet-scrim {
		display: none;
	}
	@media (max-width: 767px) {
		.side-panel.as-sheet {
			position: fixed;
			inset: auto 0 0 0;
			z-index: 60;
			margin: 0;
			max-height: 72vh;
			overflow-y: auto;
			padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
			background: var(--chapel-white);
			border-radius: 10px 10px 0 0;
			box-shadow: 0 -14px 40px rgba(11, 15, 30, 0.22);
			transform: translateY(100%);
			transition: transform 0.4s var(--ease);
			border: 1px solid var(--line);
			border-bottom: none;
		}
		.side-panel.as-sheet.open {
			transform: translateY(0);
		}
		.sheet-handle {
			width: 34px;
			height: 3px;
			border-radius: 3px;
			background: var(--line);
			margin: 0 auto 12px;
		}
		.sheet-scrim.open {
			display: block;
			position: fixed;
			inset: 0;
			background: rgba(31, 21, 22, 0.3);
			z-index: 55;
		}
	}

	/* Real Roof floor map — SVG 2.5D layer ======================================= */

	[hidden] {
		display: none !important;
	}

	.reservation-layout {
		grid-template-columns: 350px minmax(0, 1fr);
	}
	.reservation-filter {
		position: sticky;
		top: 88px;
	}
	.map-toolbar > div:first-child {
		display: grid;
		gap: 3px;
	}
	.map-toolbar h3 {
		margin: 0;
	}
	.map-hint {
		color: var(--deep-taupe);
		font-size: 11.5px;
		opacity: 0.78;
	}

	.map-zone-tabs {
		display: flex;
		gap: 6px;
		overflow-x: auto;
		padding: 1px 1px 10px;
		scrollbar-width: thin;
		scrollbar-color: var(--line) transparent;
	}
	.map-zone-tabs button {
		flex: none;
		padding: 8px 14px;
		border: 1px solid var(--line);
		border-radius: var(--r-xs);
		color: var(--deep-taupe);
		font-size: 12px;
		background: rgba(255, 255, 255, 0.22);
		transition:
			background 0.22s ease,
			border-color 0.22s ease,
			color 0.22s ease,
			transform 0.22s ease;
	}
	.map-zone-tabs button:hover {
		border-color: var(--rich-sabel);
		color: var(--rich-sabel);
		transform: translateY(-1px);
	}
	.map-zone-tabs button.active {
		background: var(--rich-sabel);
		border-color: var(--rich-sabel);
		color: var(--chapel-white);
	}

	.map-wrap {
		min-height: 430px;
		aspect-ratio: 2 / 1;
		background: #e8e1d8;
		isolation: isolate;
		touch-action: none;
		cursor: grab;
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
	}
	.map-wrap:active {
		cursor: grabbing;
	}
	.roof-floor-map {
		width: 100%;
		height: 100%;
		display: block;
		user-select: none;
		-webkit-user-select: none;
		background: #e8e1d8;
	}
	.roof-floor-map.is-panning {
		cursor: grabbing;
	}

	.map-loading {
		position: absolute;
		inset: 0;
		z-index: 5;
		display: grid;
		place-content: center;
		justify-items: center;
		gap: 10px;
		background: linear-gradient(135deg, rgba(239, 234, 228, 0.96), rgba(197, 188, 173, 0.92));
		color: var(--rich-sabel);
	}
	.map-loading span {
		width: 34px;
		height: 34px;
		border: 2px solid var(--line);
		border-top-color: var(--rich-sabel);
		border-radius: 50%;
		animation: mapSpin 0.8s linear infinite;
	}
	.map-loading b {
		font-size: 12px;
		font-weight: 600;
	}

	.map-controls {
		position: absolute;
		direction: ltr;
		left: 12px;
		bottom: 12px;
		z-index: 4;
		display: flex;
		overflow: hidden;
		border: 1px solid rgba(66, 46, 47, 0.17);
		border-radius: var(--r-sm);
		background: rgba(239, 234, 228, 0.9);
		box-shadow: 0 8px 24px rgba(31, 21, 22, 0.12);
	}
	.map-controls button {
		width: 36px;
		height: 34px;
		color: var(--rich-sabel);
		font-size: 18px;
		font-family: var(--font-serif);
		border-left: 1px solid var(--line);
		transition:
			background 0.2s ease,
			color 0.2s ease;
	}
	.map-controls button:first-child {
		border-left: 0;
	}
	.map-controls button:hover {
		background: var(--rich-sabel);
		color: var(--chapel-white);
	}

	/* Dynamic table assembly. The outer group owns map coordinates; the inner
	   group owns hover/entrance motion so transforms never fight each other. */
	.roof-table-anchor {
		--table-top: #c7bcae;
		--table-side: #827367;
		--table-edge: rgba(66, 46, 47, 0.24);
		--table-label-bg: #efeae4;
		--table-label-ink: #422e2f;
		cursor: pointer;
		outline: none;
	}
	.roof-table-anchor.is-perfect {
		--table-top: #788c5e;
		--table-side: #50623d;
		--table-edge: rgba(56, 73, 40, 0.7);
		--table-label-bg: #eef1e8;
		--table-label-ink: #354526;
	}
	.roof-table-anchor.is-soft {
		--table-top: #adbd90;
		--table-side: #7f9166;
		--table-edge: rgba(84, 104, 62, 0.56);
		--table-label-bg: #f1f3ec;
		--table-label-ink: #46562f;
	}
	.roof-table-anchor.is-selected {
		--table-top: #422e2f;
		--table-side: #24191b;
		--table-edge: #efeae4;
		--table-label-bg: #efeae4;
		--table-label-ink: #422e2f;
	}
	.roof-table-anchor.is-neutral {
		--table-top: #d5cbc0;
		--table-side: #84766b;
		--table-edge: rgba(66, 46, 47, 0.28);
	}
	.roof-table-anchor.is-unavailable {
		--table-top: #806f69;
		--table-side: #594a49;
		--table-edge: rgba(66, 46, 47, 0.25);
		opacity: 0.34;
		cursor: not-allowed;
	}
	.roof-table-anchor.is-editable {
		cursor: grab;
	}
	.roof-table-anchor.is-dragging {
		cursor: grabbing;
	}

	.roof-table-lift {
		scale: 0.6;
		transform-origin: center;
		transform-box: fill-box;
		transition:
			transform 0.28s var(--ease),
			filter 0.28s var(--ease);
		animation: tableEnter 0.48s var(--ease) both;
		animation-delay: var(--table-delay, 0ms);
		filter: drop-shadow(0 7px 6px rgba(31, 21, 22, 0.13));
	}
	.roof-table-anchor:hover:not(.is-unavailable) .roof-table-lift,
	.roof-table-anchor:focus-visible:not(.is-unavailable) .roof-table-lift {
		transform: translateY(-7px);
		filter: drop-shadow(0 15px 12px rgba(31, 21, 22, 0.22));
	}
	.roof-table-anchor.is-dragging .roof-table-lift {
		transform: translateY(-10px) scale(1.025);
		filter: drop-shadow(0 20px 15px rgba(31, 21, 22, 0.26));
	}
	.roof-table-anchor.is-selected .roof-table-lift {
		filter: drop-shadow(0 17px 13px rgba(66, 46, 47, 0.34));
	}

	.table-shadow {
		fill: rgba(31, 21, 22, 0.16);
	}
	.table-side {
		fill: var(--table-side);
		stroke: var(--table-edge);
		stroke-width: 1.2;
	}
	.table-top {
		fill: var(--table-top);
		stroke: var(--table-edge);
		stroke-width: 1.4;
		transition:
			fill 0.3s ease,
			stroke 0.3s ease;
	}
	.table-highlight {
		fill: rgba(255, 255, 255, 0.16);
		stroke: rgba(255, 255, 255, 0.28);
		stroke-width: 2;
		stroke-linecap: round;
		pointer-events: none;
	}
	.table-number-badge {
		pointer-events: none;
	}

	.table-number-bg {
		fill: var(--table-label-bg);
		stroke: var(--table-edge);
		stroke-width: 1;
		transition: fill 0.3s ease;
	}
	.table-number {
		fill: var(--table-label-ink);
		font-family: var(--font-fa);
		font-size: 14px;
		font-weight: 800;
		pointer-events: none;
	}
	.roof-table-anchor.is-selected .table-number-bg {
		animation: selectedPulse 1.7s ease-in-out infinite;
	}

	.chair-shadow,
	.sofa-shadow {
		fill: rgba(31, 21, 22, 0.17);
	}
	.chair-base,
	.sofa-seat {
		fill: #eee8e1;
		stroke: rgba(66, 46, 47, 0.25);
		stroke-width: 1;
	}
	.chair-back,
	.sofa-back {
		fill: #c6baae;
		stroke: rgba(66, 46, 47, 0.22);
		stroke-width: 1;
	}
	.chair-seam {
		fill: none;
		stroke: rgba(66, 46, 47, 0.21);
		stroke-width: 1;
		stroke-linecap: round;
	}

	.shared-seat-dot {
		fill: var(--rich-sabel);
		opacity: 0.5;
	}
	.sofa-capacity {
		fill: rgba(239, 234, 228, 0.84);
		stroke: rgba(66, 46, 47, 0.22);
		stroke-width: 1;
	}
	.roof-table-anchor.is-unavailable .roof-chair,
	.roof-table-anchor.is-unavailable .roof-sofa-module {
		opacity: 0.72;
	}

	.map-time-bubble {
		pointer-events: none;
		animation: bubblePop 0.26s var(--ease) both;
	}
	.map-time-bubble rect,
	.map-time-bubble path {
		fill: var(--rich-sabel);
	}
	.map-time-bubble text {
		fill: var(--chapel-white);
		font-family: var(--font-fa);
		font-size: 11px;
		font-weight: 650;
	}

	.combo-connector {
		fill: none;
		stroke: var(--rich-sabel);
		stroke-width: 5;
		stroke-linecap: round;
		stroke-dasharray: 8 8;
		opacity: 0.72;
		animation: comboDash 1.1s linear infinite;
	}
	.combo-badge circle {
		fill: var(--rich-sabel);
		stroke: var(--chapel-white);
		stroke-width: 2;
	}
	.combo-badge text {
		fill: var(--chapel-white);
		font-family: var(--font-serif);
		font-weight: 700;
		font-size: 20px;
	}

	.combo-panel {
		margin-top: 14px;
	}
	.combo-item > span {
		display: grid;
		gap: 2px;
	}
	.combo-item > span b {
		color: var(--rich-sabel);
		font-size: 13px;
	}
	.combo-item > span small {
		color: var(--deep-taupe);
		font-size: 11px;
	}

	/* ==========================================================================

	/* ==========================================================================
	   Responsive (moved from Responsive section)
	   ========================================================================== */

	@media (max-width: 767px) {
		.map-card {
			padding: 16px;
		}
	}
}


