/**
 * WorldCurrency Pulse — фронтенд (карточка, флаги 60×45, пара | треугольник | курс).
 */

.wcp {
	--wcp-blue: #0056b3;
	--wcp-green: #28a745;
	--wcp-red: #dc3545;
	--wcp-gray-border: #e0e0e0;
	--wcp-gray-footer: #f8f9fa;
	--wcp-text: #1a1a1a;
	font-family: Arial, Helvetica, "Segoe UI", sans-serif;
	box-sizing: border-box;
	max-width: 440px;
	width: 100%;
	margin: 1rem auto;
}

.wcp--error {
	background: #fff3cd;
	border: 1px solid #ffc107;
	color: #856404;
	padding: 12px 16px;
	border-radius: 4px;
	max-width: 440px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

.wcp__card {
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	border-radius: 2px;
	overflow: hidden;
	width: 100%;
	margin: 0 auto;
}

.wcp__header {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--wcp-blue);
	color: #fff;
	padding: 14px 16px;
}

.wcp__header-icon {
	font-size: 1.1rem;
	line-height: 1;
	filter: grayscale(0.2);
}

.wcp__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.wcp .wcp__list {
	list-style: none;
	margin: 0;
	padding: 0;
	padding-left: 0.2em;
}

/* Флаг | пара | треугольник | курс */
.wcp__row {
	display: grid;
	grid-template-columns: 60px 1fr auto minmax(4.5rem, auto);
	align-items: center;
	gap: 10px 12px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--wcp-gray-border);
	color: var(--wcp-text);
}

.wcp__row:last-child {
	border-bottom: none;
}

.wcp__flag {
	flex-shrink: 0;
	width: 45px;
	height: 30px;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
	object-fit: cover;
	vertical-align: middle;
}

.wcp__flag--img {
	display: block;
}

.wcp__flag--emoji {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 45px;
	font-size: 2rem;
	line-height: 1;
	background: #f1f3f5;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.wcp__pair {
	font-weight: 700;
	font-size: 1rem;
	min-width: 0;
}

.wcp__trend {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

.wcp__tri-svg {
	display: block;
	flex-shrink: 0;
	overflow: visible;
}

.wcp__tri-svg--flat {
	opacity: 0.95;
}

.wcp__rate {
	font-weight: 700;
	font-size: 1rem;
	color: var(--wcp-text);
	text-align: right;
	justify-self: end;
	font-variant-numeric: tabular-nums;
}

.wcp__notice {
	margin: 0;
	padding: 10px 16px;
	font-size: 0.8rem;
	color: #856404;
	background: #fff8e5;
}

.wcp__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	background: var(--wcp-gray-footer);
	padding: 12px 16px;
	font-size: 0.78rem;
	color: #6c757d;
}

.wcp__footer-main {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wcp__footer-note {
	flex: 1 0 100%;
	margin: 4px 0 0;
	padding: 0;
	font-size: 0.72rem;
	line-height: 1.4;
	color: #868e96;
}

.wcp__footer-icon {
	font-size: 1rem;
}

.wcp__converter {
	margin-top: 16px;
	padding: 18px 16px 20px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	border-radius: 2px;
	border: 1px solid var(--wcp-gray-border);
	width: 100%;
	box-sizing: border-box;
}

.wcp__converter-title {
	margin: 0 0 14px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--wcp-text);
}

.wcp__converter-row {
	margin-bottom: 12px;
}

.wcp__converter-row--split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 480px) {
	.wcp__row {
		grid-template-columns: 52px 1fr auto minmax(4rem, auto);
		gap: 8px;
	}

	.wcp__flag {
		width: 52px;
		height: 39px;
	}

	.wcp__converter-row--split {
		grid-template-columns: 1fr;
	}
}

.wcp__label {
	display: block;
	font-size: 0.8rem;
	color: #555;
	margin-bottom: 6px;
}

.wcp__input,
.wcp__select {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 1rem;
	border: 1px solid var(--wcp-gray-border);
	border-radius: 4px;
	background: #fff;
	color: var(--wcp-text);
}

.wcp__input:focus,
.wcp__select:focus {
	outline: 2px solid rgba(0, 86, 179, 0.35);
	outline-offset: 0;
	border-color: var(--wcp-blue);
}

.wcp__result {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
	padding: 12px 14px;
	background: var(--wcp-gray-footer);
	border-radius: 4px;
	border: 1px solid var(--wcp-gray-border);
}

.wcp__result-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6c757d;
}

.wcp__result-value {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--wcp-blue);
	word-break: break-all;
}
