/* Meyne Floorplan Planner */

.mfp-app {
	display: flex;
	flex-direction: column;
	min-height: 600px;
	background: #f7f7f8;
	color: #1f2937;
	font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	box-sizing: border-box;
}
.mfp-app *,
.mfp-app *::before,
.mfp-app *::after {
	box-sizing: border-box;
}

.mfp-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	flex-wrap: wrap;
}

.mfp-toolbar-left,
.mfp-toolbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.mfp-units {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: 8px;
	font-size: 13px;
}
.mfp-units label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
}

.mfp-divider {
	width: 1px;
	height: 22px;
	background: #e5e7eb;
	display: inline-block;
}

.mfp-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	background: #fff;
	color: #1f2937;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.2;
	transition: background .15s, border-color .15s;
}
.mfp-btn:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}
.mfp-btn:focus {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
}
.mfp-btn-primary {
	background: #2563eb;
	color: #fff;
	border-color: #2563eb;
}
.mfp-btn-primary:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
}
.mfp-btn-block {
	width: 100%;
	justify-content: center;
}
.mfp-btn-small {
	padding: 4px 8px;
	font-size: 12px;
}
.mfp-btn[hidden] { display: none !important; }

.mfp-guest-notice {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #fef3c7;
	color: #78350f;
	font-size: 13px;
	border-bottom: 1px solid #fde68a;
	flex-wrap: wrap;
}
.mfp-guest-notice span { flex: 1; min-width: 200px; }

.mfp-body {
	display: flex;
	flex: 1;
	min-height: 0;
}

.mfp-sidebar,
.mfp-properties {
	width: 220px;
	flex-shrink: 0;
	background: #fff;
	border-right: 1px solid #e5e7eb;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.mfp-properties {
	border-right: none;
	border-left: 1px solid #e5e7eb;
}

.mfp-sidebar-search,
.mfp-sidebar-actions {
	padding: 8px;
	border-bottom: 1px solid #f1f5f9;
}
.mfp-search {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 13px;
}

.mfp-library {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0;
}

.mfp-category {
	border-bottom: 1px solid #f1f5f9;
}
.mfp-category-header {
	padding: 8px 12px;
	background: #f9fafb;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #6b7280;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	user-select: none;
}
.mfp-category-header::after {
	content: "▾";
	font-size: 10px;
}
.mfp-category.collapsed .mfp-category-header::after {
	content: "▸";
}
.mfp-category.collapsed .mfp-category-items {
	display: none;
}
.mfp-category-items {
	padding: 4px 8px 8px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
}
.mfp-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 6px 4px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	font-size: 11px;
	text-align: center;
	cursor: grab;
	user-select: none;
	min-height: 56px;
}
.mfp-item:hover {
	background: #eff6ff;
	border-color: #93c5fd;
}
.mfp-item:active { cursor: grabbing; }
.mfp-item-icon {
	width: 32px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.mfp-item-icon svg {
	display: block;
	max-width: 100%;
	max-height: 100%;
}
.mfp-item-label { line-height: 1.15; }

.mfp-canvas-wrap {
	flex: 1;
	position: relative;
	background:
		linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
		linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
		linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
	background-size: 20px 20px;
	background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
	overflow: hidden;
	min-height: 0;
}

.mfp-canvas {
	display: block;
	width: 100%;
	height: 100%;
	cursor: default;
	touch-action: none;
}
.mfp-canvas.mfp-can-grab { cursor: grab; }
.mfp-canvas.mfp-grabbing { cursor: grabbing; }
.mfp-app.mfp-wall-mode .mfp-canvas { cursor: crosshair; }

.mfp-empty-hint {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	color: #6b7280;
	text-align: center;
	padding: 20px;
}
.mfp-empty-hint p { margin: 4px 0; }
.mfp-empty-hint .mfp-hint-keys {
	font-size: 12px;
	color: #9ca3af;
}
.mfp-app.mfp-has-room .mfp-empty-hint { display: none; }

.mfp-properties h3 {
	margin: 0;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	border-bottom: 1px solid #f1f5f9;
}
.mfp-properties-content {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
}
.mfp-no-selection { color: #9ca3af; font-style: italic; font-size: 13px; }
.mfp-properties .mfp-prop-row {
	margin-bottom: 10px;
}
.mfp-properties label {
	display: block;
	font-size: 12px;
	color: #4b5563;
	margin-bottom: 4px;
}
.mfp-properties input[type="text"],
.mfp-properties input[type="number"],
.mfp-properties textarea {
	width: 100%;
	padding: 5px 7px;
	border: 1px solid #d1d5db;
	border-radius: 5px;
	font-size: 13px;
	font-family: inherit;
	resize: vertical;
}
.mfp-prop-buttons {
	display: flex;
	gap: 6px;
	margin-top: 8px;
}

.mfp-modal {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 50;
}
.mfp-modal[hidden] { display: none; }
.mfp-modal-inner {
	background: #fff;
	border-radius: 10px;
	padding: 20px;
	min-width: 320px;
	max-width: 90%;
	box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.mfp-modal-inner h3 { margin: 0 0 12px; font-size: 16px; }
.mfp-modal-inner label {
	display: block;
	font-size: 13px;
	color: #374151;
	margin-bottom: 8px;
}
.mfp-modal-inner input {
	margin-top: 4px;
	padding: 6px 8px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 13px;
	width: 100%;
}
.mfp-modal-inner .mfp-form-row label {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.mfp-modal-inner .mfp-form-row label > span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.mfp-modal-inner .mfp-form-row label > span input {
	width: 80px;
}
.mfp-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.mfp-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}
.mfp-share-url {
	font-family: monospace;
	font-size: 12px;
	background: #f3f4f6;
}

.mfp-smart-input-label {
	display: block;
	font-size: 13px;
	color: #374151;
	margin-bottom: 8px;
}
.mfp-smart-input {
	margin-top: 4px;
	width: 100%;
}
.mfp-smart-feedback {
	display: block;
	min-height: 1em;
	margin-top: 4px;
	font-size: 12px;
	color: #6b7280;
}
.mfp-smart-feedback.mfp-smart-ok { color: #047857; }
.mfp-smart-feedback.mfp-smart-warn { color: #b45309; }
.mfp-smart-divider {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 12px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #9ca3af;
}
.mfp-smart-divider::before,
.mfp-smart-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

.mfp-myplans-list {
	max-height: 320px;
	overflow-y: auto;
	margin: 8px 0;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
}
.mfp-myplans-list p {
	margin: 0;
	padding: 12px;
	color: #6b7280;
	font-style: italic;
}
.mfp-myplans-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-bottom: 1px solid #f1f5f9;
}
.mfp-myplans-row:last-child { border-bottom: none; }
.mfp-myplans-info { flex: 1; min-width: 0; }
.mfp-myplans-title {
	font-weight: 600;
	font-size: 14px;
	color: #111827;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mfp-myplans-meta {
	font-size: 12px;
	color: #6b7280;
}
.mfp-myplans-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.mfp-toast {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	background: #1f2937;
	color: #fff;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 13px;
	z-index: 60;
	box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.mfp-toast[hidden] { display: none; }

@media (max-width: 900px) {
	.mfp-sidebar,
	.mfp-properties { width: 180px; }
}
@media (max-width: 700px) {
	.mfp-body { flex-direction: column; }
	.mfp-sidebar,
	.mfp-properties {
		width: 100%;
		max-height: 200px;
		border-right: none;
		border-bottom: 1px solid #e5e7eb;
	}
	.mfp-properties { border-bottom: none; border-top: 1px solid #e5e7eb; }
}

@media print {
	body * { visibility: hidden !important; }
	.mfp-app, .mfp-app * { visibility: visible !important; }
	.mfp-toolbar,
	.mfp-sidebar,
	.mfp-properties,
	.mfp-guest-notice,
	.mfp-empty-hint,
	.mfp-toast,
	.mfp-modal { display: none !important; }
	.mfp-app {
		position: absolute;
		left: 0; top: 0;
		width: 100%;
		border: none;
	}
	.mfp-canvas-wrap { background: #fff !important; }
}
