/* 1.5.0: equal-width grid so long lists read as a tidy set rather than a
   ragged, centred pile. Collapses to a single aligned list on phones. */
.cxctb-badges {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 12px;
	margin: 24px auto;
	padding: 0 20px;
	max-width: 1040px;
	box-sizing: border-box;
}

.cxctb-badge-link { display: block; }

.cxctb-badge {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	height: 100%;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 14px;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #1A1A2E;
	box-sizing: border-box;
}

.cxctb-badge-label {
	white-space: normal;
	word-break: break-word;
}

.cxctb-badge-icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
}
.cxctb-badge-icon.cxctb-flag { width: 26px; height: 18px; }

.cxctb-flag {
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.cxctb-accent-red .cxctb-badge-icon { color: #E63946; }
.cxctb-accent-purple .cxctb-badge-icon { color: #9B5DE5; }
.cxctb-accent-blue .cxctb-badge-icon { color: #195CA3; }
.cxctb-accent-teal .cxctb-badge-icon { color: #1E9E8C; }
.cxctb-accent-orange .cxctb-badge-icon { color: #F37626; }

/* Dark/transparent variant - for placing on a colour_scheme="primary"
   (navy) section or any dark background, e.g. [cxc_trust_badges theme="dark"] */
.cxctb-theme-dark .cxctb-badge {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
	backdrop-filter: blur(4px);
}

@media (max-width: 600px) {
	.cxctb-badges {
		grid-template-columns: 1fr;
		max-width: 440px;
		gap: 8px;
	}
	.cxctb-badge {
		font-size: 14px;
		padding: 11px 14px;
	}
}

/* 1.3.0: linked (verifiable) badges */
.cxctb-badge-link { text-decoration: none; color: inherit; }
.cxctb-badge-link .cxctb-badge { transition: border-color .15s, transform .15s; }
.cxctb-badge-link:hover .cxctb-badge, .cxctb-badge-link:focus .cxctb-badge { border-color: #1E9E8C; transform: translateY(-1px); }
.cxctb-theme-dark .cxctb-badge-link:hover .cxctb-badge { border-color: #fff; }

/* 1.5.0: linked badges show a small arrow so it's clear they can be verified */
.cxctb-badge-link .cxctb-badge-label { flex: 1; }
.cxctb-badge-link .cxctb-badge::after { content: "\2197"; font-size: 13px; opacity: 0.55; margin-left: auto; }
.cxctb-badge-label { flex: 1; }

/* 1.6.0: compact mode for narrow areas (footer, sidebar): small chips,
   two per row, so 11 badges take ~6 short rows instead of 11 tall ones. */
.cxctb-badges.cxctb-compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin: 12px 0;
	padding: 0;
	max-width: 100%;
}
.cxctb-compact .cxctb-badge {
	gap: 7px;
	padding: 6px 9px;
	border-radius: 9px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
}
.cxctb-compact .cxctb-badge-icon { width: 15px; height: 15px; }
.cxctb-compact .cxctb-badge-icon.cxctb-flag { width: 18px; height: 12px; }
.cxctb-compact .cxctb-badge::after { display: none; }
@media (max-width: 600px) {
	.cxctb-badges.cxctb-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; }
	.cxctb-compact .cxctb-badge { font-size: 12px; padding: 6px 8px; }
}
