/**
 * SOFTNET Digital Menu Widget – Basis-Styles
 * Entwickelt von SOFTNET Digital Agentur – https://digital.softnet.at
 */

.softnet-menu {
	position: relative;
	width: 100%;
}

.softnet-menu__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: var(--softnet-toggle-gap, 6px);
	width: var(--softnet-toggle-width, 50px);
	padding: var(--softnet-toggle-padding, 10px);
	border: var(--softnet-toggle-border-width, 0) solid var(--softnet-toggle-border-color, transparent);
	border-radius: var(--softnet-toggle-radius, 0);
	background: var(--softnet-toggle-bg, transparent);
	color: var(--softnet-toggle-color, #333);
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.softnet-menu__toggle:hover,
.softnet-menu__toggle:focus {
	color: var(--softnet-toggle-hover-color, var(--softnet-toggle-color, #333));
	background: var(--softnet-toggle-hover-bg, var(--softnet-toggle-bg, transparent));
	border-color: var(--softnet-toggle-hover-border-color, var(--softnet-toggle-border-color, transparent));
	outline: none;
}

.softnet-menu__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.softnet-menu__toggle-line {
	display: block;
	width: 100%;
	height: var(--softnet-toggle-line-height, 4px);
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.softnet-menu.is-open .softnet-menu__toggle--icon-1 .softnet-menu__toggle-line:nth-child(1) {
	transform: translateY(calc(var(--softnet-toggle-gap, 6px) + var(--softnet-toggle-line-height, 4px))) rotate(45deg);
}

.softnet-menu.is-open .softnet-menu__toggle--icon-1 .softnet-menu__toggle-line:nth-child(2) {
	opacity: 0;
}

.softnet-menu.is-open .softnet-menu__toggle--icon-1 .softnet-menu__toggle-line:nth-child(3) {
	transform: translateY(calc(-1 * (var(--softnet-toggle-gap, 6px) + var(--softnet-toggle-line-height, 4px)))) rotate(-45deg);
}

/* Icon 2: 2 Linien → X */
.softnet-menu.is-open .softnet-menu__toggle--icon-2 .softnet-menu__toggle-line:nth-child(1) {
	transform: translateY(calc(var(--softnet-toggle-gap, 6px) + var(--softnet-toggle-line-height, 4px))) rotate(45deg);
}

.softnet-menu.is-open .softnet-menu__toggle--icon-2 .softnet-menu__toggle-line:nth-child(2) {
	transform: translateY(calc(-1 * (var(--softnet-toggle-gap, 6px) + var(--softnet-toggle-line-height, 4px)))) rotate(-45deg);
}

/* Icon 3: Plus → Kreuz */
.softnet-menu__toggle--icon-3 .softnet-menu__toggle-icon {
	position: relative;
	width: 100%;
	height: calc(var(--softnet-toggle-line-height, 4px) * 2 + var(--softnet-toggle-gap, 6px));
}

.softnet-menu__toggle--icon-3 .softnet-menu__toggle-line--vertical {
	position: absolute;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
}

.softnet-menu.is-open .softnet-menu__toggle--icon-3 .softnet-menu__toggle-line:nth-child(1) {
	transform: rotate(45deg);
}

.softnet-menu.is-open .softnet-menu__toggle--icon-3 .softnet-menu__toggle-line--vertical {
	transform: translateY(-50%) rotate(-45deg);
}

/* Icon 4: Kebab-Punkte */
.softnet-menu__toggle--icon-4 .softnet-menu__toggle-icon {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 100%;
}

.softnet-menu__toggle-dot {
	display: block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.softnet-menu.is-open .softnet-menu__toggle--icon-4 .softnet-menu__toggle-dot:nth-child(1) {
	transform: translateY(10px);
	opacity: 0;
}

.softnet-menu.is-open .softnet-menu__toggle--icon-4 .softnet-menu__toggle-dot:nth-child(3) {
	transform: translateY(-10px);
	opacity: 0;
}

.softnet-menu__toggle--align-left {
	margin-right: auto;
	margin-left: 0;
}

.softnet-menu__toggle--align-center {
	margin-left: auto;
	margin-right: auto;
}

.softnet-menu__toggle--align-right {
	margin-left: auto;
	margin-right: 0;
}

.softnet-menu__panel {
	width: 100%;
}

/* Mobil: scrollbares Dropdown wenn Inhalt länger als der Viewport */
@media (max-width: 1024px) {
	.softnet-menu--show-tablet.softnet-menu--mobile-hamburger {
		position: relative;
		z-index: 1000;
	}

	.softnet-menu--show-tablet.softnet-menu--mobile-hamburger.is-open .softnet-menu__panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 1001;
		max-height: var(--softnet-menu-panel-max-height, min(70vh, calc(100dvh - 6rem)));
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		touch-action: pan-y;
	}
}

@media (max-width: 767px) {
	.softnet-menu--show-mobile.softnet-menu--mobile-hamburger {
		position: relative;
		z-index: 1000;
	}

	.softnet-menu--show-mobile.softnet-menu--mobile-hamburger.is-open .softnet-menu__panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 1001;
		max-height: var(--softnet-menu-panel-max-height, min(70vh, calc(100dvh - 6rem)));
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		touch-action: pan-y;
	}
}

.softnet-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
}

/* Fallback, wenn keine Elementor-Flex-Werte gesetzt sind (bestehende Inhalte). */
.softnet-menu--layout-horizontal .softnet-menu__list {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
}

.softnet-menu--layout-vertical .softnet-menu__list {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	justify-content: flex-start;
}

.softnet-menu__list > li {
    position: relative;
    margin: 0;
    display: inline-block;
    width: 100%;
}

.softnet-menu--sub-indicators .menu-item-has-children {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.softnet-menu--sub-indicators .menu-item-has-children > a {
	flex: 1 1 auto;
}

.softnet-menu--sub-indicators .menu-item-has-children > .sub-menu {
	flex: 0 0 100%;
	width: 100%;
}

.softnet-menu__sub-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: calc(var(--softnet-sub-icon-size, 14px) + 16px);
	height: calc(var(--softnet-sub-icon-size, 14px) + 16px);
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.softnet-menu__sub-toggle:hover,
.softnet-menu__sub-toggle:focus {
	outline: none;
	opacity: 0.75;
}

.softnet-menu__sub-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.softnet-menu__sub-icon {
	display: block;
	width: var(--softnet-sub-icon-size, 14px);
	height: var(--softnet-sub-icon-size, 14px);
	position: relative;
}

.softnet-menu__sub-icon--chevron::before {
	content: "";
	position: absolute;
	top: 25%;
	left: 20%;
	width: 60%;
	height: 60%;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.softnet-menu__sub-icon--arrow::before {
	content: "";
	position: absolute;
	top: 30%;
	left: 10%;
	width: 70%;
	height: 70%;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.softnet-menu__sub-icon--plus::before,
.softnet-menu__sub-icon--plus::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: currentColor;
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease;
}

.softnet-menu__sub-icon--plus::before {
	width: 80%;
	height: 2px;
}

.softnet-menu__sub-icon--plus::after {
	width: 2px;
	height: 80%;
}

.menu-item-has-children.is-sub-open > .softnet-menu__sub-toggle .softnet-menu__sub-icon--chevron::before {
	transform: rotate(225deg);
}

.menu-item-has-children.is-sub-open > .softnet-menu__sub-toggle .softnet-menu__sub-icon--plus::after {
	transform: translate(-50%, -50%) rotate(90deg);
	opacity: 0;
}

.softnet-menu--layout-vertical.softnet-menu--sub-indicators .menu-item-has-children > .softnet-menu__sub-toggle {
	display: inline-flex;
}

.softnet-menu__list a {
	display: block;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.softnet-menu__list .sub-menu {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
}

.softnet-menu--layout-horizontal .softnet-menu__list > li:hover > .sub-menu,
.softnet-menu--layout-horizontal .softnet-menu__list > li:focus-within > .sub-menu {
	display: block;
}

.softnet-menu--layout-vertical .softnet-menu__list > li.is-sub-open > .sub-menu {
	display: block;
}

.softnet-menu--layout-horizontal .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	z-index: 100;
}

.softnet-menu--layout-vertical .sub-menu {
	padding-left: 1em;
}

.softnet-menu--highlight-active .current-menu-item > a,
.softnet-menu--highlight-active .current-menu-ancestor > a {
	font-weight: 600;
}

.softnet-menu--mobile-stretch-full .softnet-menu__panel.is-mobile-visible {
	width: 100%;
}

.softnet-menu--mobile-align-left .softnet-menu__panel.is-mobile-visible .softnet-menu__list {
	align-items: flex-start;
	text-align: left;
}

.softnet-menu--mobile-align-center .softnet-menu__panel.is-mobile-visible .softnet-menu__list {
	align-items: center;
	text-align: center;
}

.softnet-menu--mobile-align-right .softnet-menu__panel.is-mobile-visible .softnet-menu__list {
	align-items: flex-end;
	text-align: right;
}

/* Hamburger-Modus: Menü unter Breakpoint einklappen */
@media (max-width: 1024px) {
	.softnet-menu--show-tablet.softnet-menu--mobile-hamburger .softnet-menu__toggle {
		display: flex;
	}

	.softnet-menu--show-tablet.softnet-menu--mobile-hamburger .softnet-menu__panel {
		display: none;
	}

	.softnet-menu--show-tablet.softnet-menu--mobile-hamburger.is-open .softnet-menu__panel {
		display: block;
	}

	.softnet-menu--show-tablet.softnet-menu--mobile-hamburger .softnet-menu__list {
		flex-direction: column;
		align-items: stretch;
	}

	.softnet-menu--show-tablet.softnet-menu--mobile-hamburger .sub-menu {
		position: static;
		box-shadow: none;
	}

	.softnet-menu--show-tablet.softnet-menu--mobile-hamburger .softnet-menu__list > li.is-sub-open > .sub-menu {
		display: block;
	}

	.softnet-menu--show-tablet.softnet-menu--mobile-text .softnet-menu__list {
		flex-direction: column;
		align-items: stretch;
	}

	.softnet-menu--show-tablet.softnet-menu--mobile-text .sub-menu {
		position: static;
		box-shadow: none;
	}

	.softnet-menu--show-tablet.softnet-menu--sub-indicators .menu-item-has-children > .softnet-menu__sub-toggle {
		display: inline-flex;
	}
}

@media (max-width: 767px) {
	.softnet-menu--show-mobile.softnet-menu--mobile-hamburger .softnet-menu__toggle {
		display: flex;
	}

	.softnet-menu--show-mobile.softnet-menu--mobile-hamburger .softnet-menu__panel {
		display: none;
	}

	.softnet-menu--show-mobile.softnet-menu--mobile-hamburger.is-open .softnet-menu__panel {
		display: block;
	}

	.softnet-menu--show-mobile.softnet-menu--mobile-hamburger .softnet-menu__list {
		flex-direction: column;
		align-items: stretch;
	}

	.softnet-menu--show-mobile.softnet-menu--mobile-hamburger .sub-menu {
		position: static;
		box-shadow: none;
	}

	.softnet-menu--show-mobile.softnet-menu--mobile-hamburger .softnet-menu__list > li.is-sub-open > .sub-menu {
		display: block;
	}

	.softnet-menu--show-mobile.softnet-menu--mobile-text .softnet-menu__list {
		flex-direction: column;
		align-items: stretch;
	}

	.softnet-menu--show-mobile.softnet-menu--mobile-text .sub-menu {
		position: static;
		box-shadow: none;
	}

	.softnet-menu--show-mobile.softnet-menu--sub-indicators .menu-item-has-children > .softnet-menu__sub-toggle {
		display: inline-flex;
	}
}
