/* FourHome Cookie Consent – minimalista, meleg semleges tónusok
   Minden szabály #fhc-root / #fhc-reopen ID-re szűkítve, hogy a téma
   (Elementor) globális h2 / button / p stílusai ne írják felül. */

:root {
	--fhc-accent: #a38b63;
	--fhc-accent-hover: #8f7a56;
	--fhc-bg: #fbf9f5;
	--fhc-ink: #2a2824;
	--fhc-muted: #6c6860;
	--fhc-border: rgba(42, 40, 36, .12);
	--fhc-shadow: 0 18px 50px rgba(42, 40, 36, .16);
	--fhc-radius: 16px;
}

/* ---- defenzív reset a téma ellen ---- */
#fhc-root,
#fhc-root *,
#fhc-reopen,
#fhc-reopen * {
	box-sizing: border-box;
}

#fhc-root h2,
#fhc-root p,
#fhc-root span,
#fhc-root label,
#fhc-root button,
#fhc-root a {
	margin: 0;
	padding: 0;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	float: none;
}

/* ---- konténer ---- */
#fhc-root.fhc-root {
	position: fixed;
	z-index: 999999;
	bottom: 24px;
	left: 0;
	right: 0;
	display: flex;
	pointer-events: none;
	padding: 0 16px;
}
#fhc-root.fhc-root[hidden] { display: none; }

#fhc-root.fhc-pos-bottom-center { justify-content: center; }
#fhc-root.fhc-pos-bottom-left   { justify-content: flex-start; }
#fhc-root.fhc-pos-bottom-right  { justify-content: flex-end; }

/* ---- cookie sáv ---- */
#fhc-root .fhc-bar {
	pointer-events: auto;
	width: 100%;
	max-width: 460px;
	background: var(--fhc-bg);
	color: var(--fhc-ink);
	border: 1px solid var(--fhc-border);
	border-radius: var(--fhc-radius);
	box-shadow: var(--fhc-shadow);
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	animation: fhc-rise .32s cubic-bezier(.22, .61, .36, 1) both;
}

#fhc-root .fhc-bar__title {
	margin: 0 0 6px !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: var(--fhc-ink) !important;
}

#fhc-root .fhc-bar__body {
	margin: 0 !important;
	font-size: 13.5px !important;
	line-height: 1.6 !important;
	font-weight: 400 !important;
	color: var(--fhc-muted) !important;
}

#fhc-root .fhc-link {
	color: var(--fhc-accent) !important;
	text-decoration: none !important;
	border-bottom: 1px solid rgba(163, 139, 99, .45);
	white-space: nowrap;
	font-weight: 500 !important;
}
#fhc-root .fhc-link:hover { color: var(--fhc-accent-hover) !important; }

#fhc-root .fhc-bar__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

/* ---- gombok ---- */
#fhc-root .fhc-btn,
#fhc-reopen.fhc-reopen {
	font-family: inherit;
	font-size: 13.5px !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	border-radius: 10px;
	padding: 12px 18px;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
	transition: background .18s ease, color .18s ease, border-color .18s ease, transform .06s ease;
	white-space: nowrap;
	min-height: 0;
	width: auto;
}
#fhc-root .fhc-btn:active { transform: translateY(1px); }
#fhc-root .fhc-btn:focus-visible { outline: 2px solid var(--fhc-accent); outline-offset: 2px; }

#fhc-root .fhc-btn--primary {
	background: var(--fhc-ink) !important;
	color: #fbf9f5 !important;
	border-color: var(--fhc-ink) !important;
	margin-left: auto;
}
#fhc-root .fhc-btn--primary:hover { background: #1c1a17 !important; border-color: #1c1a17 !important; }

#fhc-root .fhc-btn--ghost {
	background: #fff !important;
	color: var(--fhc-ink) !important;
	border-color: rgba(42, 40, 36, .22) !important;
}
#fhc-root .fhc-btn--ghost:hover {
	border-color: rgba(42, 40, 36, .4) !important;
	background: #f3efe8 !important;
}

/* ---- beállító panel ---- */
#fhc-root .fhc-modal {
	pointer-events: auto;
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(30, 28, 24, .42);
	animation: fhc-fade .2s ease both;
}
#fhc-root .fhc-modal[hidden] { display: none; }

#fhc-root .fhc-modal__box {
	width: 100%;
	max-width: 500px;
	max-height: 88vh;
	overflow-y: auto;
	background: var(--fhc-bg);
	color: var(--fhc-ink);
	border-radius: var(--fhc-radius);
	box-shadow: var(--fhc-shadow);
	animation: fhc-rise .28s cubic-bezier(.22, .61, .36, 1) both;
}

#fhc-root .fhc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 12px;
}
#fhc-root .fhc-modal__title {
	margin: 0 !important;
	font-size: 17px !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: var(--fhc-ink) !important;
}
#fhc-root .fhc-modal__close {
	background: none !important;
	border: 0 !important;
	font-size: 26px !important;
	line-height: 1 !important;
	color: var(--fhc-muted) !important;
	cursor: pointer;
	padding: 0 4px !important;
	width: auto;
}
#fhc-root .fhc-modal__close:hover { color: var(--fhc-ink) !important; }

#fhc-root .fhc-modal__list {
	padding: 4px 24px 8px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

#fhc-root .fhc-cat {
	padding: 16px 0;
	border-top: 1px solid var(--fhc-border);
}
#fhc-root .fhc-cat:first-child { border-top: 0; }

#fhc-root .fhc-cat__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
#fhc-root .fhc-cat__name {
	font-size: 14.5px !important;
	font-weight: 600 !important;
	color: var(--fhc-ink) !important;
}
#fhc-root .fhc-cat__desc {
	margin: 7px 0 0 !important;
	font-size: 12.5px !important;
	line-height: 1.55 !important;
	font-weight: 400 !important;
	color: var(--fhc-muted) !important;
}

#fhc-root .fhc-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 12px 24px 22px;
}
#fhc-root .fhc-modal__actions .fhc-btn--primary { margin-left: auto; }

/* ---- kapcsoló ---- */
#fhc-root .fhc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
}
#fhc-root .fhc-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}
#fhc-root .fhc-slider {
	position: absolute;
	inset: 0;
	background: #d7d1c6;
	border-radius: 999px;
	transition: background .2s ease;
}
#fhc-root .fhc-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
	transition: transform .2s ease;
}
#fhc-root .fhc-switch input:checked + .fhc-slider { background: var(--fhc-accent); }
#fhc-root .fhc-switch input:checked + .fhc-slider::before { transform: translateX(18px); }
#fhc-root .fhc-switch--locked .fhc-slider { background: var(--fhc-accent); opacity: .55; }
#fhc-root .fhc-switch--locked input { cursor: not-allowed; }

/* ---- újranyitó gomb ---- */
#fhc-reopen.fhc-reopen {
	position: fixed;
	bottom: 20px;
	z-index: 999998;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--fhc-border);
	background: var(--fhc-bg) !important;
	color: var(--fhc-accent) !important;
	box-shadow: 0 8px 24px rgba(42, 40, 36, .18);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
#fhc-reopen.fhc-reopen[hidden] { display: none; }
#fhc-reopen.fhc-reopen:hover { transform: translateY(-2px); }
#fhc-reopen.fhc-pos-bottom-right { right: 20px; }
#fhc-reopen.fhc-pos-bottom-left,
#fhc-reopen.fhc-pos-bottom-center { left: 20px; }

/* ---- animációk ---- */
@keyframes fhc-rise {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes fhc-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	#fhc-root .fhc-bar,
	#fhc-root .fhc-modal,
	#fhc-root .fhc-modal__box { animation: none; }
}

/* ---- mobil ---- */
@media (max-width: 600px) {
	#fhc-root.fhc-root { bottom: 12px; padding: 0 12px; }
	#fhc-root .fhc-bar { padding: 18px; border-radius: 14px; }
	#fhc-root .fhc-bar__actions { gap: 8px; }
	#fhc-root .fhc-btn { flex: 1 1 auto; text-align: center; padding: 12px 14px; }
	#fhc-root .fhc-btn--primary { margin-left: 0; }
	#fhc-root .fhc-modal__actions .fhc-btn { flex: 1 1 auto; }
	#fhc-root .fhc-modal__actions .fhc-btn--primary { margin-left: 0; }
}
