/*
 * Akadálymentességi javítások (regec.hu, pliska-child). Lásd: proposals/vps2/regec-akadalymentesites.md
 */

/* ---------- T8: jól látható fókuszkeret minden háttéren (sárga + fekete kettős keret) ---------- */
:focus-visible {
	outline: 3px solid #ffd400 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #000 !important;
}
.screen-reader-text:focus {
	outline: 3px solid #ffd400 !important;
}

/* ---------- M1: almenükapcsolók ---------- */
.regec-almenu-kapcsolo {
	background: transparent;
	border: 0;
	color: inherit;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	min-width: 24px;
	min-height: 24px;
}
.regec-almenu-kapcsolo:hover,
.regec-almenu-kapcsolo:focus {
	background: transparent;
}
.regec-nyil::after {
	content: "▼";
	font-size: 11px;
	display: inline-block;
	transition: transform .2s;
}
li.is-open > .regec-almenu-kapcsolo .regec-nyil::after {
	transform: rotate(180deg);
}
.site-menu li.menu-item-has-children > a::after {
	content: none !important; /* a régi, 7 px-es jel helyett a gomb nyila látszik */
}

@media (min-width: 40em) {
	.site-menu li.menu-item-has-children {
		display: flex;
		align-items: center;
	}
	.site-menu > ul > li.menu-item-has-children > a {
		padding-right: 2px;
	}
	.site-menu .regec-almenu-kapcsolo {
		padding: 8px 10px 8px 4px;
		color: #fff;
	}
	.site-menu .regec-almenu-szulo {
		padding: 20px;
		white-space: nowrap;
	}
	.site-menu .regec-almenu-szulo .regec-nyil {
		margin-left: 6px;
	}
	.fixed-header .site-menu .regec-almenu-kapcsolo,
	.no-header-image .site-menu .regec-almenu-kapcsolo {
		color: #000;
	}
	/* almenün belül: a szürke háttér a teljes sorra, ▶ jellel */
	.site-menu ul ul li.menu-item-has-children {
		background-color: #d3d3d3;
	}
	.site-menu ul ul li.menu-item-has-children > a {
		width: 166px;
	}
	.site-menu ul ul .regec-almenu-kapcsolo,
	.fixed-header .site-menu ul ul .regec-almenu-kapcsolo {
		color: #3a3a3a;
		align-self: stretch;
		padding: 8px;
	}
	.site-menu ul ul .regec-almenu-szulo {
		width: 200px;
		padding: 16px;
		text-align: left;
		display: flex;
		justify-content: space-between;
	}
	.site-menu ul ul .regec-nyil::after {
		content: "▶";
	}
	.site-menu ul ul li.is-open > .regec-almenu-kapcsolo .regec-nyil::after {
		transform: none;
	}
	/* nyitás csak a kapcsolóra (és egérrel hoverre), fókuszra nem */
	.site-menu ul li.is-open > ul {
		left: auto;
	}
	.site-menu ul ul li.is-open > ul {
		left: 100%;
	}
	/* Esc-kel bezárt, egérrel lenyitott almenü (WCAG 1.4.13) */
	.site-menu ul li.esc-closed:not(.is-open) > ul {
		left: -999em;
	}
	/* T9: a bezárt almenü linkjei ne kapjanak fókuszt (a képernyőn kívülre tolt elem Tabbal elérhető maradna) */
	.site-menu ul ul {
		visibility: hidden;
	}
	.site-menu ul li:hover > ul,
	.site-menu ul li.is-open > ul {
		visibility: visible;
	}
	.site-menu ul li.esc-closed:not(.is-open) > ul {
		visibility: hidden;
	}
}

@media (max-width: 39.99em) {
	/* T9: a bezárt mobilmenü linkjei ne kapjanak fókuszt */
	.slide-menu {
		visibility: hidden;
	}
	.toggled .slide-menu {
		visibility: visible;
	}
	.slide-menu li.menu-item-has-children {
		position: relative;
	}
	.slide-menu .regec-almenu-kapcsolo {
		color: #fff;
		min-width: 44px;
		min-height: 44px;
	}
	.slide-menu li.menu-item-has-children > .regec-almenu-kapcsolo:not(.regec-almenu-szulo) {
		position: absolute;
		right: 0;
		top: 0;
	}
	.slide-menu .regec-almenu-szulo {
		width: 100%;
		text-align: left;
		padding: 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		line-height: 2em;
	}
}

/* ---------- T7: "vissza a tetejére" (fehér nyíl 6,6:1 kontraszttal) és a kereső gombja ---------- */
body a#back-to-top,
body a#back-to-top:focus {
	background: #1d6b1a;
	color: #fff;
	text-align: center;
	line-height: 1;
}
body a#back-to-top:hover {
	background: #124411;
}
#back-to-top svg {
	margin-top: 8px;
}
@media (min-width: 40em) {
	body .search-form button {
		background: #1d6b1a;
	}
}

/* ---------- T6b: Download Manager gombjai (fehér szöveg 6,1:1) ---------- */
.w3eden {
	--color-primary: #1f5fbf;
	--color-primary-rgb: 31, 95, 191;
	--color-primary-hover: #174a94;
	--color-primary-active: #174a94;
}

/* a Pliska sötét módjában a WPDM-táblázat sötét szövege a sötét háttéren eltűnne (1,06:1) */
.dark-mode .w3eden .table th,
.dark-mode .w3eden .table td,
.dark-mode .w3eden .table .small-txt {
	color: #f7f7f7;
}

/* ---------- A bejegyzéslista görgetésre beúszó, addig 25%-os átlátszóságú elemei ---------- */
.has-header-image.blog .hentry,
.has-header-image.archive .hentry,
.has-header-image.search .hentry {
	opacity: 1;
	transform: none;
}

/* ---------- T5, T6a, T8: sütitájékoztató ---------- */
.regec-suti {
	position: fixed;
	inset: auto 0 0 0;
	margin: 0;
	width: 100%;
	max-width: none;
	border: 0;
	padding: 1em 1.5em;
	background: #005a80; /* fehér szöveggel 7,6:1 */
	color: #fff;
	font-size: 1rem;
	line-height: 1.5;
	z-index: 100001;
}
.regec-suti::backdrop {
	background: rgba(0, 0, 0, .35);
}
.regec-suti:focus {
	outline: none;
}
.regec-suti-cim {
	font-size: 1.1rem;
	margin: 0 0 .25em;
	color: #fff;
}
.regec-suti p {
	margin: 0 0 .5em;
	max-width: 70em;
}
.regec-suti-gombok {
	display: flex;
	gap: 1.5em;
	align-items: center;
	flex-wrap: wrap;
}
.regec-suti button {
	background: #fff;
	color: #005a80; /* 7,6:1 */
	border: 2px solid #fff;
	border-radius: 4px;
	padding: .5em 1.25em;
	font-weight: 700;
	font-size: 1rem;
}
.regec-suti a,
.regec-suti a:visited,
.regec-suti a:hover {
	color: #fff;
	text-decoration: underline;
}

/* ---------- Lábléc-linkek (a Branda Footer Content helyett) ---------- */
.regec-lablec-menu {
	padding: 0 15px 28px;
	font-size: 15px;
	line-height: 1.6;
	color: #b3b3b3; /* "Powered by": 7,5:1 a #262626 láblécen */
}
.regec-lablec-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	row-gap: .35em;
}
.regec-lablec-menu li {
	margin: 0;
	padding: 0 .8em;
}
.regec-lablec-menu li + li {
	border-left: 1px solid #6b6b6b; /* elválasztó, csak vizuális */
}
#colophon .regec-lablec-menu a,
#colophon .regec-lablec-menu a:visited {
	font-size: inherit; /* a Pliska kisebb betűt ad a lábléc linkjeinek */
	color: #f5f5f5;
	text-decoration: underline;
	text-underline-offset: 3px;
}
#colophon .regec-lablec-menu a:focus-visible {
	/* a Pliska lábléc-fókuszstílusa helyett az egységes kettős keret (T8) */
	outline: 3px solid #ffd400 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #000 !important;
}
#colophon .regec-lablec-menu a:hover {
	color: #fff;
	text-decoration-thickness: 2px;
}
@media (max-width: 600px) {
	/* keskeny képernyőn egymás alá, elválasztó nélkül (ne kezdődjön sor elválasztóval) */
	.regec-lablec-menu ul {
		flex-direction: column;
		align-items: center;
	}
	.regec-lablec-menu li + li {
		border-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}
