/**
 * Trust blocks (inc/trust.php), used on the homepage (light canvas) and in the
 * footer (graphite): KupujemProdajem badge, "Info o isporuci", newsletter note.
 *
 * Text colors follow the surrounding section (currentColor); the KP badge is
 * always a light tile, so its logo keeps its own colors on the dark footer.
 * The ratings number uses the success-text token (about 5.3:1 on white).
 */

/* ---------- KupujemProdajem badge ---------- */

.alatinidza-kp {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	max-width: 100%;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--card);
}

/* The footer sets light link text; the badge tile stays light with dark text. */
.alatinidza-footer .alatinidza-kp {
	color: var(--wp--preset--color--contrast);
}

.alatinidza-kp:hover {
	border-color: var(--wp--preset--color--primary);
}

.alatinidza-kp:hover .alatinidza-kp__ratings strong {
	text-decoration: underline;
}

.alatinidza-kp:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.alatinidza-footer .alatinidza-kp:focus-visible {
	outline-color: var(--wp--preset--color--base);
}

.alatinidza-kp__logo img {
	display: block;
	width: 8rem;
	height: auto;
}

.alatinidza-kp__text {
	display: grid;
	gap: 0.125rem;
}

.alatinidza-kp__years {
	font-weight: 600;
}

.alatinidza-kp__ratings {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--success-text);
	font-size: var(--wp--preset--font-size--large);
}

/* Footer icons are accent-colored; the badge keeps green on its light tile. */
.alatinidza-kp .alatinidza-kp__thumb,
.alatinidza-footer .alatinidza-kp .alatinidza-kp__thumb {
	flex: none;
	width: 1.375rem;
	height: 1.375rem;
	color: var(--wp--preset--color--success-text);
}

/*
 * Compact badge (header): one short line, 44px tall, light tile with a border
 * so it reads as a separate trust element next to the navigation links.
 */
.alatinidza-kp--compact {
	flex-wrap: nowrap;
	gap: var(--wp--preset--spacing--20);
	min-height: var(--wp--custom--touch-target);
	padding-block: 0.25rem;
	padding-inline: var(--wp--preset--spacing--30);
	white-space: nowrap;
}

/*
 * Two classes on purpose: WooCommerce's `.woocommerce-page img { height: auto }`
 * (0,1,1) would otherwise win on shop pages and show the logo at its intrinsic
 * 600×251 size.
 */
.alatinidza-kp--compact .alatinidza-kp__compact-logo {
	display: block;
	width: auto;
	max-width: none;
	height: 1.5rem;
}

.alatinidza-kp--compact .alatinidza-kp__ratings {
	gap: 0.25rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.alatinidza-kp--compact .alatinidza-kp__thumb {
	width: 1.125rem;
	height: 1.125rem;
}

/* Mobile header: the square KP icon and the negative ratings in red. */
.alatinidza-kp--mobile.alatinidza-kp--compact {
	padding-inline: var(--wp--preset--spacing--20);
}

.alatinidza-kp--compact .alatinidza-kp__icon {
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 4px;
}

.alatinidza-kp--compact .alatinidza-kp__ratings--negative,
.alatinidza-kp--compact .alatinidza-kp__ratings--negative .alatinidza-kp__thumb {
	color: var(--wp--preset--color--error);
}

/* Under the mobile search the graphite row needs no outline; focus ring is light. */
.alatinidza-kp--mobile {
	border-color: transparent;
}

.alatinidza-kp--mobile:focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* ---------- Info o isporuci ---------- */

.alatinidza-delivery-info > * {
	margin-block: 0;
}

.alatinidza-delivery-info > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

/* Larger title, separated from the list by a rule. */
.alatinidza-delivery-info__title,
.alatinidza-newsletter__title {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	padding-block-end: var(--wp--preset--spacing--30);
	color: inherit;
	font-size: var(--wp--preset--font-size--x-large);
	border-block-end: 2px solid color-mix(in srgb, currentColor 18%, transparent);
}

.alatinidza-delivery-info > .alatinidza-delivery-info__title + *,
.alatinidza-newsletter > .alatinidza-newsletter__title + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.alatinidza-delivery-info__title .alatinidza-icon,
.alatinidza-newsletter__title .alatinidza-icon {
	flex: none;
	width: 1.75rem;
	height: 1.75rem;
	color: var(--wp--preset--color--accent);
}

.alatinidza-delivery-info__list {
	display: grid;
	gap: var(--wp--preset--spacing--10);
	margin: 0;
	padding-inline-start: 1.25rem;
}

.alatinidza-delivery-info__more {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	font-weight: 600;
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 0.2em;
}

/* ---------- Newsletter (sign-up form on the homepage and in the footer) ---------- */

.alatinidza-newsletter > * {
	margin-block: 0;
}

.alatinidza-newsletter > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.alatinidza-newsletter__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	font-weight: 600;
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 0.2em;
}

/*
 * Sign-up form (theme markup, visible at once). Colors follow the section:
 * light card on the homepage, graphite footer elsewhere; the field itself is
 * always light. The status line marks success/error with a colored edge, so
 * it stays readable on both backgrounds.
 */
.alatinidza-newsletter__form {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	max-width: 32rem;
}

.alatinidza-newsletter__form > * {
	margin: 0;
}

.alatinidza-newsletter__field label {
	display: block;
	font-weight: 600;
}

.alatinidza-newsletter__input {
	box-sizing: border-box;
	width: 100%;
	min-height: var(--wp--custom--control-height);
	margin-block-start: var(--wp--preset--spacing--10);
	padding: 0.5rem 0.75rem;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--contrast-muted);
	border-radius: var(--wp--preset--border-radius--control);
}

.alatinidza-newsletter__consent {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
}

.alatinidza-newsletter__consent input {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.1rem 0 0;
	accent-color: var(--wp--preset--color--primary);
}

.alatinidza-newsletter__consent a {
	color: inherit;
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 0.2em;
}

.alatinidza-newsletter__submit {
	min-height: var(--wp--custom--touch-target);
	cursor: pointer;
}

.alatinidza-newsletter__submit:disabled {
	cursor: progress;
	opacity: 0.7;
}

.alatinidza-newsletter__status:empty {
	display: none;
}

.alatinidza-newsletter__status {
	padding-inline-start: var(--wp--preset--spacing--30);
	font-weight: 600;
	border-inline-start: 4px solid currentColor;
}

.alatinidza-newsletter__status[data-state="success"] {
	border-color: var(--wp--preset--color--success);
}

.alatinidza-newsletter__status[data-state="error"] {
	border-color: var(--wp--preset--color--error);
}

.alatinidza-newsletter__fine {
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.85;
}

/* Trap field for bots (Brevo's email_address_check): off screen, never focused. */
.alatinidza-newsletter__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Social links (brand marks) ---------- */

.alatinidza-social {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	min-height: var(--wp--custom--touch-target);
	font-weight: 600;
}

.alatinidza-social__mark {
	flex: none;
	width: 1.75rem;
	height: 1.75rem;
}

.alatinidza-newsletter__badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	border: 1px dashed currentColor;
	border-radius: var(--wp--preset--border-radius--control);
}
