/* Calculadora de Câmbio — todas as classes usam o prefixo .ccx- para não conflitar com o tema. */
.ccx-calc {
	--ccx-primary: #0a6c4a;
	--ccx-text: #1d2327;
	--ccx-bg: #ffffff;
	--ccx-soft: #e8f5ee;
	box-sizing: border-box;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	color: var(--ccx-text);
	font-family: inherit;
	line-height: 1.4;
}
.ccx-calc *,
.ccx-calc *::before,
.ccx-calc *::after {
	box-sizing: border-box;
}
.ccx-card {
	padding: 16px;
	background: var(--ccx-bg);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 16px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}
.ccx-field {
	margin: 0 0 16px;
}
.ccx-calc .ccx-label {
	display: block;
	margin: 0 0 8px;
	color: var(--ccx-text);
	font-size: 14px;
	font-weight: 700;
}

/* Campo único: valor + bandeira + moeda dentro da mesma caixa. */
.ccx-calc .ccx-row {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 64px;
	padding: 0 14px 0 16px;
	background: var(--ccx-bg);
	border: 2px solid var(--ccx-primary);
	border-radius: 14px;
	transition: box-shadow 0.15s ease;
}
.ccx-calc .ccx-row:focus-within {
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.ccx-calc .ccx-row-readonly {
	background: var(--ccx-bg);
}
.ccx-calc .ccx-input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: 60px;
	margin: 0;
	padding: 0;
	color: var(--ccx-text);
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	outline: 0;
	font: inherit;
	font-size: 22px;
	font-weight: 600;
}
.ccx-calc .ccx-input:focus {
	outline: 0;
	box-shadow: none;
}
.ccx-calc .ccx-input-readonly {
	cursor: default;
}

.ccx-selwrap {
	position: relative;
	flex: 0 0 auto;
	width: calc(var(--ccx-flag, 34px) + 84px);
	height: 60px;
}
/* Bandeira redonda (span com background: não depende de lazy-load de <img>). */
.ccx-calc .ccx-flag {
	position: absolute;
	top: 50%;
	left: 0;
	display: block;
	width: var(--ccx-flag, 34px);
	height: calc(var(--ccx-flag, 34px) * 0.76);
	transform: translateY(-50%);
	background-color: #e5e5e5;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	border-radius: 6px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
	pointer-events: none;
}
.ccx-flag-square .ccx-flag {
	border-radius: 0;
}
.ccx-flag-rounded .ccx-flag {
	border-radius: 8px;
}
.ccx-flag-circle .ccx-flag {
	height: var(--ccx-flag, 34px);
	border-radius: 50%;
}
.ccx-calc .ccx-select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 60px !important;
	margin: 0;
	padding: 0 24px 0 calc(var(--ccx-flag, 34px) + 10px) !important;
	min-height: 0 !important;
	line-height: normal !important;
	text-overflow: clip;
	color: var(--ccx-text);
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23777' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center !important;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	outline: 0;
	font: inherit;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
}
.ccx-calc .ccx-select:focus {
	outline: 0;
	box-shadow: none;
}

.ccx-total {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 4px;
	padding: 14px 16px;
	background: var(--ccx-soft);
	border-radius: 12px;
}
.ccx-total-label {
	font-size: 13px;
	font-weight: 600;
	opacity: 0.75;
}
.ccx-total-value {
	color: var(--ccx-primary);
	font-size: 26px;
	font-weight: 700;
	word-break: break-word;
}
.ccx-calc .ccx-rate {
	margin: 12px 0 2px;
	font-size: 15px;
	font-weight: 600;
}
.ccx-calc .ccx-updated {
	margin: 0;
	font-size: 12px;
	opacity: 0.7;
}
.ccx-calc .ccx-stale {
	margin: 8px 0 0;
	padding: 8px 10px;
	color: #7a4b00;
	background: #fff4e0;
	border-radius: 8px;
	font-size: 12px;
}
.ccx-calc .ccx-stale[hidden] {
	display: none;
}
.ccx-grafico {
	margin-top: 16px;
	overflow: hidden;
	border-radius: 12px;
}
.ccx-erro {
	padding: 14px;
	background: #fff4e0;
	border-radius: 10px;
}
@media (min-width: 600px) {
	.ccx-card {
		padding: 24px;
	}
	.ccx-total-value {
		font-size: 30px;
	}
}

/* Menu de moedas com bandeiras (ativado pelo JS; sem JS continua o <select> nativo). */
.ccx-js .ccx-select {
	display: none !important;
}
.ccx-calc .ccx-trigger {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 60px !important;
	min-height: 0 !important;
	margin: 0;
	padding: 0 24px 0 calc(var(--ccx-flag, 34px) + 10px) !important;
	color: var(--ccx-text) !important;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23777' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: 0;
	font: inherit;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 60px !important;
	letter-spacing: normal !important;
	text-align: left;
	text-transform: none !important;
	white-space: nowrap !important;
	overflow: hidden;
	cursor: pointer;
}
.ccx-calc .ccx-trigger:focus-visible {
	outline: 2px solid var(--ccx-text);
	outline-offset: -2px;
}
.ccx-calc .ccx-list {
	position: absolute;
	top: calc(100% + 8px);
	right: -12px;
	z-index: 9999;
	min-width: 230px;
	max-height: 320px;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	list-style: none;
	color: var(--ccx-text);
	background: var(--ccx-bg);
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.ccx-calc .ccx-list[hidden] {
	display: none;
}
.ccx-calc .ccx-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 15px;
	line-height: 1.2;
	list-style: none;
}
.ccx-calc .ccx-list li:hover,
.ccx-calc .ccx-list li:focus {
	background: rgba(0, 0, 0, 0.07);
	outline: 0;
}
.ccx-calc .ccx-list li.ccx-selected {
	background: rgba(0, 0, 0, 0.1);
}
.ccx-calc .ccx-list li strong {
	font-weight: 700;
}
.ccx-calc .ccx-list li small {
	margin-left: auto;
	font-size: 12px;
	opacity: 0.65;
}
.ccx-calc .ccx-opt-flag {
	flex: 0 0 auto;
	display: block;
	width: 30px;
	height: 23px;
	background-color: #e5e5e5;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	border-radius: 0;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.ccx-flag-rounded .ccx-opt-flag {
	border-radius: 6px;
}
.ccx-flag-circle .ccx-opt-flag {
	height: 30px;
	border-radius: 50%;
}
