/**
 * Tyria Machine View for WooCommerce — front-end toggle + overlay.
 * Neutral, theme-agnostic styling scoped under .woomv-*. Respects color scheme.
 */

.woomv-toggle {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
}

.woomv-btn {
	appearance: none;
	border: 0;
	margin: 0;
	cursor: pointer;
	padding: 7px 14px;
	border-radius: 999px;
	background: transparent;
	color: rgba(255, 255, 255, 0.72);
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: background-color .15s ease, color .15s ease;
}

.woomv-btn:hover {
	color: #fff;
}

.woomv-btn.is-active {
	background: #fff;
	color: #111827;
}

.woomv-btn:focus-visible {
	outline: 2px solid #6ea8fe;
	outline-offset: 2px;
}

.woomv-overlay {
	position: fixed;
	inset: 0;
	z-index: 99991;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(2, 6, 23, 0.62);
	backdrop-filter: blur(2px);
}

.woomv-overlay[hidden] {
	display: none;
}

.woomv-panel {
	width: 100%;
	max-width: 820px;
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	color: #0f172a;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.woomv-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	background: #f8fafc;
}

.woomv-bar__title {
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-right: auto;
}

.woomv-bar a,
.woomv-bar button {
	font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	color: #334155;
	text-decoration: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	line-height: 1;
}

.woomv-bar a:hover,
.woomv-bar button:hover {
	border-color: rgba(0, 0, 0, 0.3);
}

.woomv-bar__close {
	padding: 6px 9px !important;
}

.woomv-content {
	margin: 0;
	padding: 16px 18px;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
	font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
	font-size: 12.5px;
	line-height: 1.55;
	color: #1e293b;
	tab-size: 2;
}

@media (max-width: 600px) {
	.woomv-toggle { right: 10px; bottom: 10px; font-size: 12px; }
	.woomv-btn { padding: 6px 11px; }
	.woomv-overlay { padding: 10px; }
}

@media (prefers-color-scheme: dark) {
	.woomv-panel { background: #0b1220; color: #e2e8f0; }
	.woomv-bar { background: #111a2e; border-bottom-color: rgba(255, 255, 255, 0.1); }
	.woomv-bar__title { color: #cbd5e1; }
	.woomv-bar a, .woomv-bar button { background: #1e293b; color: #e2e8f0; border-color: rgba(255, 255, 255, 0.16); }
	.woomv-content { color: #cbd5e1; }
}

@media (prefers-reduced-motion: reduce) {
	.woomv-btn { transition: none; }
}
