/* ── Currencies block ── */

.curr-block {
	padding-block: clamp(50px, 6vw, 80px);
}

.curr-block__wrap {
	max-width: 1320px;
	margin-inline: auto;
	padding-inline: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ─── Top white card ─── */

.curr-block__card {
	background: #fff;
	border-radius: clamp(12px, 1.4vw, 18px);
	border: 1px solid rgba(25, 32, 35, 0.1);
}

.curr-block__card-inner {
	padding: clamp(40px, 5vw, 72px) clamp(24px, 4vw, 56px);
}

/* ── Header ── */

.curr-block__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--space-m, 16px);
	max-width: 680px;
	margin-inline: auto;
	margin-bottom: clamp(32px, 4vw, 52px);
}

.curr-block__title {
	margin: 0;
	font-family: var(--font-base, 'Figtree', sans-serif);
	font-size: clamp(30px, 4vw, 60px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: var(--color-black, #191919);
}

/* ─── Search ─── */

.curr-search-wrap {
	max-width: 520px;
	margin-inline: auto;
}

.curr-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid rgba(25, 32, 35, 0.18);
	border-radius: 8px;
	background: #fff;
	padding: 0 14px;
	transition: border-color 0.2s;
}

.curr-search:focus-within {
	border-color: rgba(25, 32, 35, 0.45);
}

.curr-search__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.curr-search__input {
	flex: 1;
	height: 48px;
	border: none;
	outline: none;
	background: transparent;
	font-size: 15px;
	font-weight: 400;
	color: var(--color-black, #191919);
	font-family: var(--font-base, 'Figtree', sans-serif);
}

.curr-search__input::placeholder {
	color: rgba(25, 32, 35, 0.35);
}

.curr-search__clear {
	flex-shrink: 0;
	display: none;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: none;
	background: rgba(25, 32, 35, 0.06);
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	color: rgba(25, 32, 35, 0.6);
	transition: background 0.15s;
}

.curr-search__clear.is-visible {
	display: flex;
}

@media (hover: hover) {
	.curr-search__clear:hover {
		background: rgba(25, 32, 35, 0.12);
	}
}

/* ─── Results container — height + overflow managed by JS ─── */

.curr-results {
	/* JS sets: height, overflow, transition */
}

.curr-results__inner {
	padding-bottom: clamp(20px, 3vw, 36px);
}

.curr-results__meta {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 0 16px;
	border-top: 1px solid rgba(25, 32, 35, 0.09);
	margin-top: 10px;
}

.curr-results__count {
	font-size: 13px;
	font-weight: 400;
	color: rgba(25, 32, 35, 0.4);
}

/* ─── Results list — flex-wrap, centered ─── */

.curr-results__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center; /* centers any number of cards incl. 1 */
	gap: 10px;
}

/* ─── Currency card — fixed 134 px width ─── */

.curr-card {
	display: none;           /* JS sets to flex when visible */
	flex: 0 0 134px;         /* fixed width, no stretch */
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	padding: 16px 10px 14px;
	border: 1px solid rgba(25, 32, 35, 0.1);
	border-radius: 10px;
	background: #fff;
	/* opacity / transform / filter — set inline by JS */
}

.curr-card__flag {
	width: 27px;
	height: 16px;
	border-radius: 2px;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
}

.curr-card__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
}

.curr-card__name {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: #192023;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.curr-card__code {
	margin: 0;
	font-size: 11px;
	font-weight: 400;
	color: rgba(25, 32, 35, 0.42);
	line-height: 1.3;
}

/* ─── Blue visual section ─── */

.curr-block__visual {
	position: relative;
	height: clamp(180px, 18vw, 260px);
	border-radius: clamp(12px, 1.4vw, 18px);
	background: #7AA2CC;
	overflow: hidden;
}

/* ── Chips (5 preset positions) ── */

.curr-chip {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid rgba(25, 32, 35, 0.1);
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #192023;
	white-space: nowrap;
	box-shadow: 0 2px 12px rgba(25, 32, 35, 0.07);
}

.curr-chip__flag {
	width: 27px;
	height: 16px;
	border-radius: 2px;
	object-fit: cover;
	display: block;
}

.curr-chip:nth-child(1) { top: 38%; left: 14%; }
.curr-chip:nth-child(2) { top: 64%; left: 22%; }
.curr-chip:nth-child(3) { top: 52%; left: 50%; transform: translateX(-50%); }
.curr-chip:nth-child(4) { top: 36%; right: 14%; }
.curr-chip:nth-child(5) { top: 65%; right: 20%; }

/* ─── Responsive ─── */

@media (max-width: 600px) {
	.curr-block__wrap { padding-inline: 12px; }
	.curr-chip:nth-child(3) { display: none; }
}
