/**
 * Article Boxes — frontend styles.
 * All colors come from the CSS variables printed by ABX_Render::inline_vars().
 */

.abx-note,
.abx-summary,
.abx-faq,
.abx-productbox,
.abx-productgrid {
	margin: 28px 0;
	font-family: inherit;
	line-height: 1.9;
	box-sizing: border-box;
}

.abx-note *,
.abx-summary *,
.abx-faq *,
.abx-productbox *,
.abx-productgrid * {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- Note */

.abx-note {
	--abx-note-accent: var(--abx-link, #1F6FA9);
	border-radius: var(--abx-radius, 20px);
	padding: 18px 20px;
	background: var(--abx-surface, #fff);
	border: 1px solid var(--abx-border, #E6EBF1);
}

.abx-note__head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 8px;
}

.abx-note__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 17px;
	line-height: 1;
	background: color-mix(in srgb, var(--abx-note-accent) 14%, transparent);
}

.abx-note__titles {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.abx-note__title {
	font-weight: 700;
	font-size: 15px;
	color: var(--abx-note-accent);
}

.abx-note__subtitle {
	font-size: 12px;
	color: var(--abx-muted, #667085);
}

.abx-note__body {
	color: var(--abx-body, #475467);
	font-size: 15px;
}

.abx-note__body > *:first-child { margin-top: 0; }
.abx-note__body > *:last-child { margin-bottom: 0; }

/* Variants */

.abx-note--tint {
	background: color-mix(in srgb, var(--abx-note-accent) 7%, #fff);
	border-color: color-mix(in srgb, var(--abx-note-accent) 22%, transparent);
}

.abx-note--outline {
	background: var(--abx-surface, #fff);
	border-color: color-mix(in srgb, var(--abx-note-accent) 35%, transparent);
}

.abx-note--quote {
	background: transparent;
	border: 0;
	border-inline-start: 3px solid var(--abx-note-accent);
	border-radius: 0;
	padding: 6px 18px;
}

.abx-note--solid {
	background: var(--abx-note-accent);
	border-color: transparent;
}

.abx-note--solid .abx-note__title,
.abx-note--solid .abx-note__body { color: #fff; }
.abx-note--solid .abx-note__subtitle { color: rgba(255, 255, 255, .75); }
.abx-note--solid .abx-note__icon { background: rgba(255, 255, 255, .18); }

/* ------------------------------------------------------------- Summary */

.abx-summary {
	border-radius: var(--abx-radius, 20px);
	padding: 24px;
	color: var(--abx-sum-text, #DCE7F1);
	background: linear-gradient(135deg, var(--abx-sum-a, #0E2233), var(--abx-sum-b, #17324A));
}

.abx-summary__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 16px;
}

.abx-summary__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	font-size: 18px;
	color: var(--abx-sum-accent, #F4A8C8);
	background: rgba(255, 255, 255, .08);
}

.abx-summary__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
}

.abx-summary__subtitle {
	margin: 4px 0 0;
	font-size: 13px;
	opacity: .75;
}

.abx-summary__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
}

.abx-summary__list li {
	position: relative;
	padding-inline-start: 22px;
	font-size: 15px;
}

.abx-summary__list li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 12px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--abx-sum-accent, #F4A8C8);
}

.abx-summary__note {
	margin: 16px 0 0;
	padding-top: 14px;
	font-size: 13px;
	opacity: .7;
	border-top: 1px solid rgba(255, 255, 255, .12);
}

/* ----------------------------------------------------------------- FAQ */

.abx-faq__title {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 700;
	color: var(--abx-text, #101828);
}

.abx-faq__list {
	display: grid;
	gap: 10px;
}

.abx-faq__item {
	border: 1px solid var(--abx-border, #E6EBF1);
	border-radius: calc(var(--abx-radius, 20px) - 6px);
	background: var(--abx-surface, #fff);
	overflow: hidden;
}

.abx-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
	padding: 14px 18px;
	font-weight: 600;
	font-size: 15px;
	color: var(--abx-text, #101828);
	list-style: none;
}

.abx-faq__q::-webkit-details-marker { display: none; }

.abx-faq__chevron {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-inline-end: 2px solid var(--abx-muted, #667085);
	border-bottom: 2px solid var(--abx-muted, #667085);
	transform: rotate(45deg);
	transition: transform .2s ease;
}

.abx-faq__item[open] .abx-faq__chevron { transform: rotate(-135deg); }

.abx-faq__a {
	padding: 0 18px 16px;
	color: var(--abx-body, #475467);
	font-size: 15px;
}

.abx-faq__a > *:first-child { margin-top: 0; }
.abx-faq__a > *:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- Table */

.abx-table {
	margin: 28px 0;
}

.abx-table__scroll {
	overflow-x: auto;
	border: 1px solid var(--abx-border, #E6EBF1);
	border-radius: calc(var(--abx-radius, 20px) - 6px);
	background: var(--abx-surface, #fff);
	-webkit-overflow-scrolling: touch;
}

.abx-table__scroll:focus-visible {
	outline: 2px solid var(--abx-link, #1F6FA9);
	outline-offset: 2px;
}

.abx-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	margin: 0;
}

.abx-table caption {
	caption-side: top;
	text-align: start;
	padding: 14px 16px 10px;
	font-weight: 700;
	font-size: 15px;
	color: var(--abx-text, #101828);
}

.abx-table th,
.abx-table td {
	padding: 12px 16px;
	text-align: start;
	vertical-align: top;
	border-bottom: 1px solid var(--abx-border, #E6EBF1);
	color: var(--abx-body, #475467);
	line-height: 1.8;
}

.abx-table thead th {
	background: color-mix(in srgb, var(--abx-link, #1F6FA9) 8%, #fff);
	color: var(--abx-text, #101828);
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
}

.abx-table tbody tr:last-child th,
.abx-table tbody tr:last-child td {
	border-bottom: 0;
}

.abx-table--striped tbody tr:nth-child(even) th,
.abx-table--striped tbody tr:nth-child(even) td {
	background: #FAFBFC;
}

.abx-table--firstcol tbody th {
	font-weight: 700;
	color: var(--abx-text, #101828);
}

.abx-table--compact th,
.abx-table--compact td {
	padding: 8px 12px;
	font-size: 14px;
}

.abx-table__note {
	margin: 8px 2px 0;
	font-size: 12px;
	color: var(--abx-muted, #667085);
}

/* ------------------------------------------------------------ Products */

.abx-productbox__label,
.abx-productgrid__title {
	display: block;
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	color: var(--abx-accent, #B4185F);
}

.abx-productgrid__title {
	font-size: 18px;
	color: var(--abx-text, #101828);
}

.abx-productgrid__items {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(var(--abx-cols, 3), minmax(0, 1fr));
}

.abx-product {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border: 1px solid var(--abx-border, #E6EBF1);
	border-radius: calc(var(--abx-radius, 20px) - 4px);
	background: var(--abx-surface, #fff);
}

.abx-product--wide {
	flex-direction: row;
	align-items: center;
	gap: 16px;
}

.abx-product__media {
	display: block;
	flex: 0 0 auto;
	border-radius: 12px;
	overflow: hidden;
	background: #F6F8FA;
}

.abx-product--wide .abx-product__media { width: 120px; }
.abx-product--card .abx-product__media { width: 100%; }

.abx-product__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.abx-product__info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	flex: 1 1 auto;
}

.abx-product__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.7;
}

.abx-product__title a {
	color: var(--abx-text, #101828);
	text-decoration: none;
}

.abx-product__title a:hover { color: var(--abx-link, #1F6FA9); }

.abx-product__rating {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: var(--abx-muted, #667085);
}

.abx-product__stars { color: #F5A623; }

.abx-product__excerpt {
	margin: 0;
	font-size: 13px;
	color: var(--abx-muted, #667085);
}

.abx-product__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 6px;
	flex-wrap: wrap;
}

.abx-product__price {
	font-size: 15px;
	font-weight: 700;
	color: var(--abx-text, #101828);
}

.abx-product__price del { opacity: .5; font-weight: 400; font-size: 13px; }
.abx-product__price ins { text-decoration: none; }

.abx-product__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	background: var(--abx-accent, #B4185F);
	transition: opacity .2s ease;
}

.abx-product__btn:hover { opacity: .88; color: #fff; }

/* -------------------------------------------------------- Placeholders */

.abx-placeholder {
	padding: 16px;
	border: 1px dashed var(--abx-border, #E6EBF1);
	border-radius: 12px;
	color: var(--abx-muted, #667085);
	font-size: 13px;
	text-align: center;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 782px) {
	.abx-productgrid__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
	.abx-productgrid__items { grid-template-columns: 1fr; }

	.abx-product--wide { flex-direction: column; align-items: stretch; }
	.abx-product--wide .abx-product__media { width: 100%; }

	.abx-summary { padding: 18px; }
}
