/* ProFalat Cookie – minimalista süti-sáv
   A gomb- és kulcsstílusok ID-vel felspecifikálva + !important, hogy a téma
   (Elementor / profalat.hu) saját button-stílusai ne írják felül. */

.profalat-cookie {
	--pfc-accent: #E2231A;
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 99999;
	max-width: 1080px;
	margin: 0 auto;
	background: #ffffff;
	color: #1d1d1d;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	border: 1px solid rgba(0, 0, 0, 0.06);
	font-family: inherit;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.profalat-cookie.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.profalat-cookie__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 16px 20px;
	flex-wrap: wrap;
}

.profalat-cookie__content {
	flex: 1 1 340px;
}

.profalat-cookie__title {
	display: block;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	margin-bottom: 4px;
}

.profalat-cookie__text {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

.profalat-cookie__link {
	color: var(--pfc-accent);
	text-decoration: underline;
	white-space: nowrap;
}

.profalat-cookie__actions {
	display: flex;
	gap: 8px;
	flex: 0 0 auto;
	flex-wrap: wrap;
}

/* --- Gombok (témavédett) --- */
#profalat-cookie .profalat-cookie__btn,
#profalat-cookie-modal .profalat-cookie__btn {
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	cursor: pointer !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: normal !important;
	padding: 7px 14px !important;
	border-radius: 6px !important;
	border: 1px solid transparent !important;
	box-shadow: none !important;
	text-shadow: none !important;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

#profalat-cookie .profalat-cookie__btn--accept,
#profalat-cookie-modal .profalat-cookie__btn--accept {
	background: var(--pfc-accent) !important;
	color: #ffffff !important;
	border-color: var(--pfc-accent) !important;
}

#profalat-cookie .profalat-cookie__btn--accept:hover,
#profalat-cookie-modal .profalat-cookie__btn--accept:hover {
	filter: brightness(0.92);
}

#profalat-cookie .profalat-cookie__btn--ghost,
#profalat-cookie-modal .profalat-cookie__btn--ghost {
	background: transparent !important;
	color: #4a4a4a !important;
	border-color: rgba(0, 0, 0, 0.2) !important;
}

#profalat-cookie .profalat-cookie__btn--ghost:hover,
#profalat-cookie-modal .profalat-cookie__btn--ghost:hover {
	border-color: var(--pfc-accent) !important;
	color: var(--pfc-accent) !important;
}

#profalat-cookie .profalat-cookie__btn:focus-visible,
#profalat-cookie-modal .profalat-cookie__btn:focus-visible {
	outline: 2px solid var(--pfc-accent) !important;
	outline-offset: 2px !important;
}

/* --- Beállító ablak (kategóriák) --- */
.profalat-cookie-modal {
	--pfc-accent: #E2231A;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.profalat-cookie-modal.is-visible {
	opacity: 1;
}

.profalat-cookie-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.profalat-cookie-modal__card {
	position: relative;
	background: #ffffff;
	color: #1d1d1d;
	width: 100%;
	max-width: 460px;
	max-height: 85vh;
	overflow-y: auto;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	padding: 22px;
	transform: translateY(8px);
	transition: transform 0.25s ease;
}

.profalat-cookie-modal.is-visible .profalat-cookie-modal__card {
	transform: translateY(0);
}

.profalat-cookie-modal__title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 700;
}

.profalat-cookie-cat {
	padding: 12px 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.profalat-cookie-cat:first-child {
	border-top: 0;
}

.profalat-cookie-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.profalat-cookie-cat__label {
	font-size: 14px;
	font-weight: 600;
}

.profalat-cookie-cat__desc {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #555;
}

.profalat-cookie-modal__actions {
	display: flex;
	gap: 8px;
	margin-top: 18px;
	flex-wrap: wrap;
}

.profalat-cookie-modal__actions .profalat-cookie__btn {
	flex: 1 1 auto;
}

/* Kapcsoló (toggle) */
.profalat-cookie-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
}

.profalat-cookie-switch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.profalat-cookie-switch__slider {
	position: absolute;
	inset: 0;
	background: #cfcfcf;
	border-radius: 24px;
	transition: background 0.2s ease;
}

.profalat-cookie-switch__slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background: #ffffff;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

.profalat-cookie-switch input:checked + .profalat-cookie-switch__slider {
	background: var(--pfc-accent);
}

.profalat-cookie-switch input:checked + .profalat-cookie-switch__slider::before {
	transform: translateX(18px);
}

.profalat-cookie-switch input:disabled + .profalat-cookie-switch__slider {
	opacity: 0.6;
	cursor: not-allowed;
}

.profalat-cookie-switch input:focus-visible + .profalat-cookie-switch__slider {
	outline: 2px solid var(--pfc-accent);
	outline-offset: 2px;
}

/* --- Mobil --- */
@media (max-width: 600px) {
	.profalat-cookie {
		left: 10px;
		right: 10px;
		bottom: 10px;
		border-radius: 14px;
		max-height: calc(100vh - 20px);
		overflow-y: auto;
	}

	.profalat-cookie__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 16px;
	}

	.profalat-cookie__content {
		flex: none;
	}

	.profalat-cookie__title {
		font-size: 15px;
	}

	/* Elfogadom felül, teljes szélességben; alatta a két másodlagos gomb egy sorban. */
	.profalat-cookie__actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	#profalat-cookie .profalat-cookie__btn {
		width: 100% !important;
		padding: 11px 12px !important;
	}

	.profalat-cookie__btn--accept {
		grid-column: 1 / -1;
	}

	.profalat-cookie-modal__card {
		padding: 18px 16px;
		border-radius: 14px;
	}

	.profalat-cookie-modal__actions {
		flex-direction: column;
	}

	#profalat-cookie-modal .profalat-cookie-modal__actions .profalat-cookie__btn {
		width: 100% !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.profalat-cookie,
	.profalat-cookie-modal,
	.profalat-cookie-modal__card,
	.profalat-cookie-switch__slider,
	.profalat-cookie-switch__slider::before {
		transition: none;
	}
}
