/*
 * DL3FTZ – Handy-Menü für Twenty Eleven
 *
 * Bis 800 px Breite (Handy, kleines Tablet):
 * - Menü-Knopf "☰ Menü" klappt das Hauptmenü auf und zu.
 * - Pfeil-Knöpfe öffnen Untermenüs per Antippen statt per Maus-Hover.
 * - Suchfeld im Kopf liegt nicht mehr über dem Logo.
 * Über 800 px bleibt alles wie bei Twenty Eleven.
 */

.menu-toggle,
.submenu-toggle {
	display: none;
}

@media (max-width: 800px) {

	/* Menüleiste */
	#access {
		clear: both;
	}

	#access div {
		margin: 0;
	}

	#access .menu-toggle {
		display: block;
		width: 100%;
		margin: 0;
		padding: 0 1.2em;
		line-height: 3.333em;
		font-size: 15px;
		font-weight: bold;
		text-align: left;
		color: #eee;
		background: transparent;
		border: 0;
		cursor: pointer;
	}

	#access .menu-toggle:focus-visible,
	#access .submenu-toggle:focus-visible {
		outline: 2px solid #eee;
		outline-offset: -2px;
	}

	/* Hauptmenü: zu, bis der Knopf gedrückt wird */
	#access div > ul {
		display: none;
		margin: 0;
		padding: 0;
		font-size: 15px;
	}

	#access.toggled-on div > ul {
		display: block;
	}

	/* Menüpunkte untereinander, große Tippflächen */
	#access li {
		float: none;
		display: block;
		position: relative;
	}

	#access a,
	#access ul ul a {
		display: block;
		float: none;
		width: auto;
		height: auto;
		padding: 0.8em 3.6em 0.8em 1.2em;
		line-height: 1.5;
		font-size: inherit;
		color: #eee;
		background: transparent;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		border-bottom: 0;
	}

	#access li:hover > a,
	#access ul ul :hover > a,
	#access a:focus {
		background: rgba(255, 255, 255, 0.08);
		color: #fff;
	}

	/* Untermenüs: eingerückt unter dem Eltern-Punkt statt als Aufklapp-Box */
	#access ul ul {
		position: static;
		float: none;
		width: auto;
		margin: 0;
		font-size: 14px;
		box-shadow: none;
		-webkit-box-shadow: none;
		background: rgba(0, 0, 0, 0.3);
	}

	#access ul ul ul {
		left: auto;
		top: auto;
	}

	#access ul ul a {
		padding-left: 2.4em;
	}

	#access ul ul ul a {
		padding-left: 3.6em;
	}

	/* Untermenüs öffnen nur per Antippen des Pfeils, nicht per Hover */
	#access ul li:hover > ul.sub-menu,
	#access ul li:hover > ul.children {
		display: none;
	}

	#access ul li.submenu-open > ul.sub-menu,
	#access ul li.submenu-open > ul.children {
		display: block;
	}

	/* Pfeil-Knopf rechts neben Menüpunkten mit Untermenü */
	#access .submenu-toggle {
		display: block;
		position: absolute;
		right: 0;
		top: 0;
		width: 3.4em;
		height: calc(3.1em + 1px);
		margin: 0;
		padding: 0;
		font-size: inherit;
		line-height: 1;
		color: #eee;
		background: transparent;
		border: 0;
		border-left: 1px solid rgba(255, 255, 255, 0.1);
		cursor: pointer;
	}

	#access .submenu-toggle span {
		display: inline-block;
		width: 0.45em;
		height: 0.45em;
		margin-top: -0.3em;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		transition: transform 0.2s;
	}

	#access li.submenu-open > .submenu-toggle span {
		margin-top: 0.2em;
		transform: rotate(-135deg);
	}

	/* Suchfeld im Kopf: unter das Logo statt darüber */
	#branding #searchform {
		position: static;
		float: none;
		width: auto;
		max-width: none;
		margin: 0.6em 1.2em;
		text-align: left;
	}

	#branding #searchform input#s,
	#branding #searchform input#s:focus {
		float: none;
		width: 100%;
		max-width: none;
		box-sizing: border-box;
	}
}
