/* Chile-only presentation layer. Lynbro remains the state and consent owner. */
#lynbro-cc-root .lynbro-cc__lang {
	display: none !important;
}

/* Compact card (WEB-002H-UX). Lynbro renders position=box + corner-bottom-left;
   everything below is presentation only. */
#lynbro-cc-root.lynbro-cc--box {
	width: min( 390px, calc( 100vw - 32px ) );
	max-width: none;
}

#lynbro-cc-root.lynbro-cc--box .lynbro-cc__dialog {
	max-width: none;
	margin: 0;
	padding: 16px 18px 18px;
	gap: 12px;
	border: 1px solid rgba( 38, 100, 49, 0.14 );
	border-radius: 16px;
	box-shadow: 0 12px 36px rgba( 16, 40, 25, 0.22 );
	max-height: calc( 100dvh - 32px );
	overflow-y: auto;
}

/* In a column the base `flex: 1 1 380px` would become a 380px-tall body. */
#lynbro-cc-root .lynbro-cc__body {
	flex: 0 1 auto;
}

#lynbro-cc-root .lynbro-cc__title {
	font-size: 17px;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 0 0 6px;
}

#lynbro-cc-root .lynbro-cc__desc,
#lynbro-cc-root .lynbro-cc__category-desc {
	font-size: 14px;
	line-height: 1.45;
}

#lynbro-cc-root .lynbro-cc__policy {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #266431;
}

/* Rechazar | Aceptar share one row with identical size and treatment; Personalizar sits below. */
#lynbro-cc-root .lynbro-cc__actions {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 8px;
	width: 100%;
	align-items: stretch; /* equal heights even if a label wraps */
}

#lynbro-cc-root .lynbro-cc__btn {
	min-height: 44px;
	padding: 8px 6px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	white-space: normal;
}

#lynbro-cc-root .lynbro-cc__btn--reject { grid-column: 1; grid-row: 1; }
#lynbro-cc-root .lynbro-cc__btn--accept { grid-column: 2; grid-row: 1; }
#lynbro-cc-root .lynbro-cc__btn--prefs,
#lynbro-cc-root .lynbro-cc__btn--save { grid-column: 1 / -1; grid-row: 2; }

/* Same size and tap target for every button; hierarchy comes from color only.
   Aceptar todas: brand green (#78be20) with dark text (6.3:1). Solo necesarias: white, 2px dark border (12:1). */
#lynbro-cc-root .lynbro-cc__btn--accept,
#lynbro-cc-root .lynbro-cc__btn--save {
	background: #78be20;
	border-color: #5a8e18;
	color: #10301a;
}

#lynbro-cc-root .lynbro-cc__btn--reject {
	background: #ffffff;
	border-color: #31513b;
	color: #1f3b29;
}

#lynbro-cc-root .lynbro-cc__btn--prefs {
	background: #ffffff;
	border-color: #8a9d8f;
	color: #1f3b29;
	font-weight: 600;
}

#lynbro-cc-root .lynbro-cc__btn:focus-visible,
.hncb-footer-preferences .hncb-open-preferences:focus-visible {
	outline: 3px solid #78be20;
	outline-offset: 3px;
}

/* The panel retains native controls, but its category list scrolls independently. */
#lynbro-cc-root.hncb-preferences-open .lynbro-cc__categories {
	max-height: min( 38vh, 300px );
	overflow-y: auto;
	padding-right: 4px;
}

#lynbro-cc-root.hncb-preferences-open .lynbro-cc__badge {
	display: none;
}

/* Once preferences are visible, the native save action replaces Personalizar. */
#lynbro-cc-root.hncb-preferences-open .lynbro-cc__btn--prefs {
	display: none;
}

.hncb-footer-preferences {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.4;
}

.hncb-footer-preferences .hncb-open-preferences {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

@media ( max-width: 600px ) {
	#lynbro-cc-root.lynbro-cc--box {
		left: 10px;
		right: 10px;
		bottom: max( 10px, env( safe-area-inset-bottom ) );
		width: auto;
	}

	#lynbro-cc-root.lynbro-cc--box .lynbro-cc__dialog {
		padding: 14px 16px 16px;
		gap: 10px;
		max-height: calc( 100dvh - 20px );
	}

	#lynbro-cc-root .lynbro-cc__title {
		font-size: 16px;
		margin-bottom: 3px;
	}

	#lynbro-cc-root .lynbro-cc__desc,
	#lynbro-cc-root .lynbro-cc__category-desc {
		font-size: 14px;
		line-height: 1.38;
	}

	/* Policy link flows at the end of the sentence instead of taking its own row. */
	#lynbro-cc-root .lynbro-cc__policy {
		display: inline;
		margin: 0 0 0 4px;
		font-size: inherit;
		white-space: nowrap;
	}

	/* One row, three equal 44px+ targets: Solo necesarias | Aceptar todas | Personalizar. */
	#lynbro-cc-root .lynbro-cc__actions {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
		gap: 6px;
	}

	#lynbro-cc-root .lynbro-cc__btn {
		padding: 6px 4px;
		font-size: 13px;
	}

	#lynbro-cc-root .lynbro-cc__btn--prefs { grid-column: 3; grid-row: 1; }

	/* Preferences panel keeps Rechazar | Aceptar, with Guardar below. */
	#lynbro-cc-root.hncb-preferences-open .lynbro-cc__actions {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	#lynbro-cc-root.hncb-preferences-open .lynbro-cc__categories {
		max-height: min( 34vh, 260px );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	#lynbro-cc-root *,
	#lynbro-cc-root *::before,
	#lynbro-cc-root *::after {
	transition-duration: 0.01ms !important;
	animation-duration: 0.01ms !important;
	}
}
