/**
 * Footer currency converter — v2 (figma node 82:2699).
 *
 * Kept in its own file so site-design.css stays free for the parallel homepage
 * work. Every rule is scoped under .av-curs.
 */

.av-curs {
	color: #fff;
	display: grid;
	gap: 14px;
	max-width: 300px;
}

.av-curs__head {
	align-items: center;
	display: flex;
	gap: 6px;
	justify-content: space-between;
}

.av-curs__title {
	align-items: center;
	color: var(--av-lime, #c4e325);
	display: flex;
	font-size: 15px;
	font-weight: 800;
	gap: 5px;
	letter-spacing: 0.06em;
	margin: 0;
	text-transform: uppercase;
}

.av-curs__info {
	align-items: center;
	/* Frame 82:2699: a light disc with a dark "i", not a dark disc. */
	background: #e8eeea;
	border-radius: 50%;
	color: #0b3b28;
	display: inline-flex;
	flex: 0 0 13px;
	font-size: 9px;
	font-style: normal;
	font-weight: 700;
	height: 13px;
	justify-content: center;
	line-height: 1;
	width: 13px;
}

.av-curs__date {
	color: rgba(255, 255, 255, 0.72);
	font-size: 13px;
}

/* Currency pill ------------------------------------------------------------ */
.av-curs__currencies {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 12px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	overflow: hidden;
	padding: 3px;
}

.av-curs__currency {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 9px;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	min-height: 40px;
	transition: background-color 140ms ease, color 140ms ease;
}

.av-curs__currency[aria-pressed="true"] {
	background: var(--av-lime, #c4e325);
	color: #12261c;
}

/* Rate chips --------------------------------------------------------------- */
.av-curs__prompt {
	color: rgba(255, 255, 255, 0.72);
	font-size: 14px;
	margin: 0;
}

.av-curs__rates {
	display: grid;
	gap: 9px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.av-curs__rate {
	appearance: none;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 10px;
	color: #fff;
	cursor: pointer;
	display: grid;
	font-family: inherit;
	gap: 4px;
	min-height: 44px;
	padding: 7px 6px;
	text-align: center;
	transition: background-color 140ms ease, border-color 140ms ease;
}

.av-curs__rate span {
	color: rgba(255, 255, 255, 0.7);
	font-size: 11px;
	line-height: 1.1;
}

.av-curs__rate b {
	font-size: 15px;
	font-weight: 800;
	line-height: 1.1;
}

.av-curs__rate[aria-pressed="true"] {
	background: rgba(0, 0, 0, 0.18);
	border-color: var(--av-lime, #c4e325);
}

.av-curs__rate[aria-pressed="true"] span {
	color: var(--av-lime, #c4e325);
}

.av-curs__rate[aria-pressed="true"] b {
	color: var(--av-lime, #c4e325);
}

/* Converter --------------------------------------------------------------- */
.av-curs__calc {
	align-items: center;
	background: #f4f7f4;
	border-radius: 999px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	min-height: 56px;
	overflow: hidden;
	position: relative;
}

.av-curs__field {
	align-items: center;
	display: flex;
	gap: 4px;
	justify-content: center;
	padding: 0 14px 0 18px;
}

.av-curs__amount {
	appearance: none;
	background: transparent;
	border: 0;
	color: #12261c;
	font-family: inherit;
	font-size: 19px;
	font-weight: 800;
	max-width: 92px;
	min-width: 42px;
	padding: 0;
	text-align: right;
}

.av-curs__amount:focus-visible {
	outline: 2px solid var(--av-green, #035d3c);
	outline-offset: 2px;
}

.av-curs__unit {
	color: #12261c;
	font-size: 19px;
	font-weight: 800;
}

.av-curs__result {
	align-items: center;
	align-self: stretch;
	background: var(--av-lime, #c4e325);
	/* The frame shows the lime half as its own rounded pill overlapping the
	   white one, not a square-cornered block butted against it. */
	border-radius: 999px;
	margin-left: -20px;
	color: #12261c;
	display: flex;
	font-size: 19px;
	font-weight: 800;
	justify-content: center;
	padding: 0 20px 0 30px;
}

.av-curs__swap {
	align-items: center;
	appearance: none;
	background: #fff;
	border: 0;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	color: var(--av-lime, #9fbf1e);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 34px;
	height: 34px;
	justify-content: center;
	margin: 0 -8px;
	position: relative;
	width: 34px;
	z-index: 2;
}

.av-curs__swap svg {
	height: 15px;
	width: 15px;
}

/* Collapsed until a currency is chosen ------------------------------------ */
.av-curs[data-state="idle"] .av-curs__prompt,
.av-curs[data-state="idle"] .av-curs__rates,
.av-curs[data-state="idle"] .av-curs__calc {
	display: none;
}

/* Info tooltip ------------------------------------------------------------- */
.av-curs__hint {
	display: inline-flex;
	position: relative;
}

.av-curs__info {
	appearance: none;
	border: 0;
	cursor: help;
	padding: 0;
}

.av-curs__tip {
	background: #bed2c6;
	border-radius: 8px;
	bottom: calc(100% + 10px);
	color: #0b3b28;
	font-size: 11.5px;
	font-weight: 500;
	left: auto;
	letter-spacing: 0;
	line-height: 1.42;
	opacity: 0;
	padding: 8px 12px;
	pointer-events: none;
	position: absolute;
	right: -6px;
	text-align: center;
	text-transform: none;
	transform: translateY(4px);
	transition: opacity 140ms ease, transform 140ms ease;
	width: 196px;
	z-index: 5;
}

.av-curs__hint:hover .av-curs__tip,
.av-curs__info:focus-visible + .av-curs__tip {
	opacity: 1;
	transform: translateY(0);
}

/* Fit long amounts ---------------------------------------------------------
   The converter must keep one line whatever the visitor types, so both halves
   shrink with the column instead of wrapping or pushing the pill wider. */
.av-curs__field,
.av-curs__result {
	min-width: 0;
}

.av-curs__amount,
.av-curs__unit,
.av-curs__result {
	font-size: clamp(13px, 1.05vw, 19px);
	white-space: nowrap;
}

.av-curs__amount {
	max-width: 100%;
	min-width: 0;
	text-overflow: ellipsis;
	width: 100%;
}

.av-curs__field {
	padding: 0 14px 0 14px;
}

.av-curs__result {
	overflow: hidden;
	padding: 0 14px 0 26px;
	text-overflow: ellipsis;
}

/* Soft focus ring instead of the heavy default box. */
.av-curs__amount:focus-visible {
	border-radius: 6px;
	outline: 2px solid rgba(3, 93, 60, 0.45);
	outline-offset: 1px;
}

/* Narrow footers: let the widget use the full column. */
@media (max-width: 1199px) {
	.av-curs {
		max-width: 340px;
	}
}

@media (max-width: 782px) {
	.av-curs {
		gap: 16px;
		max-width: none;
		width: 100%;
	}

	.av-curs__head {
		align-items: center;
		flex-wrap: wrap;
		gap: 12px;
	}

	.av-curs__title {
		min-width: 0;
		font-size: 14px;
		gap: 7px;
	}

	.av-curs__date {
		font-size: 12px;
		padding-top: 3px;
	}

	.av-curs__currencies {
		border-radius: 18px;
		padding: 5px;
	}

	.av-curs__currency {
		border-radius: 14px;
		font-size: 18px;
		min-height: 54px;
	}

	.av-curs__prompt {
		font-size: 16px;
		line-height: 1.4;
	}

	.av-curs__rates {
		gap: 8px;
	}

	.av-curs__rate {
		border-radius: 14px;
		min-height: 68px;
		padding: 9px 6px;
	}

	.av-curs__rate span {
		font-size: 11px;
	}

	.av-curs__rate b {
		font-size: clamp(1rem, 5vw, 1.125rem);
	}

	.av-curs__calc {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
		min-height: 76px;
	}

	.av-curs__field {
		padding: 0 12px 0 16px;
	}

	.av-curs__amount,
	.av-curs__unit,
	.av-curs__result {
		font-size: clamp(15px, 4.8vw, 19px);
	}

	.av-curs__result {
		padding: 0 16px 0 24px;
	}

	.av-curs__swap {
		flex: 0 0 44px;
		height: 44px;
		margin: 0 -9px;
		width: 44px;
	}

	.av-curs__swap svg {
		height: 16px;
		width: 16px;
	}
}

@media (max-width: 479px) {
	.av-curs {
		gap: 14px;
	}

	.av-curs__head {
		align-items: flex-start;
		gap: 10px;
	}

	.av-curs__title {
		font-size: 13px;
		line-height: 1.3;
		max-width: calc(100% - 92px);
	}

	.av-curs__date {
		font-size: 11px;
		padding-top: 2px;
	}

	.av-curs__currencies {
		border-radius: 16px;
		padding: 4px;
	}

	.av-curs__currency {
		border-radius: 12px;
		font-size: 16px;
		min-height: 50px;
	}

	.av-curs__prompt {
		font-size: 15px;
	}

	.av-curs__rate {
		border-radius: 12px;
		min-height: 64px;
		padding: 8px 6px;
	}

	.av-curs__rate b {
		font-size: 17px;
	}

	.av-curs__calc {
		min-height: 72px;
	}

	.av-curs__field {
		padding: 0 10px 0 14px;
	}

	.av-curs__amount,
	.av-curs__unit,
	.av-curs__result {
		font-size: clamp(14px, 5.2vw, 18px);
	}

	.av-curs__result {
		padding: 0 14px 0 22px;
	}

	.av-curs__swap {
		flex-basis: 42px;
		height: 42px;
		width: 42px;
	}
}
