/**
 * BHC Chat — guided FAQ widget.
 * Minden selector a .bhcc-root alá scope-olva, hogy a Divi ne írja felül és
 * fordítva. Színek CSS változóban → könnyű reskin (Cell-Cup stb.).
 * Font: Montserrat (az oldalon már betöltve — itt nem töltjük be újra).
 */

.bhcc-root {
	--bhcc-primary: #0097b2;
	--bhcc-accent: #f2b705;
	--bhcc-ink: #1a1a1a;
	--bhcc-panel: #ffffff;
	--bhcc-muted: #667079;
	--bhcc-line: rgba(26, 26, 26, .12);
	--bhcc-soft: #f2f7f9;
	--bhcc-shadow: 0 18px 50px -20px rgba(0, 60, 72, .55);
	--bhcc-radius: 16px;

	position: fixed;
	right: 24px;
	bottom: 24px;
	/* A Divi elemek fölött, de a cookie-banner alatt. */
	z-index: 99990;
	font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--bhcc-ink);
	font-size: 15px;
	line-height: 1.5;
}

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

.bhcc-root button {
	font-family: inherit;
	cursor: pointer;
}

/* ---------- Lebegő buborék ---------- */

.bhcc-bubble {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border: none;
	border-radius: 50%;
	background: var(--bhcc-primary);
	color: #fff;
	box-shadow: var(--bhcc-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}

.bhcc-bubble:hover {
	transform: translateY(-2px);
}

.bhcc-bubble:focus-visible {
	outline: 3px solid var(--bhcc-accent);
	outline-offset: 3px;
}

.bhcc-bubble svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

.bhcc-root.bhcc-open .bhcc-bubble {
	display: none;
}

/* ---------- Figyelemfelhívó "nudge" buborék ---------- */

.bhcc-teaser {
	position: absolute;
	right: 0;
	bottom: 74px;
	display: flex;
	align-items: center;
	gap: 6px;
	width: max-content;
	max-width: min(250px, calc(100vw - 40px));
	padding: 10px 12px;
	background: var(--bhcc-panel);
	color: var(--bhcc-ink);
	border-radius: 14px;
	box-shadow: var(--bhcc-shadow);
	opacity: 0;
	transform: translateY(8px) scale(.96);
	transform-origin: bottom right;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}

.bhcc-root.bhcc-teaser-on .bhcc-teaser {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

/* kis "farok" a buborék felé */
.bhcc-teaser::after {
	content: "";
	position: absolute;
	right: 22px;
	bottom: -6px;
	width: 12px;
	height: 12px;
	background: var(--bhcc-panel);
	transform: rotate(45deg);
	box-shadow: 3px 3px 6px -4px rgba(0, 60, 72, .4);
}

.bhcc-teaser-open {
	border: none;
	background: none;
	color: inherit;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	padding: 0;
}

.bhcc-teaser-close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: none;
	border-radius: 50%;
	background: var(--bhcc-soft);
	color: var(--bhcc-muted);
	align-self: flex-start;
}

.bhcc-teaser-close svg {
	width: 11px;
	height: 11px;
	fill: currentColor;
}

.bhcc-root.bhcc-open .bhcc-teaser {
	display: none;
}

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

.bhcc-panel {
	display: none;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 48px);
	background: var(--bhcc-panel);
	border-radius: var(--bhcc-radius);
	box-shadow: var(--bhcc-shadow);
	overflow: hidden;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .18s ease, transform .18s ease;
}

.bhcc-root.bhcc-open .bhcc-panel {
	display: flex;
}

.bhcc-root.bhcc-in .bhcc-panel {
	opacity: 1;
	transform: none;
}

/* ---------- Fejléc ---------- */

.bhcc-head {
	flex: 0 0 auto;
	background: var(--bhcc-primary);
	color: #fff;
	padding: 12px 14px;
}

.bhcc-head-top {
	display: flex;
	align-items: center;
	gap: 8px;
}

.bhcc-head-title {
	font-weight: 700;
	font-size: 15px;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bhcc-hbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 30px;
	min-width: 30px;
	padding: 0 8px;
	border: none;
	border-radius: 8px;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	transition: background .15s ease;
}

.bhcc-hbtn:hover {
	background: rgba(255, 255, 255, .30);
}

.bhcc-hbtn:focus-visible {
	outline: 2px solid var(--bhcc-accent);
	outline-offset: 1px;
}

.bhcc-hbtn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.bhcc-lang {
	display: inline-flex;
	border-radius: 8px;
	overflow: hidden;
	background: rgba(255, 255, 255, .16);
}

.bhcc-lang button {
	border: none;
	background: transparent;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 9px;
	opacity: .7;
}

.bhcc-lang button.bhcc-on {
	background: rgba(255, 255, 255, .28);
	opacity: 1;
}

/* Breadcrumb */

.bhcc-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 4px;
	margin-top: 8px;
	font-size: 12px;
	color: rgba(255, 255, 255, .85);
}

.bhcc-crumbs button {
	border: none;
	background: none;
	color: inherit;
	font-size: 12px;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bhcc-crumbs span.bhcc-sep {
	opacity: .6;
}

.bhcc-crumbs span.bhcc-cur {
	font-weight: 700;
	color: #fff;
}

/* ---------- Törzs ---------- */

.bhcc-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	-webkit-overflow-scrolling: touch;
}

.bhcc-greet {
	margin: 0 0 14px;
	color: var(--bhcc-muted);
}

.bhcc-answer {
	margin: 0 0 16px;
}

.bhcc-answer p {
	margin: 0 0 10px;
}

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

.bhcc-answer a {
	color: var(--bhcc-primary);
	text-decoration: underline;
}

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

.bhcc-section-title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--bhcc-muted);
	margin: 18px 0 8px;
}

/* Csomópont-gombok */

.bhcc-nodes {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bhcc-node {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	text-align: left;
	padding: 12px 14px;
	border: 1.5px solid var(--bhcc-line);
	border-radius: 12px;
	background: #fff;
	color: var(--bhcc-ink);
	font-size: 14px;
	font-weight: 600;
	transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.bhcc-node:hover {
	border-color: var(--bhcc-primary);
	background: var(--bhcc-soft);
	transform: translateY(-1px);
}

.bhcc-node:focus-visible {
	outline: 2px solid var(--bhcc-primary);
	outline-offset: 1px;
}

.bhcc-node .bhcc-chev {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	fill: var(--bhcc-primary);
}

/* Popular blokk */

.bhcc-popular .bhcc-node {
	background: var(--bhcc-soft);
	border-color: transparent;
}

/* CTA gomb (sárga) */

.bhcc-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 8px;
	padding: 12px 18px;
	border: none;
	border-radius: 12px;
	background: var(--bhcc-accent);
	color: var(--bhcc-ink);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: transform .15s ease, filter .15s ease;
}

.bhcc-cta:hover {
	transform: translateY(-1px);
	filter: brightness(.97);
}

.bhcc-cta:focus-visible {
	outline: 2px solid var(--bhcc-ink);
	outline-offset: 2px;
}

/* ---------- Eszkaláció ---------- */

.bhcc-deadend {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--bhcc-line);
}

.bhcc-deadend-link {
	border: none;
	background: none;
	color: var(--bhcc-muted);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 2px;
	padding: 0;
}

.bhcc-deadend-link:hover {
	color: var(--bhcc-primary);
}

.bhcc-channels {
	display: none;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
}

.bhcc-channels.bhcc-show {
	display: flex;
}

.bhcc-channel {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 14px;
	border-radius: 12px;
	border: 1.5px solid var(--bhcc-line);
	background: #fff;
	color: var(--bhcc-ink);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .15s ease, background .15s ease;
}

.bhcc-channel:hover {
	border-color: var(--bhcc-primary);
	background: var(--bhcc-soft);
}

.bhcc-channel svg {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

.bhcc-channel-wa svg {
	fill: #25d366;
}

.bhcc-channel-fb svg {
	fill: #0084ff;
}

.bhcc-channel-email svg {
	fill: var(--bhcc-primary);
}

/* ---------- Kereső ---------- */

.bhcc-search {
	position: relative;
	margin: 0 0 14px;
}

.bhcc-search-input {
	width: 100%;
	font-family: inherit;
	font-size: 14px;
	color: var(--bhcc-ink);
	background: var(--bhcc-panel);
	border: 1.5px solid var(--bhcc-line);
	border-radius: 12px;
	padding: 11px 14px 11px 40px;
	-webkit-appearance: none;
	appearance: none;
}

.bhcc-search-input:focus {
	outline: none;
	border-color: var(--bhcc-primary);
}

.bhcc-search-input::placeholder {
	color: var(--bhcc-muted);
}

.bhcc-search-ic {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	width: 17px;
	height: 17px;
	color: var(--bhcc-muted);
	pointer-events: none;
}

/* ---------- „Other" / kapcsolat gomb ---------- */

.bhcc-other-wrap {
	margin-top: 14px;
}

.bhcc-node.bhcc-other {
	color: var(--bhcc-primary);
	border-style: dashed;
	font-weight: 700;
}

.bhcc-node.bhcc-other .bhcc-chev {
	fill: var(--bhcc-primary);
}

/* ---------- Üres állapot (nincs találat) ---------- */

.bhcc-empty {
	color: var(--bhcc-muted);
	font-size: 14px;
	text-align: center;
	padding: 12px 4px;
	margin: 0;
}

/* ---------- Állapotok ---------- */

.bhcc-loading,
.bhcc-error {
	text-align: center;
	color: var(--bhcc-muted);
	padding: 24px 12px;
}

.bhcc-spin {
	width: 26px;
	height: 26px;
	margin: 0 auto 10px;
	border: 3px solid var(--bhcc-line);
	border-top-color: var(--bhcc-primary);
	border-radius: 50%;
	animation: bhcc-spin .7s linear infinite;
}

@keyframes bhcc-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Mobil: full-screen 480px alatt ---------- */

@media (max-width: 480px) {
	.bhcc-root {
		right: 16px;
		bottom: 16px;
	}

	.bhcc-root.bhcc-open {
		inset: 0;
		right: 0;
		bottom: 0;
	}

	.bhcc-panel {
		width: 100vw;
		height: 100vh;
		max-width: 100vw;
		max-height: 100vh;
		border-radius: 0;
	}
}

/* ---------- Mozgás-érzékenység ---------- */

@media (prefers-reduced-motion: reduce) {
	.bhcc-panel,
	.bhcc-bubble,
	.bhcc-node,
	.bhcc-cta,
	.bhcc-teaser {
		transition: none;
	}

	.bhcc-spin {
		animation: none;
	}
}
