/**
 * DFL Trust Badges — rounded strip of icon + copy columns.
 *
 * The divider belongs to the left edge of every column except the one that
 * opens a row, so the hide rules are written per column count and per
 * breakpoint. The widget prints the matching count classes.
 *
 * Nothing here uses !important, so panel settings always win.
 */

.dfl-trust {
	--dfl-trust-card-max: 1440px;
	--dfl-trust-cols: 3;
	--dfl-trust-col-gap: 0px;
	--dfl-trust-row-gap: 32px;
	--dfl-trust-item-just: center;
	--dfl-trust-text-align: start;
	--dfl-trust-text-items: start;
	--dfl-trust-icon-size: 42px;
	--dfl-trust-icon-box: auto;
	--dfl-trust-icon-gap: 20px;
	--dfl-trust-divider-color: #dccdb0;
	--dfl-trust-divider-w: 1px;
	--dfl-trust-divider-h: 72px;

	width: 100%;
	padding: 0 20px;
}

.dfl-trust *,
.dfl-trust *::before,
.dfl-trust *::after {
	box-sizing: border-box;
}

/* ---------------------------------- Card --------------------------------- */

.dfl-trust__card {
	width: 100%;
	max-width: var(--dfl-trust-card-max, 1440px);
	margin-left: auto;
	margin-right: auto;
	padding: 34px 24px;
	border: 1px solid #efe9df;
	border-radius: 12px;
	background-color: #faf8f5;
}

.dfl-trust__grid {
	display: grid;
	grid-template-columns: repeat(var(--dfl-trust-cols, 3), minmax(0, 1fr));
	column-gap: var(--dfl-trust-col-gap, 0px);
	row-gap: var(--dfl-trust-row-gap, 32px);
	width: 100%;
}

/* ---------------------------------- Item --------------------------------- */

.dfl-trust__item {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: var(--dfl-trust-item-just, center);
	gap: var(--dfl-trust-icon-gap, 20px);
	min-width: 0;
	padding: 4px 24px;
	color: inherit;
	text-decoration: none;
	transition-property: background-color, transform;
	transition-duration: 300ms;
	transition-timing-function: ease;
}

.dfl-trust--icon-right .dfl-trust__item {
	flex-direction: row-reverse;
}

.dfl-trust--icon-top .dfl-trust__item {
	flex-direction: column;
	align-items: var(--dfl-trust-text-items, start);
}

a.dfl-trust__item:hover,
a.dfl-trust__item:focus {
	text-decoration: none;
}

a.dfl-trust__item:focus-visible {
	outline: 2px solid #c9a24d;
	outline-offset: 4px;
}

/* ---------------------------------- Icon --------------------------------- */

.dfl-trust__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--dfl-trust-icon-box, auto);
	height: var(--dfl-trust-icon-box, auto);
	color: #b08d45;
	font-size: var(--dfl-trust-icon-size, 42px);
	line-height: 1;
	transition: color 300ms ease, background-color 300ms ease, border-color 300ms ease;
}

.dfl-trust__icon i {
	font-size: inherit;
	line-height: 1;
}

.dfl-trust__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.dfl-trust__icon--image img {
	display: block;
	width: var(--dfl-trust-icon-size, 42px);
	height: auto;
	max-width: 100%;
}

/* ------------------------------ Title / copy ----------------------------- */

.dfl-trust__body {
	min-width: 0;
	text-align: var(--dfl-trust-text-align, start);
}

.dfl-trust__title {
	margin: 0 0 7px;
	color: #14100b;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: 0.5px;
	line-height: 1.3;
	transition: color 300ms ease;
}

.dfl-trust__text {
	margin: 0;
	color: #5a5349;
	font-size: 13px;
	line-height: 1.65;
}

/* -------------------------------- Dividers ------------------------------- */

.dfl-trust--dividers .dfl-trust__item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	display: block;
	width: var(--dfl-trust-divider-w, 1px);
	height: var(--dfl-trust-divider-h, 72px);
	background-color: var(--dfl-trust-divider-color, #dccdb0);
}

/* Desktop: drop the rule on whichever column opens each row. */
@media (min-width: 1025px) {
	.dfl-trust--dividers.dfl-trust--cols-1 .dfl-trust__item:nth-child(1n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-2 .dfl-trust__item:nth-child(2n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-3 .dfl-trust__item:nth-child(3n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-4 .dfl-trust__item:nth-child(4n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-5 .dfl-trust__item:nth-child(5n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-6 .dfl-trust__item:nth-child(6n + 1)::before {
		display: none;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.dfl-trust--dividers.dfl-trust--cols-t-1 .dfl-trust__item:nth-child(1n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-t-2 .dfl-trust__item:nth-child(2n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-t-3 .dfl-trust__item:nth-child(3n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-t-4 .dfl-trust__item:nth-child(4n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-t-5 .dfl-trust__item:nth-child(5n + 1)::before,
	.dfl-trust--dividers.dfl-trust--cols-t-6 .dfl-trust__item:nth-child(6n + 1)::before {
		display: none;
	}
}

@media (max-width: 767px) {
	/* Hide */
	.dfl-trust--dividers-m-hide .dfl-trust__item::before {
		display: none;
	}

	/* Keep vertical */
	.dfl-trust--dividers-m-keep.dfl-trust--cols-m-1 .dfl-trust__item:nth-child(1n + 1)::before,
	.dfl-trust--dividers-m-keep.dfl-trust--cols-m-2 .dfl-trust__item:nth-child(2n + 1)::before,
	.dfl-trust--dividers-m-keep.dfl-trust--cols-m-3 .dfl-trust__item:nth-child(3n + 1)::before,
	.dfl-trust--dividers-m-keep.dfl-trust--cols-m-4 .dfl-trust__item:nth-child(4n + 1)::before,
	.dfl-trust--dividers-m-keep.dfl-trust--cols-m-5 .dfl-trust__item:nth-child(5n + 1)::before,
	.dfl-trust--dividers-m-keep.dfl-trust--cols-m-6 .dfl-trust__item:nth-child(6n + 1)::before {
		display: none;
	}

	/* Turn horizontal: the rule moves into the middle of the row gap. */
	.dfl-trust--dividers-m-horizontal .dfl-trust__item::before {
		left: 0;
		right: 0;
		top: calc(var(--dfl-trust-row-gap, 32px) / -2);
		transform: none;
		width: auto;
		height: var(--dfl-trust-divider-w, 1px);
	}

	.dfl-trust--dividers-m-horizontal.dfl-trust--cols-m-1 .dfl-trust__item:nth-child(-n + 1)::before,
	.dfl-trust--dividers-m-horizontal.dfl-trust--cols-m-2 .dfl-trust__item:nth-child(-n + 2)::before,
	.dfl-trust--dividers-m-horizontal.dfl-trust--cols-m-3 .dfl-trust__item:nth-child(-n + 3)::before,
	.dfl-trust--dividers-m-horizontal.dfl-trust--cols-m-4 .dfl-trust__item:nth-child(-n + 4)::before,
	.dfl-trust--dividers-m-horizontal.dfl-trust--cols-m-5 .dfl-trust__item:nth-child(-n + 5)::before,
	.dfl-trust--dividers-m-horizontal.dfl-trust--cols-m-6 .dfl-trust__item:nth-child(-n + 6)::before {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dfl-trust__item,
	.dfl-trust__icon,
	.dfl-trust__title {
		transition-duration: 1ms;
	}
}
