/* LocalTasker Floor Visualiser. Mobile-first. Override --ltfv-accent in your theme to re-brand. */
.ltfv-wrap, .ltfv-overlay {
	--ltfv-accent: #f69222;
	--ltfv-accent-dark: #d97a0b;
	--ltfv-ink: #1f2328;
	--ltfv-muted: #5b6470;
	--ltfv-line: #e4ddd5;
	--ltfv-bg: #ffffff;
	--ltfv-soft: #faf7f3;
	--ltfv-danger: #b42318;
}

/* Page button */
.ltfv-wrap { margin: 16px 0; }
.ltfv-open svg { flex: none; }
.ltfv-open {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 12px 22px; width: 100%;
	background: var(--ltfv-accent); color: #111; border: 0; border-radius: 10px;
	font: 600 16px/1.2 inherit; font-family: inherit; cursor: pointer; text-align: center;
	transition: background .15s, transform .05s;
}
.ltfv-open:hover { background: var(--ltfv-accent-dark); }
.ltfv-open:active { transform: translateY(1px); }
.ltfv-open:focus-visible, .ltfv-overlay :focus-visible { outline: 3px solid #1a5fd0; outline-offset: 2px; }
@media (min-width: 560px) { .ltfv-open { width: auto; } }

/* Modal */
html.ltfv-lock, html.ltfv-lock body { overflow: hidden; }
.ltfv-overlay {
	position: fixed; inset: 0; z-index: 999999; background: rgba(15, 18, 22, .62);
	display: flex; align-items: flex-end; justify-content: center; color: var(--ltfv-ink);
	font-family: inherit; font-size: 16px; line-height: 1.5;
}
.ltfv-dialog {
	position: relative; background: var(--ltfv-bg); width: 100%; max-height: 100%; overflow-y: auto;
	border-radius: 18px 18px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
	box-shadow: 0 -8px 40px rgba(0, 0, 0, .25); outline: 0;
}
@media (min-width: 640px) {
	.ltfv-overlay { align-items: center; padding: 24px; }
	.ltfv-dialog { max-width: 620px; max-height: 92vh; border-radius: 18px; padding: 30px 32px; }
}
.ltfv-x {
	position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; border: 0; background: transparent;
	font-size: 32px; line-height: 1; color: var(--ltfv-muted); cursor: pointer; border-radius: 50%;
}
.ltfv-x:hover { background: var(--ltfv-soft); color: var(--ltfv-ink); }

.ltfv-h { margin: 0 44px 8px 0; font-size: 1.45rem; line-height: 1.25; font-weight: 700; outline: 0; }
.ltfv-lead { margin: 0 0 18px; color: var(--ltfv-muted); }
.ltfv-note { margin: 12px 0 0; font-size: .875rem; color: var(--ltfv-muted); }
.ltfv-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Buttons */
.ltfv-actions { display: grid; gap: 12px; margin-bottom: 20px; }
@media (min-width: 640px) { .ltfv-actions { grid-template-columns: 1fr 1fr; } }
.ltfv-big, .ltfv-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
	min-height: 52px; padding: 12px 20px; border-radius: 12px; border: 2px solid transparent;
	font: 600 1rem/1.2 inherit; font-family: inherit; cursor: pointer; text-align: center;
}
.ltfv-big { flex-direction: column; min-height: 96px; gap: 6px; font-size: 1.05rem; }
.ltfv-primary { background: var(--ltfv-accent); color: #111; }
.ltfv-primary:hover:not(:disabled) { background: var(--ltfv-accent-dark); }
.ltfv-primary:disabled { background: #e8e1d8; color: #8a8f96; cursor: not-allowed; }
.ltfv-secondary { background: #fff; color: var(--ltfv-ink); border-color: var(--ltfv-line); }
.ltfv-secondary:hover { border-color: var(--ltfv-accent); }
.ltfv-accent { background: #1f2328; color: #fff; }
.ltfv-link { background: transparent; color: var(--ltfv-ink); text-decoration: underline; min-height: 44px; padding: 8px 10px; }
.ltfv-wide { width: 100%; margin-top: 14px; }
.ltfv-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.ltfv-wrap-row > * { flex: 1 1 200px; }

/* Tile surface chooser */
.ltfv-surfaces { border: 0; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ltfv-surfaces legend { grid-column: 1 / -1; padding: 0; margin-bottom: 8px; font-weight: 600; }
.ltfv-surface { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 8px; border: 2px solid var(--ltfv-line); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .95rem; line-height: 1.25; background: #fff; }
.ltfv-surface input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ltfv-surface:has(input:checked) { border-color: var(--ltfv-accent-dark); background: #fff5e8; box-shadow: 0 0 0 1px var(--ltfv-accent-dark); }
.ltfv-surface:has(input:focus-visible) { outline: 3px solid #1a5fd0; outline-offset: 2px; }
@media (max-width: 319px) { .ltfv-surfaces { grid-template-columns: 1fr; } }
.ltfv-surface { padding: 8px 4px; }

/* Tips */
.ltfv-tips { background: var(--ltfv-soft); border-radius: 12px; padding: 14px 16px; }
.ltfv-tips h3 { margin: 0 0 6px; font-size: .95rem; }
.ltfv-tips ul { margin: 0; padding-left: 20px; color: var(--ltfv-muted); font-size: .94rem; }

/* Camera + preview */
.ltfv-camera { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; margin-top: 12px; }
.ltfv-camera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ltfv-cam-msg { position: absolute; inset: auto 0 0 0; margin: 0; padding: 8px 12px; color: #fff; background: rgba(0, 0, 0, .5); font-size: .9rem; }
.ltfv-cam-msg:empty { display: none; }
.ltfv-preview { display: block; width: 100%; max-height: 46vh; object-fit: contain; background: var(--ltfv-soft); border-radius: 12px; margin: 12px 0 4px; }
.ltfv-consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px; background: var(--ltfv-soft); border-radius: 12px; font-size: .92rem; cursor: pointer; }
.ltfv-consent input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--ltfv-accent-dark); }
.ltfv-consent a { color: inherit; }

/* Progress */
.ltfv-spinner { width: 44px; height: 44px; margin: 22px auto 14px; border: 4px solid var(--ltfv-line); border-top-color: var(--ltfv-accent); border-radius: 50%; animation: ltfv-spin 0.9s linear infinite; }
.ltfv-bar { height: 8px; background: var(--ltfv-line); border-radius: 99px; overflow: hidden; margin: 8px 0 14px; }
.ltfv-bar-fill { display: block; height: 100%; width: 2%; background: var(--ltfv-accent); transition: width .4s ease; }
.ltfv-step { margin: 0; text-align: center; font-weight: 600; }
.ltfv-progress-note { text-align: center; }
@keyframes ltfv-spin { to { transform: rotate(360deg); } }

/* Before / after */
.ltfv-compare { position: relative; margin-top: 12px; border-radius: 12px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; background: var(--ltfv-soft); }
.ltfv-compare img { display: block; width: 100%; height: auto; pointer-events: none; }
.ltfv-compare .ltfv-before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ltfv-line { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); pointer-events: none; }
.ltfv-line::after { content: "\2194"; position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #111; font-size: 20px; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.ltfv-tag { position: absolute; top: 10px; padding: 3px 10px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .78rem; font-weight: 600; }
.ltfv-tag-l { left: 10px; } .ltfv-tag-r { right: 10px; }
.ltfv-range { width: 100%; margin: 10px 0 0; accent-color: var(--ltfv-accent-dark); height: 32px; }
.ltfv-disclaimer { font-style: italic; }
.ltfv-error { padding: 12px 14px; border-left: 4px solid var(--ltfv-danger); background: #fdf1f0; color: #5f1410; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
	.ltfv-spinner { animation-duration: 3s; }
	.ltfv-open, .ltfv-bar-fill { transition: none; }
}
