/* ==========================================================================
   APTH Quiz: πλήρες quiz ([apth_quiz], σελίδα quiz).
   Ύφος child theme: χαρτί, μελάνι (navy), κόκκινο έμφασης, Commissioner + Inter, γωνίες 0,
   πλαίσια 2px, σκληρή σκιά 8x8. Οι μεταβλητές --apth-* ορίζονται στο child theme.
   ========================================================================== */

.apth-qz {
	--qz-paper: var(--apth-paper, #F4F1EA);
	--qz-ink: var(--apth-ink, #061F45);
	--qz-soft: var(--apth-ink-soft, #3D3A35);
	--qz-muted: var(--apth-ink-muted, #55524C);
	--qz-accent: var(--apth-accent, #D71425);
	--qz-accent-text: var(--apth-accent-text, #D71425);
	--qz-accent-on-dark: var(--apth-accent-on-dark, #FF8A94);
	--qz-on-accent: var(--apth-on-accent, #FFFFFF);
	--qz-violet: var(--apth-violet, #6D5DF5);
	--qz-head: var(--apth-font-head, 'Commissioner', 'Inter', system-ui, sans-serif);
	--qz-body: var(--apth-font-body, 'Inter', system-ui, sans-serif);

	margin: 32px 0;
	padding: 32px;
	background: #fff;
	border: 2px solid var(--qz-ink);
	box-shadow: 8px 8px 0 var(--qz-ink);
	color: var(--qz-ink);
	font-family: var(--qz-body);
}

.apth-qz [hidden] { display: none !important; }
.apth-qz p { margin: 0; }
.apth-qz__screen { display: flex; flex-direction: column; gap: 20px; }
.apth-qz :focus-visible { outline: 3px solid var(--qz-accent); outline-offset: 2px; }
.apth-qz [tabindex="-1"]:focus { outline: none; }

/* ---------- Κουμπιά ---------- */
.apth-qz .apth-qz__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 48px; margin: 0; padding: 8px 22px;
	background: transparent; color: var(--qz-ink); border: 2px solid var(--qz-ink); border-radius: 0; box-shadow: none;
	font-family: var(--qz-body); font-weight: 700; font-size: 16px; line-height: 1.25; letter-spacing: 0; text-transform: none; text-align: center; text-decoration: none;
	cursor: pointer;
}
.apth-qz .apth-qz__btn:hover { background: var(--qz-ink); color: var(--qz-paper); }
.apth-qz .apth-qz__btn--primary { background: var(--qz-accent); border-color: var(--qz-accent); color: var(--qz-on-accent); font-family: var(--qz-head); font-weight: 800; font-size: 17px; }
.apth-qz .apth-qz__btn--primary:hover { background: var(--qz-ink); border-color: var(--qz-ink); color: var(--qz-on-accent); }
.apth-qz .apth-qz__btn--dark { background: var(--qz-ink); color: var(--qz-paper); }
.apth-qz .apth-qz__btn--dark:hover { background: var(--qz-accent); border-color: var(--qz-accent); color: var(--qz-on-accent); }
.apth-qz .apth-qz__btn[aria-disabled="true"] { opacity: 0.55; }
.apth-qz__start .apth-qz__btn { align-self: flex-start; min-height: 56px; padding: 0 28px; }
.apth-qz__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.apth-qz__link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--qz-accent-text); }

/* ---------- Έναρξη ---------- */
.apth-qz .apth-qz__title { margin: 0; font-family: var(--qz-head); font-weight: 900; font-size: 32px; line-height: 1.15; color: var(--qz-ink); }
.apth-qz__lead { font-size: 18px; line-height: 1.5; color: var(--qz-soft); }
.apth-qz__note { font-size: 14px; line-height: 1.5; color: var(--qz-muted); }
.apth-qz__loading { font-weight: 600; color: var(--qz-muted); }
.apth-qz__error { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border: 2px solid var(--qz-accent-text); color: var(--qz-ink); font-weight: 600; }
.apth-qz__notice { padding: 16px; border: 2px dashed var(--qz-ink); }

/* ---------- Ερώτηση ---------- */
.apth-qz__progress { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--qz-muted); }
.apth-qz__progressbar { height: 8px; background: var(--qz-paper); border: 2px solid var(--qz-ink); }
.apth-qz__progressbar span { display: block; height: 100%; background: var(--qz-accent); transition: width 0.3s ease; }
.apth-qz .apth-qz__prompt { margin: 0; font-family: var(--qz-head); font-weight: 800; font-size: 22px; line-height: 1.3; color: var(--qz-ink); }
.apth-qz__statement { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.apth-qz__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; color: var(--qz-muted); }
.apth-qz .apth-qz__quote { margin: 0; padding: 0; border: 0; background: none; font-family: var(--qz-head); font-style: normal; font-weight: 800; font-size: 26px; line-height: 1.3; color: var(--qz-ink); }

.apth-qz__options { display: grid; gap: 12px; }
.apth-qz__options--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apth-qz .apth-qz__option {
	position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
	min-height: 56px; margin: 0; padding: 10px 14px;
	background: var(--qz-paper); color: var(--qz-ink); border: 2px solid var(--qz-ink); border-radius: 0; box-shadow: none;
	font-family: var(--qz-head); font-weight: 800; font-size: 17px; line-height: 1.25; letter-spacing: 0; text-transform: none; text-align: left;
	cursor: pointer;
}
.apth-qz .apth-qz__option:hover:not(:disabled) { background: var(--qz-ink); color: var(--qz-paper); }
.apth-qz .apth-qz__option[aria-pressed="true"] { background: var(--qz-ink); color: var(--qz-paper); box-shadow: 4px 4px 0 var(--qz-accent); }
.apth-qz .apth-qz__option:disabled { cursor: default; opacity: 1; }
.apth-qz .apth-qz__option.is-correct { background: var(--qz-ink); color: var(--qz-paper); }
.apth-qz .apth-qz__option.is-wrong { background: #fff; color: var(--qz-ink); border-style: dashed; }
.apth-qz .apth-qz__option.is-chosen { box-shadow: 4px 4px 0 var(--qz-accent); }
.apth-qz__key { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid currentColor; font-family: var(--qz-body); font-weight: 700; font-size: 14px; }
.apth-qz__option.is-correct .apth-qz__key { background: var(--qz-accent); color: var(--qz-on-accent); border-color: var(--qz-accent); }
.apth-qz__label { flex: 1 1 auto; }

/* ---------- Βεβαιότητα ---------- */
.apth-qz__confidence { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
.apth-qz__conf-title { font-weight: 700; }
/* Η κλίμακα 1-5 και από κάτω οι άκρες «Καθόλου» (αριστερά) και «Απόλυτη» (δεξιά). */
.apth-qz__scale-wrap { display: inline-grid; grid-template-columns: auto auto; grid-template-areas: "scale scale" "low high"; gap: 6px 12px; }
.apth-qz__scale { grid-area: scale; display: flex; gap: 8px; }
.apth-qz__scale-end { grid-area: low; font-size: 13px; color: var(--qz-muted); }
.apth-qz__scale-end:last-child { grid-area: high; text-align: right; }
.apth-qz .apth-qz__level {
	min-width: 48px; min-height: 48px; margin: 0; padding: 0;
	background: #fff; color: var(--qz-ink); border: 2px solid var(--qz-ink); border-radius: 0; box-shadow: none;
	font-family: var(--qz-head); font-weight: 800; font-size: 18px; cursor: pointer;
}
.apth-qz .apth-qz__level:hover:not(:disabled),
.apth-qz .apth-qz__level[aria-pressed="true"] { background: var(--qz-ink); color: var(--qz-paper); }

/* ---------- Feedback ---------- */
.apth-qz__feedback { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--qz-paper); border: 2px solid var(--qz-ink); border-left-width: 8px; }
.apth-qz__feedback.is-correct { border-left-color: var(--qz-ink); }
.apth-qz__feedback.is-wrong { border-left-color: var(--qz-accent-text); }
.apth-qz__verdict { font-size: 17px; line-height: 1.5; }
.apth-qz__verdict > strong { font-family: var(--qz-head); font-weight: 900; font-size: 20px; }
.apth-qz__points { font-weight: 700; color: var(--qz-accent-text); }
.apth-qz__said { font-weight: 600; }
.apth-qz__explain { font-size: 16px; line-height: 1.55; color: var(--qz-soft); }
.apth-qz__dist { font-size: 15px; font-weight: 600; }
.apth-qz__dist--few { font-weight: 400; color: var(--qz-muted); }

/* ---------- Αποτέλεσμα ---------- */
.apth-qz .apth-qz__result-title { margin: 0; font-family: var(--qz-head); font-weight: 900; font-size: 30px; line-height: 1.15; color: var(--qz-ink); }
.apth-qz__score { display: flex; flex-direction: column; gap: 8px; }
.apth-qz__score-main { font-family: var(--qz-head); font-weight: 900; font-size: 44px; line-height: 1.05; }
.apth-qz__score-points { font-weight: 700; color: var(--qz-muted); }
.apth-qz__profile { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 20px 24px; background: var(--qz-ink); color: var(--qz-paper); }
.apth-qz__profile .apth-eyebrow { margin: 0; color: var(--qz-accent-on-dark); }
.apth-qz__profile-name { font-family: var(--qz-head); font-weight: 900; font-size: 28px; line-height: 1.15; color: var(--qz-accent-on-dark); }
.apth-qz__profile-text { line-height: 1.5; color: var(--apth-on-dark, #D6D2C8); }
.apth-qz__guide { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; border: 2px solid var(--qz-ink); }
.apth-qz__section { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 2px solid var(--qz-ink); }
.apth-qz .apth-qz__h { margin: 0; font-family: var(--qz-head); font-weight: 800; font-size: 22px; line-height: 1.25; color: var(--qz-ink); }
.apth-qz__chart { position: relative; width: 100%; }
.apth-qz__details summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
.apth-qz__table { width: 100%; margin: 8px 0 0; border-collapse: collapse; font-size: 15px; }
.apth-qz__table th,
.apth-qz__table td { padding: 8px 10px; border: 1px solid var(--qz-ink); text-align: left; }
.apth-qz__table thead th { background: var(--qz-paper); }
.apth-qz__research { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.apth-qz__research li { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 16px; background: var(--qz-paper); border: 2px solid var(--qz-ink); }
.apth-qz__research-q { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--qz-accent-text); }
.apth-qz__meter { height: 12px; background: #fff; border: 2px solid var(--qz-ink); }
.apth-qz__meter span { display: block; height: 100%; background: var(--qz-violet); }
.apth-qz__source { font-size: 14px; color: var(--qz-muted); }
.apth-qz__card-img { display: block; width: 100%; max-width: 600px; height: auto; border: 2px solid var(--qz-ink); background: var(--qz-paper); }

/* ---------- Συγκατάθεση ---------- */
/* Το Flatsome βάζει κεφαλαία/αδιαφάνεια σε κάθε <dl>. */
.apth-qz .apth-qz__consent-list,
.apth-qz .apth-qz__consent-list dt,
.apth-qz .apth-qz__consent-list dd { font-size: 15px; letter-spacing: 0; text-transform: none; opacity: 1; }
.apth-qz__consent-list { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 10px 20px; margin: 0; padding: 16px 20px; background: var(--qz-paper); border: 2px solid var(--qz-ink); }
.apth-qz__consent-list dt { margin: 0; font-weight: 700; }
.apth-qz__consent-list dd { margin: 0; line-height: 1.5; color: var(--qz-soft); }

/* ---------- Φόρμες ---------- */
.apth-qz__field { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.apth-qz__field label { font-weight: 600; }
.apth-qz .apth-qz__input,
.apth-qz .apth-qz__select,
.apth-qz__field select {
	width: 100%; min-height: 48px; height: auto; margin: 0; padding: 8px 12px;
	background: #fff; color: var(--qz-ink); border: 2px solid var(--qz-ink); border-radius: 0; box-shadow: none; font-size: 16px;
}
.apth-qz .apth-qz__input[aria-invalid="true"] { border-color: var(--qz-accent-text); }
.apth-qz__rank-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.apth-qz__form-msg { font-weight: 600; }
.apth-qz__form-msg:empty { display: none; }
.apth-qz__boards { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Badges ---------- */
.apth-qz__badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.apth-qz__badge { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; background: #fff; border: 2px dashed var(--qz-muted); color: var(--qz-muted); }
.apth-qz__badge.is-earned { background: var(--qz-paper); border-style: solid; border-color: var(--qz-ink); color: var(--qz-ink); }
.apth-qz__badge.is-new { box-shadow: 4px 4px 0 var(--qz-accent); }
.apth-qz__badge-icon { flex: 0 0 auto; font-size: 24px; line-height: 1; }
.apth-qz__badge.is-earned .apth-qz__badge-icon { color: var(--qz-accent-text); }
.apth-qz__badge-text { display: flex; flex-direction: column; gap: 2px; }
.apth-qz__badge-new { align-self: flex-start; padding: 1px 6px; background: var(--qz-accent); color: var(--qz-on-accent); font-size: 12px; font-weight: 700; }
.apth-qz__badge-desc { font-size: 14px; line-height: 1.4; }

/* ---------- Κατάταξη (στο quiz και [apth_leaderboard]) ---------- */
.apth-lb { display: flex; flex-direction: column; gap: 16px; color: var(--apth-ink, #061F45); }
.apth-lb__filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.apth-lb__filter label { flex-basis: 100%; margin: 0; font-weight: 600; }
.apth-lb__filter select { flex: 1 1 260px; min-height: 48px; height: auto; margin: 0; background: #fff; border: 2px solid var(--apth-ink, #061F45); border-radius: 0; box-shadow: none; font-size: 16px; }
.apth-lb__filter .apth-qz__btn {
	display: inline-flex; align-items: center; min-height: 48px; margin: 0; padding: 0 20px;
	background: var(--apth-ink, #061F45); color: #fff; border: 2px solid var(--apth-ink, #061F45); border-radius: 0; font-weight: 700; text-transform: none; letter-spacing: 0;
}
.apth-lb__title { margin: 0; }
.apth-lb__table { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; background: #fff; }
.apth-lb__table caption { padding: 0 0 8px; text-align: left; font-weight: 700; }
.apth-lb__table th,
.apth-lb__table td { padding: 8px 10px; border: 1px solid var(--apth-ink, #061F45); text-align: left; }
.apth-lb__table thead th { background: var(--apth-paper, #F4F1EA); }
/* Το Flatsome βάζει κεφαλαία στα <th>: τα ψευδώνυμα εμφανίζονται όπως γράφτηκαν. */
.apth-lb__table th,
.apth-qz__table th { font-size: inherit; letter-spacing: 0; text-transform: none; }
.apth-lb__table .apth-lb__num { text-align: right; font-variant-numeric: tabular-nums; }
.apth-lb__table tr.is-you { background: var(--apth-paper, #F4F1EA); box-shadow: inset 6px 0 0 var(--apth-accent, #D71425); }
.apth-lb__empty { margin: 0; padding: 16px; border: 2px dashed var(--apth-ink, #061F45); }

/* ---------- Γραφήματα έρευνας ([apth_research_charts]) ---------- */
.apth-rc { display: flex; flex-direction: column; gap: 40px; margin: 32px 0; }
.apth-rc__block { display: flex; flex-direction: column; gap: 12px; }
.apth-rc .apth-qz__h { margin: 0; font-family: var(--apth-font-head, 'Commissioner', sans-serif); font-weight: 800; font-size: 22px; line-height: 1.25; }
.apth-rc .apth-qz__note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--apth-ink-muted, #55524C); }
.apth-rc .apth-qz__details summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
.apth-rc .apth-qz__table { width: 100%; margin: 8px 0 0; border-collapse: collapse; font-size: 15px; background: #fff; }
.apth-rc .apth-qz__table th,
.apth-rc .apth-qz__table td { padding: 8px 10px; border: 1px solid var(--apth-ink, #061F45); text-align: left; }
.apth-rc .apth-qz__table thead th { background: var(--apth-paper, #F4F1EA); }

/* ---------- Κινητό ---------- */
@media (max-width: 549px) {
	.apth-qz { margin: 24px 0; padding: 20px; box-shadow: 6px 6px 0 var(--qz-ink); }
	.apth-qz .apth-qz__title { font-size: 26px; }
	.apth-qz .apth-qz__quote { font-size: 21px; }
	.apth-qz .apth-qz__prompt { font-size: 19px; }
	.apth-qz__options--3 { grid-template-columns: 1fr; }
	.apth-qz__score-main { font-size: 34px; }
	.apth-qz__profile { padding: 16px; }
	.apth-qz__profile-name { font-size: 24px; }
	.apth-qz__scale { gap: 6px; }
	.apth-qz .apth-qz__level { min-width: 44px; min-height: 44px; }
	.apth-qz__actions { flex-direction: column; align-items: stretch; }
	.apth-qz__actions .apth-qz__btn,
	.apth-qz__start .apth-qz__btn { width: 100%; }
	.apth-qz__consent-list { grid-template-columns: 1fr; gap: 4px; padding: 14px; }
	.apth-qz__consent-list dd { margin-bottom: 8px; }
	.apth-qz__rank-form { align-items: stretch; }
	.apth-lb__table { font-size: 14px; }
	.apth-lb__table th,
	.apth-lb__table td { padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.apth-qz__progressbar span { transition: none; }
}
