/* CE Crypto Converter 1.0 — scoped to .cecc, same visual language as the mining calculator. */
.cecc {
	--ink: #1f2328; --ink-2: #575760; --ink-3: #8a8f98; --line: #e3e6ea; --soft: #f6f7f9;
	--bar: #444; --green: #4c9150; --green-ink: #2f6e33; --red: #b3261e; --r: 6px;
	font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--ink); font-size: 15px; line-height: 1.45; margin: 8px 0 28px; text-align: left;
	font-variant-numeric: tabular-nums;
}
.cecc *, .cecc *::before, .cecc *::after { box-sizing: border-box; }
.cecc [hidden] { display: none !important; }
.cecc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cecc-label { display: block; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }

/* Main box */
.cecc-box { position: relative; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.cecc-line { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; align-items: end; }
.cecc-amount { display: block; margin: 0; min-width: 0; }
.cecc .cecc-input {
	width: 100%; height: 56px; padding: 0 14px; margin: 0;
	border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink);
	font: 700 24px/1 Roboto, system-ui, sans-serif; font-variant-numeric: tabular-nums; box-shadow: none;
}
.cecc .cecc-input:focus { outline: 2px solid var(--green); outline-offset: -1px; border-color: var(--green); }
.cecc-result {
	display: flex; align-items: center; height: 56px; padding: 0 14px; border-radius: var(--r);
	background: #fff; border: 1px solid var(--line); font: 700 24px/1.1 Roboto, system-ui, sans-serif;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--green-ink);
}
.cecc .cecc-pick {
	width: 100%; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 12px; margin: 0;
	background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
	font: 400 14px/1.2 Roboto, system-ui, sans-serif; text-align: left; cursor: pointer; text-transform: none;
}
.cecc .cecc-pick:hover, .cecc .cecc-pick[aria-expanded="true"] { border-color: var(--green); background: #fff; color: var(--ink); }
.cecc-pick__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cecc-pick__txt strong { font-size: 16px; }
.cecc-pick__txt small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cecc-pick__chev { width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translate(-2px, -2px); flex: 0 0 auto; }
.cecc-pick__ico {
	flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
	display: grid; place-items: center; background: var(--bar); color: #fff; font: 700 10px/1 Roboto, sans-serif;
}
.cecc-pick__ico[data-fiat="1"] { background: var(--green); }
.cecc-pick__ico img { width: 28px; height: 28px; display: block; background: #fff; }

.cecc-mid { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.cecc .cecc-swap {
	flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; padding: 0; margin: 0;
	display: grid; place-items: center; background: var(--bar); color: #fff; border: 0; cursor: pointer;
}
.cecc .cecc-swap:hover { background: var(--green); color: #fff; }
.cecc-rate { font-size: 13px; color: var(--ink-2); white-space: pre-wrap; }

/* Popover */
.cecc-pop {
	position: absolute; right: 18px; z-index: 20; width: min(360px, calc(100% - 36px));
	background: #fff; border: 1px solid var(--line); border-radius: var(--r);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .14); padding: 8px;
}
.cecc .cecc-pop__search { height: 42px; font: 500 15px/1 Roboto, sans-serif; }
.cecc .cecc-pop__list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 320px; overflow-y: auto; }
.cecc .cecc-pop__list li {
	display: grid; grid-template-columns: 28px 56px minmax(0, 1fr) auto; gap: 10px; align-items: center;
	padding: 7px 8px; margin: 0; border-radius: 4px; cursor: pointer; font-size: 14px;
}
.cecc .cecc-pop__list li > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.cecc .cecc-pop__list li small { color: var(--ink-3); font-size: 10px; letter-spacing: .05em; }
.cecc .cecc-pop__list li.is-active { background: var(--soft); }
.cecc .cecc-pop__list li[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--green); }
.cecc .cecc-pop__empty { color: var(--ink-3); cursor: default; display: block !important; }

/* Facts */
.cecc-facts {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 14px 0 0;
	background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.cecc-facts > div { background: #fff; padding: 12px 14px; min-width: 0; }
.cecc-facts .cecc-label { font-size: 11px; color: var(--ink-3); margin-bottom: 2px; }
.cecc-facts strong { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.cecc [data-sign="pos"] { color: var(--green-ink); }
.cecc [data-sign="neg"] { color: var(--red); }

/* Sections */
.cecc-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; margin-top: 24px; }
.cecc-sec { min-width: 0; }
.cecc .cecc-h3 {
	font: 700 15px/1.2 Roboto, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .03em;
	color: #fff; background: var(--bar); border-bottom: 3px solid var(--green); padding: 9px 14px; margin: 0 0 10px;
}
.cecc-tables { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cecc .cecc-table { width: 100%; border-collapse: collapse; margin: 0; border: 0; font-size: 13.5px; }
.cecc .cecc-table th, .cecc .cecc-table td { border: 0; border-bottom: 1px solid var(--line); padding: 7px 4px; background: none; white-space: nowrap; }
.cecc .cecc-table th { text-align: left; font-weight: 500; color: var(--ink-2); }
.cecc .cecc-table td { text-align: right; font-weight: 500; overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 60%; }
.cecc .cecc-popular { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cecc .cecc-popular li { margin: 0; }
.cecc .cecc-popular a {
	display: block; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r);
	color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; background: #fff;
}
.cecc .cecc-popular a:hover { border-color: var(--green); color: var(--green-ink); }


.cecc-foot { margin: 14px 0 0; font-size: 12px; color: var(--ink-3); }
.cecc.is-error [data-cecc-status] { color: var(--red); font-weight: 500; }

@media (max-width: 820px) {
	.cecc-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
	.cecc-box { padding: 14px; }
	.cecc-line { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.cecc .cecc-input, .cecc-result { font-size: 20px; height: 52px; }
	.cecc-pop { left: 14px; right: 14px; width: auto; }
	.cecc-tables { grid-template-columns: minmax(0, 1fr); }
	.cecc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cecc-facts > div:last-child { grid-column: 1 / -1; }
}
