/* ==========================================================================
   Liyo Unit Switcher – Public Styles
   Minimal, responsive, no external frameworks.
   ========================================================================== */

/* ── Container ─────────────────────────────────────────────────────────────── */

.liyo-unit-switcher {
	margin: 32px 0;
	font-family: inherit;
}

/* ── Toggle bar ────────────────────────────────────────────────────────────── */

.liyo-toggle-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.liyo-toggle-label {
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	color: #111 !important;
}

/* Pill toggle container */
.liyo-toggle {
	display: inline-flex;
	border-radius: 999px;
	overflow: hidden;
	border: 1.5px solid #bbb;
	background: #efefef;
	padding: 2px;
	gap: 2px;
}

/* Individual toggle button */
.liyo-toggle-btn {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 7px 22px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #555;      /* inactive: clearly readable */
	border-radius: 999px;
	transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
	line-height: 1;
	outline: none;
}

.liyo-toggle-btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.18);
}

/* Active state */
.liyo-toggle-btn.liyo-active {
	background: #111;
	color: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.liyo-toggle-btn:not(.liyo-active):hover {
	background: #e0e0e0;
	color: #111;
}

/* ── Section heading ───────────────────────────────────────────────────────── */

.liyo-specs-heading {
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	color: #111 !important;
	margin: 0 0 4px !important;
	padding-bottom: 12px !important;
	border-bottom: 1.5px solid #222 !important;
}

/* ── Table ─────────────────────────────────────────────────────────────────── */

.liyo-specs-block {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.liyo-specs-tbl {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.5;
}

.liyo-specs-tbl tr {
	border-bottom: 1px solid #e8e8e8;
	transition: background 0.15s;
}

.liyo-specs-tbl tr:last-child {
	border-bottom: none !important;
}

/* Override any theme dark hover with !important */
.liyo-specs-tbl tr:hover {
	background: #f3f3f3 !important;
}

.liyo-specs-tbl tr:hover td,
.liyo-specs-tbl tr:hover th {
	color: inherit !important;
	background: transparent !important;
}

.liyo-specs-tbl th,
.liyo-specs-tbl td {
	padding: 13px 14px;
	text-align: left;
	vertical-align: middle;
}

/* Label column */
.liyo-spec-label {
	color: #333 !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase !important;
	width: 44% !important;
	opacity: 1 !important;
}

/* Value column */
.liyo-unit-value {
	color: #111 !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	opacity: 1 !important;
	transition: opacity 0.18s ease;
}

/* Value swap animation */
.liyo-unit-value.liyo-fading {
	opacity: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media ( max-width: 600px ) {
	.liyo-toggle-btn {
		padding: 6px 16px;
		font-size: 11px;
	}

	.liyo-specs-tbl th,
	.liyo-specs-tbl td {
		padding: 10px 10px;
	}

	.liyo-spec-label {
		width: 46%;
		font-size: 11px;
	}

	.liyo-unit-value {
		font-size: 13px;
	}
}

/* ── Dark mode ─────────────────────────────────────────────────────────────── */

@media ( prefers-color-scheme: dark ) {
	.liyo-toggle-label {
		color: #e0e0e0;
	}

	.liyo-toggle {
		border-color: #444;
		background: #252525;
	}

	.liyo-toggle-btn {
		color: #bbb;
	}

	.liyo-toggle-btn.liyo-active {
		background: #f0f0f0;
		color: #111;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	}

	.liyo-toggle-btn:not(.liyo-active):hover {
		background: #333;
		color: #eee;
	}

	.liyo-specs-heading {
		color: #f0f0f0;
		border-color: #555;
	}

	.liyo-specs-tbl tr {
		border-color: #2e2e2e;
	}

	.liyo-specs-tbl tr:hover {
		background: #1e1e1e;
	}

	.liyo-spec-label {
		color: #ccc;
	}

	.liyo-unit-value {
		color: #f5f5f5;
	}
}
