/* Enhetsomvandlare – neutral stil som ärver temats typsnitt.
   Justera färger via CSS-variablerna nedan i temat/Bricks om du vill. */
.eo {
	--eo-accent: #1f6feb;
	--eo-border: #d9dde3;
	--eo-bg: #ffffff;
	--eo-muted: #5b6573;
	--eo-soft: #f4f6f9;
	--eo-radius: 10px;
	border: 1px solid var(--eo-border);
	border-radius: var(--eo-radius);
	background: var(--eo-bg);
	padding: 1.25rem;
	margin: 1.5rem 0;
	max-width: 100%;
	box-sizing: border-box;
}
.eo *, .eo *::before, .eo *::after { box-sizing: border-box; }

.eo-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin-bottom: 1rem;
}
.eo-tab {
	appearance: none;
	border: 1px solid var(--eo-border);
	background: var(--eo-soft);
	color: inherit;
	font: inherit;
	font-size: .9rem;
	padding: .35rem .8rem;
	border-radius: 999px;
	cursor: pointer;
	line-height: 1.4;
}
.eo-tab:hover { border-color: var(--eo-accent); }
.eo-tab.is-active {
	background: var(--eo-accent);
	border-color: var(--eo-accent);
	color: #fff;
}

.eo-form {
	display: grid;
	grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr) auto minmax(0, 2fr);
	gap: .75rem;
	align-items: end;
}
.eo-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.eo-field label {
	font-size: .8rem;
	font-weight: 600;
	color: var(--eo-muted);
	text-transform: uppercase;
	letter-spacing: .03em;
}
.eo-input, .eo-select {
	width: 100%;
	font: inherit;
	font-size: 1rem;
	padding: .6rem .7rem;
	border: 1px solid var(--eo-border);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	min-height: 44px;
}
.eo-input:focus, .eo-select:focus {
	outline: 2px solid var(--eo-accent);
	outline-offset: 1px;
	border-color: var(--eo-accent);
}
.eo.is-invalid .eo-input { border-color: #d1242f; }

.eo-swap {
	appearance: none;
	border: 1px solid var(--eo-border);
	background: var(--eo-soft);
	color: inherit;
	font-size: 1.2rem;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	cursor: pointer;
}
.eo-swap:hover { border-color: var(--eo-accent); color: var(--eo-accent); }

.eo-result {
	margin-top: 1rem;
	padding: 1rem;
	background: var(--eo-soft);
	border-radius: 8px;
}
.eo-result-main {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .5rem;
	font-size: 1.15rem;
}
.eo-r-out { font-size: 1.6rem; color: var(--eo-accent); word-break: break-word; }
.eo-eq { color: var(--eo-muted); }
.eo-result-ref {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 1.5rem;
	margin-top: .5rem;
	font-size: .9rem;
	color: var(--eo-muted);
}

.eo-all { margin-top: 1rem; }
.eo-all summary {
	cursor: pointer;
	font-weight: 600;
	padding: .4rem 0;
}
.eo-table {
	width: 100%;
	border-collapse: collapse;
	margin: .5rem 0 0;
	font-size: .95rem;
}
.eo-table th, .eo-table td {
	text-align: left;
	padding: .5rem .6rem;
	border-bottom: 1px solid var(--eo-border);
	font-weight: normal;
}
.eo-table td { text-align: right; font-variant-numeric: tabular-nums; word-break: break-word; }
.eo-table tbody tr { cursor: pointer; }
.eo-table tbody tr:hover { background: var(--eo-soft); }
.eo-table tr.is-target { background: color-mix(in srgb, var(--eo-accent) 10%, transparent); }
.eo-table tr.is-target th { font-weight: 600; }
.eo-sym { color: var(--eo-muted); }

.eo-static tbody tr { cursor: default; }
.eo-static thead th { font-weight: 600; background: var(--eo-soft); }
.eo-static td { text-align: left; word-break: normal; overflow-wrap: normal; hyphens: auto; }
.eo-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
.eo-scroll .eo-table { margin: 0; }

@media (max-width: 640px) {
	.eo { padding: 1rem; }
	.eo-form { grid-template-columns: 1fr auto; }
	.eo-field--value { grid-column: 1 / -1; }
	.eo-form .eo-field:nth-of-type(2) { grid-column: 1 / 2; }
	.eo-swap { grid-column: 2 / 3; grid-row: 2 / 4; align-self: center; }
	.eo-form .eo-field:nth-of-type(3) { grid-column: 1 / 2; }
}
