/**
 * FAQ Chat – kérdés-válasz widget
 *
 * Design: ügyvédi iroda, nem SaaS support bot. A vizuális jel az "akta"
 * metafora: a válaszok homokszínű fülre felfűzött kartonlapként érkeznek,
 * a fejléc tintafekete, a tipográfia a kérdéseknél talpas.
 *
 * Minden selector .fqc- prefixet kap, és az interaktív elemek dupla
 * osztályszelektorral íródnak, hogy a sablon gomb-stílusai ne írják felül.
 */

.fqc-root {
	--fqc-accent: #ca811c;
	--fqc-accent-ink: #8d5a14;
	--fqc-sand: #cdb89c;
	--fqc-ink: #15181d;
	--fqc-paper: #fbfaf7;
	--fqc-surface: #ffffff;
	--fqc-text: #2a2f36;
	--fqc-muted: #6d6a64;
	--fqc-line: rgba(21, 24, 29, 0.11);
	--fqc-shadow: 0 24px 60px -24px rgba(21, 24, 29, 0.42), 0 2px 8px rgba(21, 24, 29, 0.08);
	--fqc-radius: 6px;
	--fqc-z: 9999;
	--fqc-panel-w: 340px;
	--fqc-panel-h: 560px;
	--fqc-font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
	--fqc-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--fqc-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
	--fqc-launcher-size: 52px;

	/* Beállításból jövő szövegméret-szorzó (GYIK betűmérete). */
	--fqc-scale: 1;

	/* A talpas betűk optikai mérete eltér; ez hangolja őket egy szintre. */
	--fqc-display-scale: 1;

	box-sizing: border-box;
	font-family: var(--fqc-font-body);
	line-height: 1.55;
}

.fqc-root *,
.fqc-root *::before,
.fqc-root *::after {
	box-sizing: border-box;
}

/* A .fqc-panel display:flex-e felülírná a böngésző
   [hidden] { display: none } szabályát, ezért itt explicit. */
.fqc-root [hidden] {
	display: none !important;
}

.fqc--ink {
	--fqc-paper: #15181d;
	--fqc-surface: #1c2027;
	--fqc-text: #ece7de;
	--fqc-muted: #9a948a;
	--fqc-line: rgba(236, 231, 222, 0.14);

	/* Sötét felületen az arany szövegként is 5,65:1 — nem kell sötétíteni. */
	--fqc-accent-ink: var(--fqc-accent);
}

.fqc--font-theme {
	--fqc-font-display: inherit;
	--fqc-font-body: inherit;
}

.fqc-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------- Button reset */

.fqc-root .fqc-btn {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.fqc-root .fqc-btn:focus-visible,
.fqc-root .fqc-search__input:focus-visible {
	outline: 2px solid var(--fqc-accent);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------- Launcher */

.fqc-root--floating {
	position: fixed;
	bottom: 22px;
	z-index: var(--fqc-z);
}

.fqc--pos-right {
	right: 22px;
}

.fqc--pos-left {
	left: 22px;
}

.fqc-root .fqc-launcher {
	gap: 10px;
	align-items: center;
	justify-content: center;
	transition: transform 0.22s var(--fqc-ease), background-color 0.22s var(--fqc-ease),
		border-color 0.22s var(--fqc-ease), opacity 0.22s var(--fqc-ease), box-shadow 0.22s var(--fqc-ease);
}

.fqc-root .fqc-launcher:hover,
.fqc-root .fqc-launcher:focus-visible {
	transform: translateY(-2px);
}

/* Hangsúlyos: tömör sötét korong. */

.fqc-root .fqc-launcher--solid {
	border: 1px solid transparent;
	background: var(--fqc-ink);
	color: #f3efe8;
	box-shadow: var(--fqc-shadow);
}

.fqc-root .fqc-launcher--solid:hover {
	background: var(--fqc-accent);
}

/* Visszafogott: világos alap, halvány keret és árnyék. */

.fqc-root .fqc-launcher--soft {
	border: 1px solid var(--fqc-line);
	background: var(--fqc-surface);
	color: var(--fqc-text);
	box-shadow: 0 6px 20px -10px rgba(21, 24, 29, 0.35);
}

.fqc-root .fqc-launcher--soft:hover {
	border-color: var(--fqc-accent);
	box-shadow: 0 10px 26px -12px rgba(21, 24, 29, 0.45);
}

/* Diszkrét: átlátszó, csak keret — nyugalmi állapotban halványabb. */

.fqc-root .fqc-launcher--outline {
	border: 1.5px solid var(--fqc-accent);
	background: transparent;
	color: var(--fqc-text);
	opacity: 0.72;
	box-shadow: none;
}

.fqc-root .fqc-launcher--outline:hover,
.fqc-root .fqc-launcher--outline:focus-visible {
	opacity: 1;
	background: var(--fqc-surface);
	box-shadow: 0 6px 18px -10px rgba(21, 24, 29, 0.4);
}

/* Kör alakú, csak kérdőjeles változat. A méret beállításból jön, de az
   érintési felület sosem megy 44 px alá. */

.fqc-root .fqc-launcher--icon {
	width: var(--fqc-launcher-size);
	height: var(--fqc-launcher-size);
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border-radius: 50%;
}

/* Felirattal: pill, benne körben a kérdőjel. */

.fqc-root .fqc-launcher--pill {
	padding: 7px 18px 7px 7px;
	border-radius: 999px;
}

.fqc-launcher__mark {
	display: grid;
	place-items: center;
	color: var(--fqc-accent-ink);
	font-family: var(--fqc-font-display);
	font-size: calc(var(--fqc-launcher-size) * 0.52);
	font-weight: 400;
	line-height: 1;
	transition: color 0.22s var(--fqc-ease);
}

.fqc-launcher--solid .fqc-launcher__mark {
	color: var(--fqc-accent);
}

.fqc-launcher--pill .fqc-launcher__mark {
	width: calc(var(--fqc-launcher-size) * 0.65);
	height: calc(var(--fqc-launcher-size) * 0.65);
	min-width: 30px;
	min-height: 30px;
	border-radius: 50%;
	background: var(--fqc-accent);
	color: var(--fqc-ink);
	font-size: calc(var(--fqc-launcher-size) * 0.36);
}

.fqc-root .fqc-launcher--solid:hover .fqc-launcher__mark {
	color: var(--fqc-ink);
}

.fqc-root .fqc-launcher--pill.fqc-launcher--solid:hover .fqc-launcher__mark {
	background: var(--fqc-ink);
	color: var(--fqc-accent);
}

.fqc-launcher__label {
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.fqc-root--open .fqc-launcher {
	display: none;
}

/* ---------------------------------------------------------------------- Panel */

.fqc-panel {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	width: var(--fqc-panel-w);
	max-width: calc(100vw - 24px);
	max-height: min(var(--fqc-panel-h), calc(100vh - 104px));
	max-height: min(var(--fqc-panel-h), calc(100dvh - 104px));
	border-radius: var(--fqc-radius);
	background: var(--fqc-paper);
	color: var(--fqc-text);
	box-shadow: var(--fqc-shadow);
}

.fqc-root--floating.fqc-root--open .fqc-panel {
	animation: fqc-rise 0.24s var(--fqc-ease) both;
}

@keyframes fqc-rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

.fqc-panel__head {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 13px 14px 12px;
	border-bottom: 2px solid var(--fqc-accent);
	background: var(--fqc-ink);
	color: #f3efe8;
}

.fqc-panel__heading {
	flex: 1 1 auto;
	min-width: 0;
}

.fqc-panel__title {
	margin: 0;
	color: inherit;
	font-family: var(--fqc-font-display);
	font-size: calc(15px * var(--fqc-scale) * var(--fqc-display-scale));
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.005em;
}

.fqc-panel__subtitle {
	margin: 3px 0 0;
	color: rgba(243, 239, 232, 0.62);
	font-size: calc(11.5px * var(--fqc-scale));
	line-height: 1.45;
}

/* Középre zárt fejléc: a bezáró gomb kikerül a folyamból, különben a
   címet a saját szélességével tolná el a valódi középtől. */

.fqc-panel__head--center {
	justify-content: center;
	padding-right: 44px;
	padding-left: 44px;
	text-align: center;
}

.fqc-panel__head--center .fqc-panel__heading {
	flex: 0 1 auto;
}

.fqc-panel__head--center .fqc-close {
	position: absolute;
	top: 11px;
	right: 10px;
}

/* Beágyazott módban nincs bezáró gomb, ott nem kell a hely sem. */

.fqc-root--inline .fqc-panel__head--center {
	padding-right: 14px;
	padding-left: 14px;
}

.fqc-root .fqc-close {
	flex: 0 0 auto;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 2px;
	color: rgba(243, 239, 232, 0.7);
	transition: background-color 0.18s var(--fqc-ease), color 0.18s var(--fqc-ease);
}

.fqc-root .fqc-close:hover {
	background: rgba(243, 239, 232, 0.1);
	color: #f3efe8;
}

.fqc-close svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
}

/* --------------------------------------------------------------------- Search */

.fqc-search {
	position: relative;
	padding: 8px 12px;
	border-bottom: 1px solid var(--fqc-line);
	background: var(--fqc-surface);
}

.fqc-search__icon {
	position: absolute;
	top: 50%;
	left: 22px;
	width: 14px;
	height: 14px;
	transform: translateY(-50%);
	fill: none;
	stroke: var(--fqc-muted);
	stroke-width: 1.5;
	stroke-linecap: round;
	pointer-events: none;
}

.fqc-root .fqc-search__input {
	width: 100%;
	height: 32px;
	margin: 0;
	padding: 0 10px 0 30px;
	border: 1px solid var(--fqc-line);
	border-radius: 2px;
	background: var(--fqc-paper);
	color: var(--fqc-text);
	font: inherit;
	font-size: calc(12.5px * var(--fqc-scale));
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.fqc-root .fqc-search__input::placeholder {
	color: var(--fqc-muted);
	opacity: 1;
}

/* ------------------------------------------------------------- Görgethető test */

.fqc-body {
	/* 0 1 auto: a tartalmánál nem lesz magasabb, de a panel felső korlátja
	   alatt zsugorodhat — a min-height: 0 nélkül a flex elem nem menne a
	   tartalommérete alá, és görgetés helyett kilógna. */
	flex: 0 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 12px 12px 14px;
	overscroll-behavior: contain;
}

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

.fqc-body::-webkit-scrollbar {
	width: 8px;
}

.fqc-body::-webkit-scrollbar-thumb {
	border: 2px solid transparent;
	border-radius: 99px;
	background: var(--fqc-line);
	background-clip: content-box;
}

.fqc-note {
	margin: 0 0 11px;
	color: var(--fqc-muted);
	font-size: calc(12px * var(--fqc-scale));
	line-height: 1.55;
}

.fqc-note p {
	margin: 0;
	color: inherit;
	font-size: inherit;
}

.fqc-note--error {
	color: #b3261e;
}

.fqc-root .fqc-linkbtn {
	color: var(--fqc-accent-ink);
	font-size: calc(12.5px * var(--fqc-scale));
	font-weight: 600;
}

.fqc-root .fqc-linkbtn:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* --------------------------------------------------------- Accordion: témák */

.fqc-acc {
	display: grid;
	gap: 6px;
}

.fqc-group {
	border: 1px solid var(--fqc-line);
	border-left: 3px solid var(--fqc-sand);
	border-radius: 0 3px 3px 0;
	background: var(--fqc-surface);
	transition: border-left-color 0.18s var(--fqc-ease);
}

.fqc-group.is-open {
	border-left-color: var(--fqc-accent);
}

.fqc-group__head {
	margin: 0;
	font: inherit;
}

.fqc-root .fqc-group__btn {
	gap: 10px;
	align-items: center;
	width: 100%;
	padding: 11px 12px;
	color: var(--fqc-text);
	transition: color 0.16s var(--fqc-ease);
}

.fqc-root .fqc-group__btn:hover {
	color: var(--fqc-accent-ink);
}

.fqc-group__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.fqc-group__label {
	font-family: var(--fqc-font-display);
	font-size: calc(13.5px * var(--fqc-scale) * var(--fqc-display-scale));
	font-weight: 600;
	line-height: 1.3;
}

.fqc-group__note {
	overflow: hidden;
	color: var(--fqc-muted);
	font-size: calc(11px * var(--fqc-scale));
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fqc-group__count {
	flex: 0 0 auto;
	min-width: 20px;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--fqc-sand);
	color: #23262b;
	font-size: calc(10.5px * var(--fqc-scale));
	font-weight: 700;
	text-align: center;
}

/* Nyíl mindkét szinten — a méret különbözteti meg a szinteket. */

.fqc-chev {
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	margin-right: 2px;
	border-right: 1.6px solid var(--fqc-muted);
	border-bottom: 1.6px solid var(--fqc-muted);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.22s var(--fqc-ease), border-color 0.16s var(--fqc-ease);
}

.fqc-chev--sm {
	width: 6px;
	height: 6px;
	border-width: 1.4px;
}

.fqc-group.is-open .fqc-chev,
.fqc-item.is-open .fqc-chev {
	border-color: var(--fqc-accent);
	transform: rotate(-135deg) translate(-2px, -2px);
}

.fqc-group__panel,
.fqc-item__panel {
	overflow: hidden;
	transition: height 0.24s var(--fqc-ease);
}

/* ------------------------------------------------------ Accordion: kérdések */

.fqc-items {
	display: grid;
}

.fqc-items--nested {
	padding: 0 12px 6px;
	border-top: 1px solid var(--fqc-line);
}

.fqc-item + .fqc-item {
	border-top: 1px solid var(--fqc-line);
}

.fqc-item__head {
	margin: 0;
	font: inherit;
}

.fqc-root .fqc-item__btn {
	gap: 10px;
	align-items: flex-start;
	width: 100%;
	padding: 10px 2px;
	color: var(--fqc-text);
	transition: color 0.16s var(--fqc-ease);
}

.fqc-root .fqc-item__btn:hover {
	color: var(--fqc-accent-ink);
}

.fqc-item.is-open .fqc-item__q {
	color: var(--fqc-accent-ink);
}

.fqc-item__q {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--fqc-font-display);
	font-size: calc(13px * var(--fqc-scale) * var(--fqc-display-scale));
	line-height: 1.42;
}

.fqc-item__btn .fqc-chev {
	margin-top: 4px;
}

.fqc-tag {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--fqc-line);
	color: var(--fqc-muted);
	font-family: var(--fqc-font-body);
	font-size: calc(9.5px * var(--fqc-scale));
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	vertical-align: 2px;
}

/* Válasz: homokszínű fülre fűzött kartonlap, a kérdés alá csúsztatva. */

.fqc-answer {
	padding: 2px 0 12px 11px;
	border-left: 2px solid var(--fqc-sand);
	margin: 0 0 4px;
	font-size: calc(13px * var(--fqc-scale));
	line-height: 1.58;
}

.fqc-answer p {
	margin: 0 0 7px;
	color: var(--fqc-text);
	font-size: inherit;
	line-height: inherit;
}

.fqc-answer p:last-child {
	margin-bottom: 0;
}

.fqc-answer strong {
	color: var(--fqc-text);
	font-weight: 600;
}

.fqc-answer ul,
.fqc-answer ol {
	margin: 0 0 7px;
	padding-left: 20px;
}

.fqc-answer a {
	color: var(--fqc-accent-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ----------------------------------------------------------------- Panel foot */

.fqc-panel__foot {
	padding: 10px 12px;
	border-top: 1px solid var(--fqc-line);
	background: var(--fqc-surface);
}

.fqc-actions {
	display: grid;
	gap: 6px;
}

.fqc-root .fqc-cta {
	display: flex;
	flex-direction: column;
	gap: 1px;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border: 1px solid transparent;
	border-radius: 3px;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.18s var(--fqc-ease), border-color 0.18s var(--fqc-ease), color 0.18s var(--fqc-ease);
}

.fqc-cta__label {
	font-size: calc(11.5px * var(--fqc-scale));
	font-weight: 700;
	letter-spacing: 0.07em;
	line-height: 1.3;
	text-transform: uppercase;
}

/* A szám talpas szedéssel, hogy hívható adatnak nézzen ki, ne feliratnak. */

.fqc-cta__number {
	font-family: var(--fqc-font-display);
	font-size: calc(12.5px * var(--fqc-scale) * var(--fqc-display-scale));
	letter-spacing: 0.02em;
	line-height: 1.35;
	opacity: 0.78;
}

.fqc-root .fqc-cta--call {
	background: var(--fqc-ink);
	color: #f3efe8;
}

.fqc-root .fqc-cta--call:hover {
	background: var(--fqc-accent);
	color: var(--fqc-ink);
}

.fqc-root .fqc-cta--book {
	border-color: var(--fqc-line);
	background: transparent;
	color: var(--fqc-text);
}

.fqc-root .fqc-cta--book:hover {
	border-color: var(--fqc-accent);
	color: var(--fqc-accent-ink);
}

/* Ha csak a foglalás gomb van, ne nézzen ki másodlagos műveletnek. */

.fqc-actions > .fqc-cta--book:only-child {
	border-color: transparent;
	background: var(--fqc-ink);
	color: #f3efe8;
}

.fqc-actions > .fqc-cta--book:only-child:hover {
	background: var(--fqc-accent);
	color: var(--fqc-ink);
}

/* --------------------------------------------------------------- Inline mode */

.fqc-root--inline {
	position: relative;
	width: 100%;
	margin: 24px 0;
}

/* A beágyazott panel a tartalmához igazodik: nyitáskor nő, csukáskor
   visszahúzódik, így az utolsó kérdés alatt nem marad üres sáv. A
   --fqc-inline-height csak felső korlát, és csak akkor van értéke, ha a
   shortcode kapott height attribútumot. */

.fqc-root--inline .fqc-panel {
	width: 100%;
	max-width: none;
	height: auto;
	max-height: var(--fqc-inline-height, none);
	border: 1px solid var(--fqc-line);
	box-shadow: none;
}

/* -------------------------------------------------------------------- Mobile */

/* Mobilon is popup marad: a bal/jobb margóra feszül, de nem veszi át
   a teljes képernyőt, és a nyitógomb helyét sem takarja ki. */
@media (max-width: 640px) {
	.fqc-root--floating {
		bottom: 14px;
	}

	.fqc--pos-right {
		right: 14px;
	}

	.fqc--pos-left {
		left: 14px;
	}

	.fqc-root--floating.fqc-root--open {
		right: 12px;
		left: 12px;
	}

	.fqc-root--floating.fqc-root--open .fqc-panel {
		width: 100%;
		max-width: none;
		max-height: min(var(--fqc-panel-h), calc(100vh - 76px));
		max-height: min(var(--fqc-panel-h), calc(100dvh - 76px));
	}
}

/* Alacsony ablak (fekvő telefon): a szál kapja a maradék helyet. */
@media (max-height: 520px) {
	.fqc-panel {
		max-height: calc(100vh - 60px);
		max-height: calc(100dvh - 60px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.fqc-root *,
	.fqc-root *::before,
	.fqc-root *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}

	.fqc-thread {
		scroll-behavior: auto;
	}
}

@media (prefers-contrast: more) {
	.fqc-root {
		--fqc-line: rgba(21, 24, 29, 0.4);
	}
}
