/*
 * Atelier Studio accessibility layer.
 * Structural rules deliberately avoid Avia column widths and positioning.
 */

:root {
	--atelier-focus: #005fcc;
	--atelier-focus-offset: #ffffff;
	--atelier-link: #174f87;
	--atelier-error: #a21b1b;
	--atelier-success: #166534;
}

html {
	scroll-padding-top: 8rem;
	scroll-padding-bottom: 5rem;
}

:target,
:where(a, button, input, select, textarea, summary, [tabindex]):focus {
	scroll-margin-top: 8rem;
	scroll-margin-bottom: 5rem;
}

.screen-reader-text,
.avia_hidden_link_text {
	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;
	white-space: nowrap !important;
	border: 0 !important;
}

.screen-reader-text:focus,
.avia_hidden_link_text:focus {
	z-index: 100000;
	top: 0.5rem;
	left: 0.5rem;
	width: auto !important;
	height: auto !important;
	padding: 0.75rem 1rem !important;
	margin: 0 !important;
	overflow: visible !important;
	clip: auto !important;
	white-space: normal !important;
	color: #ffffff;
	background: #171512;
}

.atelier-skip-links {
	position: relative;
	z-index: 100001;
}

.atelier-skip-link {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	padding: 0.8rem 1rem;
	color: #ffffff !important;
	background: #171512;
	border: 2px solid #ffffff;
	border-radius: 0.2rem;
	font-weight: 700;
	text-decoration: underline;
	transform: translateY(-200%);
}

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

:where(
	a,
	button,
	input,
	select,
	textarea,
	summary,
	[role="button"],
	[role="tab"],
	[tabindex]:not([tabindex="-1"])
):focus-visible {
	outline: 3px solid var(--atelier-focus) !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 2px var(--atelier-focus-offset) !important;
}

:where(a, button, input, select, textarea, summary):focus:not(:focus-visible) {
	outline: none;
}

#main:focus {
	outline: none;
}

.entry-content a:not(.avia-button):not(.av-icon-char),
.comment_text a,
.textwidget a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 0.1em;
	text-underline-offset: 0.15em;
}

.entry-content a:hover,
.entry-content a:focus-visible,
.comment_text a:hover,
.comment_text a:focus-visible {
	text-decoration-thickness: 0.16em;
}

.current-menu-item > a,
.current_page_item > a,
[aria-current="page"] {
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 0.12em;
	text-underline-offset: 0.2em;
}

.main_menu .menu-item-has-children:focus-within > .sub-menu,
.main_menu .menu-item-mega-parent:focus-within > .avia_mega_div {
	display: block;
	visibility: visible;
	opacity: 1;
}

:where(
	button,
	input[type="button"],
	input[type="submit"],
	input[type="reset"],
	.avia-button,
	.av-burger-menu-main > a,
	.mfp-close,
	.avia-slideshow-arrows a,
	.avia-slideshow-dots a,
	[role="button"],
	[role="tab"]
) {
	min-width: 2.75rem;
	min-height: 2.75rem;
}

input,
select,
textarea,
button {
	font-size: max(1rem, 16px);
}

label {
	display: inline-block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
	max-width: 100%;
	border-width: 2px;
}

[aria-invalid="true"],
.error input,
.error select,
.error textarea {
	border-color: var(--atelier-error) !important;
	box-shadow: 0 0 0 1px var(--atelier-error);
}

.avia-form-error,
.av-fields-with-error {
	padding: 0.75rem 1rem;
	color: #681313;
	background: #fff2f2;
	border: 2px solid var(--atelier-error);
}

.avia-form-success,
[role="status"].ajaxresponse:not(.avia-form-error) {
	color: #0f4b27;
}

img,
svg,
video,
canvas,
iframe {
	max-width: 100%;
}

img,
video {
	height: auto;
}

p,
li,
dd,
dt,
figcaption,
blockquote {
	overflow-wrap: anywhere;
}

pre,
code {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

table {
	max-width: 100%;
}

.atelier-table-scroll {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.atelier-post-date-stamp {
	clear: both;
	margin: clamp(2rem, 5vw, 4rem) 0 0;
	padding-top: 1rem;
	border-top: 1px solid currentColor;
	font-size: 0.9375rem;
	line-height: 1.6;
	opacity: 0.82;
}

[hidden] {
	display: none !important;
}

.mfp-wrap[role="dialog"] {
	outline: none;
}

body.atelier-modal-open {
	overflow: hidden;
}

@media only screen and (max-width: 767px), (max-width: 20rem) {
	html {
		scroll-padding-top: 6rem;
	}

	:target,
	:where(a, button, input, select, textarea, summary, [tabindex]):focus {
		scroll-margin-top: 6rem;
	}

	.responsive #top #wrap_all .container {
		width: min(92%, calc(100% - 1.5rem));
		max-width: 100%;
	}

	.responsive #top .flex_column,
	.responsive #top .av_one_full,
	.responsive #top .av_one_half,
	.responsive #top .av_one_third,
	.responsive #top .av_two_third,
	.responsive #top .av_one_fourth,
	.responsive #top .av_three_fourth,
	.responsive #top .av_one_fifth,
	.responsive #top .av_two_fifth,
	.responsive #top .av_three_fifth,
	.responsive #top .av_four_fifth {
		max-width: 100%;
	}

	.avia-table,
	table {
		font-size: 0.95rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto !important;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0ms !important;
	}

	.avia_transform .avia_start_animation,
	.avia_transform .avia_start_delayed_animation,
	.avia_animate_when_visible,
	.avia_animate_when_almost_visible,
	.av-animated-generic {
		opacity: 1 !important;
		transform: none !important;
	}

	.parallax-section,
	.av-parallax,
	.av-parallax-inner {
		background-attachment: scroll !important;
		transform: none !important;
	}
}

@media (forced-colors: active) {
	:where(
		a,
		button,
		input,
		select,
		textarea,
		summary,
		[role="button"],
		[role="tab"]
	):focus-visible {
		outline: 3px solid Highlight !important;
		box-shadow: none !important;
	}

	.current-menu-item > a,
	.current_page_item > a,
	[aria-current="page"] {
		border-bottom: 2px solid currentColor;
	}
}

@media (prefers-contrast: more) {
	body {
		color: #000000;
	}
}
