/*
 * ONEGENT theme fixes
 *
 * Small, maintainable overrides for the compiled legacy theme CSS.
 * Keep this file loaded after style.css / felslaw.css.
 */

/* Make copied/selected text visible on the beige page background. */
::-moz-selection {
	background: #001937;
	color: #fff;
	text-shadow: none;
}

/* Banner-less consent setup: keep Mapbox blocked and the preferences dialog available. */
.mhcookie-banner {
	display: none !important;
}

::selection {
	background: #001937;
	color: #fff;
	text-shadow: none;
}

/* Restore a visible keyboard focus after the legacy global outline reset. */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: 3px solid #e1dcd7 !important;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #001937;
}

/* Keep form labels available to assistive technology without changing the design. */
.onegent-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.quick-help-privacy {
	margin: 1rem 0 0;
	color: rgba(225, 220, 215, 0.85);
	font-size: 0.7rem;
	line-height: 1.5;
}

.quick-help-privacy a {
	color: #e1dcd7;
	text-transform: none;
}

.help-overlay .step-indicator {
	color: #e1dcd7;
	font-weight: 700;
}

/* Keep the skip link hidden until it receives keyboard focus. */
.skip-link {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1000000000;
	padding: 0.75rem 1rem;
	background: #001937;
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	transform: translateY(calc(-100% - 1rem));
	transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
	transform: translateY(0);
}

#barba-wrapper {
	scroll-margin-top: 6rem;
}

#barba-wrapper:focus {
	outline: none;
}

/* Enlarge controls without visually enlarging the pagination dots. */
.swiper-start .swiper-start-pagination .swiper-pagination-bullet {
	min-width: 24px;
	align-items: center;
}

.swiper-galerie .swiper-galerie-pagination .swiper-pagination-bullet,
.swiper-juristen-pagination .swiper-pagination-bullet {
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0;
	background: transparent;
}

.swiper-galerie .swiper-galerie-pagination .swiper-pagination-bullet::before,
.swiper-juristen-pagination .swiper-pagination-bullet::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
	transform: translate(-50%, -50%);
}

.swiper-galerie .swiper-galerie-pagination .swiper-pagination-bullet-active::before,
.swiper-juristen-pagination .swiper-pagination-bullet-active::before {
	background: #001937;
}

/* Override the more specific legacy inline-link rules and keep targets usable. */
footer .legal-nav a,
footer p a,
.nav-main .nav-main-unten a,
.nav-main .nav-main-unten p a,
.kontakt-daten li a {
	min-height: 24px;
	display: inline-flex;
	align-items: center;
}

/* Preserve the 20 px close icon inside a 44 px pointer target. */
.overlay .close-overlay {
	width: 44px;
	height: 44px;
}

.overlay .close-overlay::before,
.overlay .close-overlay::after {
	left: 12px;
	width: 20px;
}

/* Keep custom radio controls keyboard accessible and visibly focused. */
.radio-option input[type="radio"] {
	position: absolute;
	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;
}

.radio-option input[type="radio"]:focus-visible ~ .radio-circle {
	outline: 3px solid #e1dcd7;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #001937;
}

/* Mapbox requires its attribution controls to remain visible. */
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
	display: block;
}

/* Show the floating header background early enough on the homepage. */
body.home.scrolled-small:not(.nav-is-open):not(.help-is-open) header::after {
	height: 100%;
}

body.home.scrolled-small:not(.nav-is-open):not(.help-is-open) header .logo svg {
	fill: #001937;
}

/* Local background for the blocked Mapbox consent placeholder. */
#map {
	position: relative;
	overflow: hidden;
	background: #e1dcd7 url('../images/mapbox-placeholder-klagenfurt.webp') center / cover no-repeat;
}

#map > iframe[src^="blob:"] {
	display: none !important;
}

.onegent-map-consent {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 2rem;
	background: rgba(0, 25, 55, 0.88);
	color: #e1dcd7;
	text-align: center;
}

.onegent-map-consent p {
	max-width: 38rem;
	margin: 0;
}

.onegent-map-consent-title {
	font-size: 1.25rem;
	font-weight: 700;
}

.onegent-map-consent a {
	color: inherit;
	text-decoration: underline;
}

.onegent-map-consent-button {
	min-height: 44px;
	padding: 0.65rem 1.5rem;
	border: 1px solid #e1dcd7;
	border-radius: 5px;
	background: #e1dcd7;
	color: #001937;
	cursor: pointer;
	font: inherit;
}

.onegent-map-consent-button:disabled {
	cursor: wait;
	opacity: 0.75;
}

@media only screen and (max-width: 1199px) {
	body.home.scrolled-small:not(.nav-is-open):not(.help-is-open) .nav-trigger {
		color: #001937 !important;
	}
}

/* Keep the privacy policy typography independent from the legacy theme headings. */
body.page-id-20 .onegent-all-legal-texts {
	line-height: 1.65;
}

body.page-id-20 .onegent-all-legal-texts .onegent-legal-text {
	margin-left: 0 !important;
}

body.page-id-20 .onegent-all-legal-texts .main-item {
	margin-top: 4rem;
	margin-bottom: 1.5rem;
}

body.page-id-20 .onegent-all-legal-texts .main-item:first-child {
	margin-top: 0;
}

body.page-id-20 .onegent-all-legal-texts .sub-item {
	margin-top: 2.5rem;
}

body.page-id-20 .onegent-all-legal-texts h2,
body.page-id-20 .onegent-all-legal-texts h3,
body.page-id-20 .onegent-all-legal-texts h4 {
	max-width: none;
	margin: 0;
}

body.page-id-20 .onegent-all-legal-texts h2 {
	margin-bottom: 1.5rem;
}

body.page-id-20 .onegent-all-legal-texts h3 {
	margin-bottom: 1rem;
}

body.page-id-20 .onegent-all-legal-texts h4 {
	margin-top: 1.75rem;
	margin-bottom: 0.5rem;
	font-size: 1rem;
	line-height: 1.45;
}

body.page-id-20 h4+p,
body.page-id-20 .h4+p {
	margin-top: 0 !important;
}

body.page-id-20 .onegent-all-legal-texts p {
	margin: 0 0 1rem;
}

body.page-id-20 .onegent-all-legal-texts p:last-child {
	margin-bottom: 0;
}

body.page-id-20 .onegent-all-legal-texts ul {
	margin-top: 1rem;
	margin-bottom: 1rem;
}

body.page-id-20 .onegent-all-legal-texts li + li {
	margin-top: 0.5rem;
}

@media only screen and (max-width: 991px) {
	body.page-id-20 .onegent-all-legal-texts .main-item {
		margin-top: 3rem;
	}

	body.page-id-20 .onegent-all-legal-texts .sub-item {
		margin-top: 2rem;
	}
}
