/* ================================================================
   WooPlus Product Q&A — modern indigo template (v6.10.4.x)
   Matches the WooCommerce+ admin design-system palette. Markup is
   produced by render_product_tab() + qa.js; this is the visual
   template. RTL-first, theme-agnostic (inherits the theme font).
   ================================================================ */
.wpl-qa {
	--qa-primary: #6366f1;
	--qa-primary-d: #4f46e5;
	--qa-green: #10b981;
	--qa-border: #e2e8f0;
	--qa-text: #1e293b;
	--qa-muted: #64748b;
	--qa-bg: #f8fafc;
	font-family: inherit;
	direction: rtl;
	color: var(--qa-text);
	max-width: 820px;
}

.wpl-qa h2 {
	font-size: 20px; font-weight: 700; margin: 0 0 16px;
	display: flex; align-items: center; gap: 9px; color: var(--qa-text);
}
.wpl-qa h2::before { content: ""; width: 4px; height: 20px; background: var(--qa-primary); border-radius: 2px; }

.wpl-qa-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.wpl-qa-loading, .wpl-qa-empty { text-align: center; color: var(--qa-muted); padding: 26px; font-size: 14px; }
.wpl-qa-empty { background: var(--qa-bg); border: 1px dashed var(--qa-border); border-radius: 14px; }

/* ---- A single question / answer card ---- */
.wpl-qa-item {
	background: #fff; border: 1px solid var(--qa-border); border-radius: 14px;
	padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
	transition: box-shadow .15s;
}
.wpl-qa-item:hover { box-shadow: 0 6px 18px rgba(0,0,0,.07); }

.wpl-qa-q-row, .wpl-qa-a-row { display: flex; gap: 10px; align-items: flex-start; }
.wpl-qa-a-row { margin-top: 12px; padding-top: 12px; padding-inline-start: 0; border-top: 1px dashed var(--qa-border); }

.wpl-qa-q-icon, .wpl-qa-a-icon {
	flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 14px; line-height: 1;
}
.wpl-qa-q-icon { background: #eef2ff; color: var(--qa-primary-d); }
.wpl-qa-a-icon { background: #ecfdf5; color: var(--qa-green); }

.wpl-qa-q-body, .wpl-qa-a-body { flex: 1; min-width: 0; }
.wpl-qa-q-text { font-size: 15px; font-weight: 600; color: var(--qa-text); margin: 0 0 7px; line-height: 1.7; }
.wpl-qa-a-text { font-size: 14px; color: #334155; margin: 0; line-height: 1.9; background: #f0fdf4; border-radius: 10px; padding: 9px 13px; }

.wpl-qa-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12px; color: var(--qa-muted); }
.wpl-qa-votes { display: inline-flex; gap: 6px; margin-inline-start: auto; }
.wpl-qa-vote-btn {
	display: inline-flex; align-items: center; gap: 4px;
	border: 1px solid var(--qa-border); background: #fff; border-radius: 999px;
	padding: 3px 11px; font: inherit; font-size: 12px; color: var(--qa-muted);
	cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.wpl-qa-vote-btn:hover { border-color: var(--qa-primary); color: var(--qa-primary); }
.wpl-qa-vote-btn.is-voted { background: #eef2ff; border-color: var(--qa-primary); color: var(--qa-primary-d); cursor: default; }

/* ---- Ask-a-question form ---- */
.wpl-qa-ask { background: var(--qa-bg); border: 1px solid var(--qa-border); border-radius: 14px; padding: 18px; }
.wpl-qa-ask h3 { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--qa-text); }
.wpl-qa-ask input, .wpl-qa-ask textarea {
	width: 100%; box-sizing: border-box; border: 1px solid var(--qa-border); border-radius: 10px;
	padding: 10px 12px; font: inherit; font-size: 14px; margin-bottom: 10px; background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.wpl-qa-ask input:focus, .wpl-qa-ask textarea:focus { outline: none; border-color: var(--qa-primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.wpl-qa-ask textarea { resize: vertical; min-height: 84px; }
.wpl-qa-ask button {
	background: var(--qa-primary); color: #fff; border: 0; border-radius: 10px;
	padding: 10px 26px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s;
}
.wpl-qa-ask button:hover { background: var(--qa-primary-d); }
.wpl-qa-ask button:disabled, .wpl-qa-ask button[disabled] { opacity: .6; cursor: progress; }
.wpl-qa-ask small { display: block; margin-top: 8px; color: var(--qa-muted); font-size: 12px; }

/* ---- Toast ---- */
.wpl-qa-toast {
	position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
	background: #0f172a; color: #fff; padding: 11px 20px; border-radius: 12px;
	font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3);
	opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 100000;
}
.wpl-qa-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---- Shortcode helper chips ([wooplus_qa_count] / _link) ---- */
.wpl-qa-count { font-weight: 700; color: var(--qa-primary-d); }
.wpl-qa-link { display: inline-flex; align-items: center; color: var(--qa-primary-d); text-decoration: none; font-weight: 600; }
.wpl-qa-link:hover { text-decoration: underline; }

@media ( prefers-reduced-motion: reduce ) {
	.wpl-qa-item, .wpl-qa-vote-btn, .wpl-qa-toast { transition: none; }
}
