/*
 * Product page styles: the FAQ tab, and the shop's reply inside WooCommerce's
 * review thread.
 *
 * Two rules govern this file:
 *
 * 1. Logical properties (inline-start/end) rather than left/right, so one
 *    stylesheet serves the RTL storefront and any LTR translation of it.
 *
 * 2. Every colour is derived from the theme's own text colour via currentColor.
 *    A plugin renders inside somebody else's theme, so it cannot know whether
 *    the page is light or dark — and it must not ask the operating system.
 *    Keying off prefers-color-scheme paints white text onto a light theme the
 *    moment the visitor's browser is set to dark mode. Deriving from
 *    currentColor follows whatever the surrounding theme actually chose.
 *
 * The plain rgba() declarations are fallbacks for browsers without color-mix();
 * mid grey reads acceptably against both light and dark backgrounds.
 */

.acmf-faq,
.acmf-seed,
.acmf-reply {
	--acmf-border: rgba(128, 128, 128, .35);
	--acmf-border: color-mix(in srgb, currentColor 22%, transparent);
	--acmf-muted: rgba(128, 128, 128, 1);
	--acmf-muted: color-mix(in srgb, currentColor 68%, transparent);
	--acmf-surface: rgba(128, 128, 128, .07);
	--acmf-surface: color-mix(in srgb, currentColor 5%, transparent);

	/* Themes may override this to their own link colour. */
	--acmf-accent: currentColor;
}

.acmf-faq {
	font-size: 15px;
	line-height: 1.9;
}

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

.acmf-faq__note {
	color: var(--acmf-muted);
	font-size: 13px;
	margin: 0 0 1.25em;
}

.acmf-faq__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--acmf-border);
}

.acmf-faq__item {
	border-bottom: 1px solid var(--acmf-border);
	margin: 0;
}

.acmf-faq__question {
	align-items: center;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: flex;
	font: inherit;
	font-weight: 600;
	gap: .75em;
	justify-content: space-between;
	padding: 1em 0;
	text-align: start;
	width: 100%;
}

.acmf-faq__question:hover .acmf-faq__question-text {
	color: var(--acmf-accent);
	text-decoration: underline;
}

.acmf-faq__question:focus-visible {
	outline: 2px solid var(--acmf-accent);
	outline-offset: 2px;
}

.acmf-faq__chevron {
	border-inline-end: 2px solid currentColor;
	border-block-end: 2px solid currentColor;
	flex: 0 0 auto;
	height: .55em;
	transform: rotate(45deg);
	transition: transform .18s ease;
	width: .55em;
}

.acmf-faq__question[aria-expanded="true"] .acmf-faq__chevron {
	transform: rotate(-135deg);
}

.acmf-faq__answer {
	color: var(--acmf-muted);
	padding-block-end: 1.1em;
}

.acmf-faq__answer p:last-child {
	margin-bottom: 0;
}

/* ---------- Shop reply under a review ---------- */

.acmf-reply {
	list-style: none;
}

/* ---------- Sample question written by the shop ---------- */

.acmf-seed {
	list-style: none;
}

.acmf-seed__box {
	border-inline-start: 3px solid var(--acmf-border);
	margin-block: .75em 1em;
	padding: .25em 1.15em;
}

.acmf-seed__meta {
	align-items: center;
	color: var(--acmf-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: .6em;
	margin-bottom: .4em;
}

.acmf-seed__badge {
	font-weight: 700;
}

/* Dashed and unfilled: this is a caveat about the name next to it, not a seal
   of approval, and it must never read as a verified-buyer badge. Quiet, but it
   stays on the same line as the name — never smaller than the rest of the meta
   row and never hidden behind a hover. */
.acmf-seed__note {
	border: 1px dashed var(--acmf-border);
	border-radius: 4px;
	font-size: 12px;
	padding: .1em .55em;
}

.acmf-seed__date {
	margin-inline-start: auto;
}

.acmf-seed__body p:last-child {
	margin-bottom: 0;
}

.acmf-reply__box {
	background: var(--acmf-surface);
	border: 1px solid var(--acmf-border);
	border-radius: 8px;
	margin-block: .75em 1em;
	padding: 1em 1.15em;
}

.acmf-reply__meta {
	align-items: center;
	color: var(--acmf-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: .6em;
	margin-bottom: .5em;
}

/* The tint carries the meaning; the label keeps the theme's own text colour so
   it stays legible whether the surrounding page is light or dark. */
.acmf-reply__badge {
	background: rgba(56, 161, 105, .24);
	border-radius: 4px;
	color: inherit;
	font-size: 12px;
	font-weight: 700;
	padding: .15em .6em;
}

.acmf-reply__author {
	font-weight: 600;
}

.acmf-reply__date {
	margin-inline-start: auto;
}

.acmf-reply__body p:last-child {
	margin-bottom: 0;
}

.acmf-reply__actions {
	margin-top: .75em;
}

.acmf-reply__helpful {
	background: none;
	border: 1px solid var(--acmf-border);
	border-radius: 999px;
	color: var(--acmf-muted);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	padding: .3em 1em;
}

.acmf-reply__helpful:hover:not([disabled]) {
	border-color: var(--acmf-accent);
	color: var(--acmf-accent);
}

.acmf-reply__helpful[disabled] {
	cursor: default;
	opacity: .65;
}
