/**
 * Homepage crypto buy/sell calculator.
 */

.cryptomag-calc {
	border-radius: 1.5rem;
	background: #fff;
	padding: 1rem;
	box-shadow: 0 24px 80px rgba(17, 18, 20, 0.1);
}

.cryptomag-calc__tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.35rem;
	padding: 0.35rem;
	border-radius: 9999px;
	background: #eceef2;
}

.cryptomag-calc__tab {
	border: 0;
	border-radius: 9999px;
	background: transparent;
	padding: 0.7rem 1rem;
	font-size: 1rem;
	font-weight: 800;
	color: rgba(17, 18, 20, 0.45);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cryptomag-calc__tab.is-active {
	background: #fff;
	color: #111214;
	box-shadow: 0 4px 14px rgba(17, 18, 20, 0.08);
}

.cryptomag-calc__fields {
	display: grid;
	gap: 0.85rem;
	margin-top: 1rem;
}

.cryptomag-calc__field {
	display: grid;
	gap: 0.35rem;
}

.cryptomag-calc__label {
	font-size: 0.82rem;
	font-weight: 700;
	color: rgba(17, 18, 20, 0.45);
}

.cryptomag-calc__input-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	border: 1px solid rgba(17, 18, 20, 0.08);
	border-radius: 1rem;
	background: #f7f8fa;
	padding: 0.85rem 1rem;
}

.cryptomag-calc__input {
	width: 100%;
	min-width: 0;
	border: 0;
	background: transparent;
	font-size: 1.35rem;
	font-weight: 800;
	color: #111214;
	outline: none;
	font-variant-numeric: tabular-nums;
}

.cryptomag-calc__input--readonly {
	color: #111214;
}

.cryptomag-calc__currency {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	flex-shrink: 0;
	font-size: 0.95rem;
	font-weight: 800;
	color: #111214;
}

.cryptomag-calc__currency-badge {
	display: inline-grid;
	place-items: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 9999px;
	font-size: 0.72rem;
	font-weight: 900;
}

.cryptomag-calc__currency-badge--fiat,
.cryptomag-calc__currency-badge--zar {
	background: #138085;
	color: #fff;
}

.cryptomag-calc__currency--select {
	position: relative;
}

.cryptomag-calc__currency-option {
	display: none;
	align-items: center;
	gap: 0.45rem;
}

.cryptomag-calc__currency-option.is-visible {
	display: inline-flex;
}

.cryptomag-calc__coin-icon {
	border-radius: 9999px;
}

.cryptomag-calc__coin-select {
	appearance: none;
	border: 0;
	background: transparent;
	padding-right: 1rem;
	font-size: 0.95rem;
	font-weight: 800;
	color: #111214;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right center;
}

.cryptomag-calc__rate {
	margin: 0.85rem 0 0;
	font-size: 0.82rem;
	font-weight: 600;
	color: rgba(17, 18, 20, 0.45);
}

.cryptomag-calc__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 1rem;
	border-radius: 9999px;
	background: #138085;
	color: #ffffff;
	padding: 0.95rem 1rem;
	font-size: 1rem;
	font-weight: 800;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.cryptomag-calc__cta:hover {
	transform: translateY(-1px);
	background: #0f6b6f;
	box-shadow: 0 10px 24px rgba(19, 128, 133, 0.28);
}

.cryptomag-calc__powered-by {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	margin: 0.85rem 0 0;
}

.cryptomag-calc__powered-by-label {
	font-size: 0.82rem;
	font-weight: 700;
	color: rgba(17, 18, 20, 0.55);
}

.cryptomag-calc__powered-by-logo {
	display: block;
	height: 1.125rem;
	width: auto;
}

.cryptomag-calc__powered-by-link {
	display: inline-flex;
	line-height: 0;
}

@media (prefers-color-scheme: dark) {
	.cryptomag-calc {
		background: #fff !important;
		color: #111214 !important;
	}

	.cryptomag-calc__tab.is-active,
	.cryptomag-calc__input-row {
		background: #f7f8fa !important;
	}

	.cryptomag-calc__tabs {
		background: #eceef2 !important;
	}

	.cryptomag-calc__input,
	.cryptomag-calc__coin-select,
	.cryptomag-calc__currency {
		color: #111214 !important;
	}
}
