/* Bilbordia Street View mockup overlay (POC). */

.bim-sv-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #1a1a1e;
}

.bim-sv-pano {
	position: absolute;
	inset: 0;
}

/* Warped creative — geometry comes entirely from the matrix3d transform. */
.bim-sv-overlay {
	position: absolute;
	left: 0;
	top: 0;
	transform-origin: 0 0;
	pointer-events: none;
	will-change: transform;
	backface-visibility: hidden;
	z-index: 5;
	display: none;
}

.bim-sv-overlay img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* No creative yet: translucent magenta test quad. */
.bim-sv-overlay--test {
	background: rgba(255, 0, 255, 0.45);
	outline: 2px dashed #ff00ff;
}

/* Active face outline (capture mode). */
.bim-sv-overlay--active {
	outline: 2px solid #ff2fd6;
	outline-offset: -2px;
}

/* Face list panel in the toolbar. */
.bim-sv-faces {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 180px;
	overflow-y: auto;
	padding: 4px 0;
}

.bim-sv-face-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 4px 6px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.06);
	cursor: pointer;
}

.bim-sv-face-row--active {
	background: rgba(233, 30, 140, 0.35);
	box-shadow: inset 0 0 0 1px #e91e8c;
}

.bim-sv-face-top {
	display: flex;
	align-items: center;
	gap: 6px;
}

.bim-sv-face-label {
	flex: 0 0 auto;
	font-size: 12px;
	white-space: nowrap;
}

.bim-sv-face-res {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 150px;
	background: #26262e;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 4px;
	font-size: 12px;
	padding: 2px 4px;
}

/* The native dropdown list renders on a light popup on Windows — explicit
   option colors prevent white-on-white invisibility. */
.bim-sv-face-res option {
	color: #111;
	background: #fff;
}

.bim-sv-face-del {
	flex: 0 0 auto;
	padding: 2px 8px;
	font-size: 11px;
}

/* Physical crop size (cm) — takes priority over the click-estimated aspect. */
.bim-sv-face-dims {
	display: flex;
	align-items: center;
	gap: 4px;
	padding-left: 2px;
}

.bim-sv-face-dim {
	width: 48px;
	background: #26262e;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 4px;
	font-size: 11px;
	padding: 2px 4px;
}

.bim-sv-face-dim-sep,
.bim-sv-face-dim-unit {
	font-size: 11px;
	opacity: 0.7;
}

/* Viewer chip shown on unmapped panos: jump back to the mapped view. */
.bim-sv-return {
	position: absolute;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%);
	z-index: 7;
	appearance: none;
	border: none;
	border-radius: 999px;
	background: rgba(18, 18, 24, 0.88);
	color: #fff;
	font: 13px/1 system-ui, -apple-system, sans-serif;
	padding: 10px 16px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.bim-sv-return:hover {
	background: rgba(40, 40, 50, 0.95);
}

/* Runtime featured-image fallback (no SV coverage). */
.bim-sv-fallback-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 8;
}

/* Draw mode: crosshair cursor + live captured-corner dots. */
.bim-sv-drawing,
.bim-sv-drawing .bim-sv-pano {
	cursor: crosshair;
}

.bim-sv-dot {
	position: absolute;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border-radius: 50%;
	background: rgba(255, 47, 214, 0.85);
	border: 2px solid #fff;
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
	z-index: 6;
	pointer-events: auto;
	cursor: grab;
	touch-action: none;
}

.bim-sv-dragging .bim-sv-dot {
	cursor: grabbing;
}

/* Capture crosshair at pano center (legacy aiming mode, unused). */
.bim-sv-crosshair {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
	z-index: 6;
	pointer-events: none;
}

.bim-sv-crosshair::before,
.bim-sv-crosshair::after {
	content: "";
	position: absolute;
	background: #ff2fd6;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.bim-sv-crosshair::before {
	left: -14px;
	top: -1px;
	width: 28px;
	height: 2px;
}

.bim-sv-crosshair::after {
	left: -1px;
	top: -14px;
	width: 2px;
	height: 28px;
}

/* Capture / calibration toolbar (top-left; never near the bottom attribution). */
.bim-sv-toolbar {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 7;
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 280px;
	padding: 10px 12px;
	border-radius: 8px;
	background: rgba(18, 18, 24, 0.88);
	color: #fff;
	font: 13px/1.4 system-ui, -apple-system, sans-serif;
}

.bim-sv-row {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	align-items: center;
}

.bim-sv-btn {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font: inherit;
	padding: 5px 10px;
	cursor: pointer;
}

.bim-sv-btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.bim-sv-btn--primary {
	background: #e91e8c;
	border-color: #e91e8c;
}

.bim-sv-btn--primary:hover {
	background: #ff37a6;
}

.bim-sv-file {
	display: inline-block;
	text-align: center;
}

.bim-sv-file input[type="file"] {
	display: none;
}

.bim-sv-hint {
	font-size: 11px;
	opacity: 0.75;
}

.bim-sv-status {
	min-height: 1.2em;
	font-size: 12px;
	color: #ffd54f;
}

.bim-sv-calib {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-top: 6px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.bim-sv-readout {
	font-family: ui-monospace, Consolas, monospace;
	font-size: 11px;
	white-space: pre;
	opacity: 0.9;
}

.bim-sv-slider {
	width: 100%;
}

.bim-sv-axis {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 11px;
	cursor: pointer;
}

/* Message / error boxes. */
.bim-sv-msg,
.bim-sv-error {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 8;
	padding: 20px;
	text-align: center;
	color: #fff;
	background: rgba(18, 18, 24, 0.85);
	font: 14px/1.5 system-ui, -apple-system, sans-serif;
}

/* Standalone error (no wrapper rendered). */
div.bim-sv-error:only-child,
.bim-sv-error {
	position: relative;
	min-height: 120px;
	border-radius: 8px;
}

.bim-sv-msg {
	position: absolute;
}
