/**
 * HNA component behavior not covered by theme.json.
 * All colors reference the theme palette.
 */

.hna-product-card,
.hna-author-box,
.hna-cta-section,
.hna-affiliate-disclosure,
.hna-disclaimer {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.375rem;
	padding: var(--wp--preset--spacing--40);
}

.hna-affiliate-disclosure,
.hna-disclaimer {
	border-inline-start: 3px solid var(--wp--preset--color--primary);
}

.hna-product-card,
.hna-cta-section,
.hna-affiliate-disclosure,
.hna-author-box,
.hna-disclaimer {
	color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--background);
}

.hna-product-card > :first-child,
.hna-author-box > :first-child,
.hna-cta-section > :first-child,
.hna-affiliate-disclosure > :first-child,
.hna-disclaimer > :first-child {
	margin-block-start: 0;
}

.hna-product-card > :last-child,
.hna-author-box > :last-child,
.hna-cta-section > :last-child,
.hna-affiliate-disclosure > :last-child,
.hna-disclaimer > :last-child {
	margin-block-end: 0;
}

.wp-block-button.is-style-hna-affiliate .wp-block-button__link {
	color: var(--wp--preset--color--background);
	background: var(--wp--preset--color--primary);
	border: 2px solid var(--wp--preset--color--primary);
}

.wp-block-button.is-style-hna-affiliate .wp-block-button__link:hover,
.wp-block-button.is-style-hna-affiliate .wp-block-button__link:focus-visible {
	color: var(--wp--preset--color--background);
	background: var(--wp--preset--color--secondary);
	border-color: var(--wp--preset--color--secondary);
}

.wp-block-button .wp-block-button__link {
	min-height: 44px;
	box-sizing: border-box;
	white-space: normal;
	overflow-wrap: anywhere;
}

.wp-block-table.is-style-hna-scroll {
	max-width: 100%;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
}

.wp-block-table.is-style-hna-scroll table {
	width: 100%;
	min-width: 40rem;
}

.wp-block-table.is-style-hna-scroll th,
.wp-block-table.is-style-hna-scroll td {
	border-color: var(--wp--preset--color--border);
	padding: var(--wp--preset--spacing--30);
	vertical-align: top;
}

.wp-block-table.is-style-hna-scroll th {
	color: var(--wp--preset--color--secondary);
	background: var(--wp--preset--color--background);
}

.wp-block-table.is-style-hna-scroll:focus-visible,
.wp-block-button .wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

.hna-sidebar,
.wp-block-column,
.wp-block-search,
.wp-block-search__inside-wrapper {
	min-width: 0;
}

.hna-sidebar .wp-block-latest-posts > li {
	margin-block-end: var(--wp--preset--spacing--30);
}

.hna-copyright {
	text-align: center;
	font-size: var(--wp--preset--font-size--small);
}

.hna-breadcrumbs,
.rank-math-breadcrumb {
	font-size: var(--wp--preset--font-size--small);
	overflow-wrap: anywhere;
}

@media (max-width: 781px) {
	.hna-sidebar {
		margin-block-start: var(--wp--preset--spacing--50);
	}
}
