/* ============================================
   Backend responsive: header & footer
   Usable down to iPhone 12 (390px)
   Triple_news / main content layout unchanged
   ============================================ */

/* Constrain whole page to viewport width (no horizontal overflow) */
/* Override layout_backend.css height:100% so html/body grow with content (avoids extra scrollable whitespace below footer) */
html {
	overflow-x: hidden !important;
	max-width: 100% !important;
	box-sizing: border-box;
	min-height: 100%;
	height: auto !important;
}
body {
	overflow-x: hidden !important;
	max-width: 100% !important;
	width: 100%;
	box-sizing: border-box;
	min-height: 100%;
	height: auto !important;
}

/* ---- Base: modern header wrapper (black/charcoal) ---- */
.service-header-wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
	background: #1a1a1a;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	z-index: 1000;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

#menudiv {
	height: auto;
	min-height: 44px;
	min-width: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

#jsddm {
	margin-left: 0;
	padding: 0 12px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	min-width: 0;
	max-width: 100%;
}

#jsddm > li {
	position: relative;
}

/* Desktop: dropdown submenu (hover to open); panel matches main menu #4b5563 */
#jsddm > li > ul {
	position: absolute;
	top: 100%;
	left: 0;
	display: none;
	list-style: none;
	margin: 0;
	padding: 4px 0 0 0; /* small bridge so hover doesn’t break when moving to submenu */
	min-width: 200px;
	background: #2a2a2a;
	box-shadow: 0 4px 12px rgba(0,0,0,0.25);
	border-radius: 0 0 6px 6px;
	z-index: 1001;
	border: 1px solid rgba(0,0,0,0.1);
}
#jsddm > li:hover > ul {
	display: block;
}
#jsddm > li > ul > li {
	margin: 0;
	padding: 0;
	border: 0;
}
#jsddm > li > ul > li > a {
	display: block;
	padding: 10px 16px;
	color: rgba(255,255,255,0.95);
	text-decoration: none;
	font-size: 0.9em;
	transition: background 0.15s ease, color 0.15s ease;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
#jsddm > li > ul > li:last-child > a {
	border-bottom: 0;
}
#jsddm > li > ul > li > a:hover {
	background: #333333;
	color: #fff;
}
#jsddm > li > ul > li.inactive > a {
	color: rgba(255,255,255,0.5);
}
#jsddm > li > ul > li.inactive > a:hover {
	color: rgba(255,255,255,0.75);
}

/* Submenu toggle: hidden on desktop (hover shows submenu) */
.service-sub-toggle {
	display: none;
	border: 0;
	background: transparent;
	color: rgba(255,255,255,0.9);
	width: 44px;
	height: 44px;
	min-width: 44px;
	padding: 0;
	cursor: pointer;
	font-size: 0.9em;
	align-items: center;
	justify-content: center;
	-webkit-tap-highlight-color: transparent;
	border-radius: 4px;
	transition: background 0.15s ease;
}
.service-sub-toggle:hover,
.service-sub-toggle:active {
	background: rgba(255,255,255,0.15);
	color: #fff;
}
.service-sub-toggle i {
	transition: transform 0.2s ease;
}
/* Chevron rotation when submenu is open */
#jsddm > li.service-sub-open > .service-sub-toggle i {
	transform: rotate(180deg);
}

/* Main menu items */
#jsddm > li > .header-block > a {
	padding: 10px 14px;
	display: block;
	font-size: 0.95em;
	color: rgba(255,255,255,0.95);
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: color 0.2s ease, background 0.2s ease;
	border-radius: 4px;
	max-width: 100%;
	box-sizing: border-box;
}

/* Allow menu labels to wrap so they don't break layout (override <nobr>) */
#jsddm > li > .header-block > a nobr {
	white-space: normal;
}

/* Hover and active states */
#jsddm > li > .header-block > a:hover,
#jsddm > li.active > .header-block > a {
	color: #fff;
	background: #333333;
}

/* Hamburger: hidden on desktop */
.service-nav-toggle {
	display: none;
	border: 0;
	background: rgba(255,255,255,0.15);
	color: #fff;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	margin: 0 0 0 auto;
	cursor: pointer;
	font-size: 1.25rem;
	border-radius: 4px;
	align-items: center;
	justify-content: center;
	-webkit-tap-highlight-color: transparent;
}

.service-nav-toggle:hover {
	background: rgba(255,255,255,0.25);
}

.service-nav-toggle[aria-expanded="true"] .fa-bars::before {
	content: "\f00d";
}

/* ---- Toolbar row: minimal flat style ---- */
div#navrighttop_div {
	min-height: 44px;
	min-width: 0;
	max-width: 100%;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	padding: 8px 16px;
	gap: 8px 12px;
	background: #f8f8f8;
	border: none;
	border-bottom: 1px solid #eee;
	box-shadow: none;
	margin: 0;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
	box-sizing: border-box;
}

div#navrighttop_surr {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.toolbar-group {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	padding: 0;
	border-radius: 0;
	box-shadow: none;
}

.toolbar-group:not(:first-child) {
	border-left: none;
	padding-left: 8px;
	margin-left: 8px;
	border-left: 1px solid #e0e0e0;
}

.seitenlinks_top {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.seitenlinks_top li {
	margin: 0 !important;
}

/* Toolbar: minimal flat button style */
#navrighttop_div .seitenlinks_top li a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	min-height: 32px;
	padding: 0 10px;
	border-radius: 6px;
	border: none;
	background: transparent;
	color: #555;
	font-size: 12px;
	transition: background 0.15s ease, color 0.15s ease;
	box-shadow: none;
	text-decoration: none;
}

#navrighttop_div .seitenlinks_top li a:hover {
	background: #e8e8e8;
	color: #333;
	text-decoration: none;
}

#navrighttop_div .seitenlinks_top li a i {
	margin-right: 0;
	font-size: 14px;
	opacity: 0.8;
}

#navrighttop_div .seitenlinks_top li a i:last-child {
	margin-right: 0;
}

#navrighttop_div .seitenlinks_top li.flagx a {
	padding: 4px 6px;
	min-width: 28px;
	justify-content: center;
}

#navrighttop_div .seitenlinks_top li.flagx a span {
	border-radius: 3px;
}

#navrighttop_div li.keyx a.userna {
	font-size: 12px;
	color: #666;
	font-weight: 500;
}

#navrighttop_div li.keyx a.userna:hover {
	color: #333;
}

#navrighttop_div li.keyx a[href*="dologout"] {
	padding: 0 8px;
	min-width: 28px;
}

.seitenlinks_top li.inactive span,
.seitenlinks_top li.live span {
	height: auto;
	min-height: 24px;
	padding: 4px 10px;
	border-radius: 12px;
	border: none;
	font-size: 11px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
}

.seitenlinks_top li.live span {
	background: #dcfce7;
	color: #166534;
	margin-left: 10px;
}

.seitenlinks_top li.inactive span {
	background: #fee2e2;
	color: #991b1b;
	margin-left: 10px;
}

/* Primary action in toolbar (e.g. "Ohne Kategorie" filter) */
#navrighttop_div ul.seitenlinks_top.ohnekat li a {
	background: #1a1a1a;
	color: #fff;
	border: none;
	padding: 6px 12px;
}

#navrighttop_div ul.seitenlinks_top.ohnekat li a:hover {
	background: #333333;
	color: #fff;
}

.flagx.round a {
	background: #fff !important;
	border-color: #dee2e6;
}

#logininfos_top {
	margin: 0 !important;
}

/* Search in toolbox */
#berichtsuche_wrap {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

#navrighttop_div #berichtsuche input[type="text"] {
	height: 30px;
	padding: 0 10px;
	border-radius: 4px;
	border: 1px solid #e5e5e5;
	background: #fff;
	font-size: 12px;
	min-width: 100px;
	box-sizing: border-box;
}

#navrighttop_div #berichtsuche .input_but {
	height: 30px;
	padding: 0 12px;
	border-radius: 4px;
	border: 1px solid #851309;
	background: #851309;
	color: #fff;
	font-size: 12px;
	box-sizing: border-box;
}

#navrighttop_div #berichtsuche .input_but:hover {
	background: #a01810;
	border-color: #a01810;
	color: #fff;
}

#navrighttop_div #berichtsuche .ergebnis a {
	border-radius: 4px;
	padding: 0 10px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	background: #f5f5f5;
	border: 1px solid #e5e5e5;
	text-decoration: none;
	color: #555;
}

#navrighttop_div #berichtsuche .ergebnis a:hover {
	background: #ebebeb;
	color: #ac0404;
}

#navrighttop_div ul.totop .shortcut_link {
	background: #f5f5f5;
	border: 1px solid #e5e5e5;
	height: 30px;
	padding: 0 10px;
	border-radius: 4px;
	font-size: 12px;
	color: #555;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

#navrighttop_div ul.totop .shortcut_link:hover {
	background: #ebebeb;
	color: #ac0404;
	text-decoration: none;
}

/* ---- Footer: modern block ---- */
#footer {
	min-height: 56px;
	height: auto;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1a1a1a;
	box-shadow: 0 -1px 3px rgba(0,0,0,0.08);
}

#servicefooter {
	padding: 0 !important;
	font-size: 0.8em !important;
	text-align: center;
	color: rgba(255,255,255,0.9) !important;
}

.service-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
}

/* ---- Content area: bounded width so wide elements scroll inside (not whole page) ---- */
#content_div {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
}

/* Händlernews list table: scroll wrapper (desktop); card layout on small screens via media query below */
.haendlernews-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1em;
}

/* ---- Toolbar toggle (mobile) - in header row, left side ---- */
/* Hidden by default (desktop) - same base style as service-nav-toggle */
.service-toolbar-toggle {
	display: none;
	order: -1; /* Position on left */
	margin-left: 0; /* Push hamburger to right */
}

/* Change icon to X when expanded */
.service-toolbar-toggle[aria-expanded="true"] .fa-toolbox::before {
	content: "\f00d"; /* X icon */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
}

/* Wrap for the panel only (toggle is now in navtop) */
.toolbar-overflow-wrap {
	display: none; /* Hidden - toggle moved to header */
}

/* Toolbar panel - drops down from header */
.toolbar-overflow-panel {
	display: none;
	position: fixed;
	top: 44px; /* Below header */
	left: 0;
	right: 0;
	width: 100%;
	max-height: 70vh;
	overflow-y: auto;
	background: #1a1a1a;
	border: none;
	border-radius: 0;
	box-shadow: 0 4px 16px rgba(0,0,0,0.25);
	padding: 8px 0;
	z-index: 9998;
}

.toolbar-overflow-panel[hidden] {
	display: none !important;
}

.toolbar-overflow-panel:not([hidden]) {
	display: block;
}

.toolbar-overflow-panel .overflow-section {
	padding: 4px 0;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.toolbar-overflow-panel .overflow-section:last-child {
	border-bottom: none;
}

.toolbar-overflow-panel .overflow-section-title {
	padding: 6px 16px 4px;
	font-size: 10px;
	font-weight: 600;
	color: rgba(255,255,255,0.5);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.toolbar-overflow-panel .overflow-item {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	color: rgba(255,255,255,0.85);
	font-size: 13px;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.toolbar-overflow-panel .overflow-item:hover {
	background: rgba(255,255,255,0.1);
	color: #fff;
}

.toolbar-overflow-panel .overflow-item i {
	width: 20px;
	margin-right: 12px;
	text-align: center;
	font-size: 14px;
	opacity: 0.7;
}

.toolbar-overflow-panel .overflow-item .flag-icon {
	margin-right: 12px;
}

.toolbar-overflow-panel .overflow-item.overflow-item--active {
	background: rgba(34, 197, 94, 0.2);
	color: #86efac;
}

.toolbar-overflow-panel .overflow-item.overflow-item--inactive {
	background: rgba(239, 68, 68, 0.2);
	color: #fca5a5;
}

.toolbar-overflow-panel .overflow-flags {
	display: flex;
	gap: 8px;
	padding: 10px 16px;
}

.toolbar-overflow-panel .overflow-flags a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 28px;
	border-radius: 4px;
	background: rgba(255,255,255,0.1);
	transition: transform 0.15s ease, background 0.15s ease;
}

.toolbar-overflow-panel .overflow-flags a .flag-icon {
	display: block;
	width: 21px;
	height: 15px;
	line-height: 15px;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
}

.toolbar-overflow-panel .overflow-flags a i {
	font-size: 16px;
	color: rgba(255,255,255,0.85);
}

.toolbar-overflow-panel .overflow-flags a:hover {
	transform: scale(1.1);
	background: rgba(255,255,255,0.2);
}

/* ========== Max 979px: fixed toolbar full width ---- */
@media only screen and (max-width: 979px) {
	div#navrighttop_div.fixed {
		position: fixed;
		top: 0;
		left: 0 !important;
		right: 0;
		width: 100% !important;
		height: auto;
		min-height: 40px;
		z-index: 9999;
		box-shadow: 0 1px 4px rgba(0,0,0,0.12);
		padding: 4px 10px;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}

	div#navrighttop_div.fixed div#navrighttop_surr {
		margin: 0;
	}

	div#navrighttop_div.fixed .seitenlinks_top li {
		margin: 0 2px 0 0 !important;
	}

	div#navrighttop_div.fixed ul.totop {
		display: block;
	}

	/* Coverfoto / bilder1: full-width images on responsive */
	.coverfoto.element img,
	.element.bilder1 img {
		width: 100% !important;
	}
}

/* ========== Max 768px: hamburger + stacked header ---- */
@media only screen and (max-width: 768px) {
	/* Show both toggles on mobile */
	.service-nav-toggle {
		display: flex;
	}

	/* Toolbar toggle on left */
	.service-toolbar-toggle {
		display: flex;
		order: -1;
		margin-right: auto;
	}

	#menudiv {
		position: relative;
		padding: 0 8px;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	/* Logo centered on mobile */
	#menudiv .service-menudiv-logo {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		margin-left: 0;
		margin-right: 0;
	}

	#jsddm {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #1a1a1a;
		flex-direction: column;
		align-items: stretch;
		padding: 8px 0;
		margin: 0;
		box-shadow: 0 4px 12px rgba(0,0,0,0.2);
		max-height: 70vh;
		overflow-y: auto;
	}

	.service-header-wrapper.service-nav-open #menudiv {
		position: relative;
		z-index: 10001;
	}

	.service-header-wrapper.service-nav-open #jsddm {
		display: block;
		z-index: 1;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		width: 100%;
		box-sizing: border-box;
	}

	/* Toolbar panel dropdown from header */
	.service-header-wrapper.service-toolbar-open #toolbar-overflow-panel {
		display: block;
	}

	#jsddm > li {
		width: 100%;
		border-bottom: 1px solid rgba(255,255,255,0.1);
		display: flex;
		align-items: stretch;
		flex-wrap: wrap;
	}

	#jsddm > li:last-child {
		border-bottom: 0;
	}

	/* Submenu toggle visible on mobile so main link stays clickable */
	#jsddm > li > .service-sub-toggle {
		display: flex;
		flex-shrink: 0;
		margin-left: auto;
	}

	#jsddm > li > .header-block {
		flex: 1;
		min-width: 0;
	}

	#jsddm > li > .header-block > a {
		display: block;
		padding: 12px 16px;
		width: 100%;
		box-sizing: border-box;
	}

	/* Mobile submenu container */
	#jsddm > li > ul {
		position: static !important;
		visibility: visible !important;
		display: none;
		box-shadow: none;
		background: rgba(0,0,0,0.2);
		padding: 0;
		margin: 0;
		width: 100%;
		border-radius: 0;
		border: none;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.25s ease-out;
	}

	/* Mobile: only show submenu when toggle is clicked (not hover) */
	#jsddm > li.service-sub-open > ul {
		display: block;
		max-height: 500px;
		transition: max-height 0.3s ease-in;
	}

	/* Mobile submenu items */
	#jsddm > li > ul > li {
		border-bottom: 1px solid rgba(255,255,255,0.05);
	}
	#jsddm > li > ul > li:last-child {
		border-bottom: none;
	}

	#jsddm > li > ul > li > a {
		padding: 12px 16px 12px 32px;
		display: block;
		font-size: 0.85em;
		color: rgba(255,255,255,0.85);
		background: transparent;
		transition: background 0.15s ease, color 0.15s ease;
	}

	#jsddm > li > ul > li > a:hover,
	#jsddm > li > ul > li > a:active {
		background: rgba(255,255,255,0.1);
		color: #fff;
	}

	#jsddm > li > ul > li.inactive > a {
		color: rgba(255,255,255,0.4);
	}

	/* Force single-line toolbar on mobile */
	div#navrighttop_div {
		padding: 6px 10px 4px;
		min-height: 36px;
		gap: 4px 8px;
		margin-top: 2px;
		flex-wrap: nowrap;
		overflow: hidden;
	}

	div#navrighttop_surr {
		width: auto;
		flex: 1;
		min-width: 0;
		gap: 4px 8px;
		flex-wrap: nowrap;
	}

	/* Hide secondary toolbar groups on mobile - moved to overflow menu */
	div#navrighttop_div .toolbar-group-lang-user {
		display: none !important;
	}

	div#navrighttop_div ul.totop {
		display: none !important;
	}

	/* Show only first action (preview) in toolbar-group-actions */
	div#navrighttop_div .toolbar-group-actions li:not(:first-child) {
		display: none !important;
	}

	/* Hide live/inactive status badge text on mobile */
	div#navrighttop_div .toolbar-group-actions li.live,
	div#navrighttop_div .toolbar-group-actions li.inactive {
		display: none !important;
	}

	/* Overflow wrap removed - toggle is now in header */

	div#navrighttop_div .toolbar-group {
		padding: 2px 4px;
		gap: 2px 4px;
		flex-shrink: 0;
	}

	/* Search group should take available space */
	div#navrighttop_div .toolbar-group-search {
		flex: 1;
		min-width: 0;
		max-width: 100%;
	}

	.seitenlinks_top {
		display: flex !important;
		flex-wrap: nowrap;
		gap: 2px 4px;
	}

	.seitenlinks_top li {
		margin: 0 !important;
	}

	.seitenlinks_top li a {
		padding: 0 8px;
		height: 28px;
		min-height: 28px;
		font-size: 12px;
	}

	#navrighttop_div .seitenlinks_top li.flagx a {
		padding: 0 6px;
		min-width: 28px;
	}

	.seitenlinks_top li.inactive span,
	.seitenlinks_top li.live span {
		height: 28px;
		min-height: 28px;
		padding: 0 8px;
		font-size: 11px;
	}

	#berichtsuche {
		margin: 0 !important;
		width: auto;
		flex: 1;
		min-width: 0;
	}

	#berichtsuche form {
		display: flex;
		flex-wrap: nowrap;
		gap: 4px;
	}

	#berichtsuche input[type="text"] {
		width: 100%;
		height: 28px;
		min-width: 100px;
		max-width: 160px;
		box-sizing: border-box;
		font-size: 12px;
	}

	#navrighttop_div #berichtsuche .input_but {
		height: 28px;
		padding: 0 10px;
		font-size: 12px;
	}

	.toolbar-group:not(:first-child) {
		border-left: none;
		padding-left: 0;
		margin-left: 0;
	}

	.toolbar-group-search {
		width: auto;
	}

	li.keyx {
		margin-left: 0;
		margin-right: auto;
	}

	#footer {
		padding: 12px 16px;
		min-height: 48px;
	}

	#servicefooter {
		font-size: 0.75em !important;
	}

	#content_div {
		padding: 12px 16px !important;
	}

	/* Keep .kategorien_news_no within layout (no fixed width/position) */
	.kategorien_news_no {
		position: relative;
		width: auto;
		max-width: 100%;
		margin-left: 0;
		margin-top: 4px;
		text-align: left;
		box-sizing: border-box;
	}

	/* Hide element-toolbar meta group to stay within borders */
	#sortable td.bearbeitentd .element-toolbar__group.element-toolbar__meta,
	.element-card__toolbar .element-toolbar__group.element-toolbar__meta {
		display: none !important;
	}

	/* Element card responsive */
	.element-card {
		border-radius: 6px;
	}

	.element-card__content {
		padding: 0px;
	}

	.element-card__toolbar .element-toolbar {
		flex-wrap: wrap;
	}

	/* Triple news responsive - stack vertically on tablet/mobile */
	.triple_news {
		padding: 10px;
		max-width: 100%;
	}

	/* When inside card, no extra padding needed */
	.element-card__content .triple_news {
		padding: 0;
	}

	.triple_news img,
	.triple_news .platzhalter {
		float: none !important;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100% !important;
		max-width: 100%;
		height: auto;
		min-height: 120px;
		margin-right: 0;
		margin-bottom: 10px;
	}

	.triple_news div.views {
		float: none;
		display: inline-block;
		margin: 0 0 8px 0;
	}

	.shorttext_backend {
		max-height: none;
	}

	/* Sortable list items full width on mobile */
	#sortable li.listitem {
		max-width: 100%;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 10px !important;
		padding-right: 10px !important;
	}
}

/* ========== Max 480px: compact toolbar ---- */
@media only screen and (max-width: 480px) {
	.service-header-wrapper {
		font-size: 0.9em;
	}

	div#navrighttop_div {
		padding: 3px 8px;
		min-height: 32px;
		gap: 3px 6px;
	}

	div#navrighttop_surr {
		gap: 3px 6px;
	}

	div#navrighttop_div .toolbar-group {
		padding: 1px 4px;
	}

	.seitenlinks_top li a {
		padding: 0 6px;
		height: 26px;
		min-height: 26px;
		font-size: 11px;
	}

	#navrighttop_div .seitenlinks_top li.flagx a {
		min-width: 26px;
		padding: 0 5px;
	}

	.seitenlinks_top li.inactive span,
	.seitenlinks_top li.live span {
		height: 26px;
		min-height: 26px;
		padding: 0 6px;
		font-size: 10px;
	}

	/* Panel width on smaller screens */
	.toolbar-overflow-panel {
		min-width: 100%;
	}

	li.keyx a.userna {
		font-size: 0.7em;
		max-width: 90px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	#footer {
		padding: 10px 12px;
	}

	#content_div {
		padding: 10px 12px !important;
	}

	/* Breadcrumb pills responsive */
	.breadcrumb {
		gap: 4px;
		padding: 8px 0;
	}
	
	.breadcrumb a,
	.breadcrumb > span {
		padding: 4px 10px;
		font-size: 11px;
	}
	
	.breadcrumb__sep {
		font-size: 8px;
	}

	/* Element card compact on small screens */
	.element-card {
		border-radius: 0px;
	}

	.element-card__content {
		padding: 0px;
	}

	.element-card__toolbar .element-toolbar__link {
		padding: 0 8px;
		font-size: 11px;
	}

	.element-card__toolbar .element-toolbar__link i {
		margin-right: 3px;
	}

	/* Triple news compact on small screens */
	.triple_news {
		padding: 8px;
		border-radius: 6px;
	}

	/* When inside card, no extra padding */
	.element-card__content .triple_news {
		padding: 0;
	}

	.triple_news h2 {
		font-size: 1em;
	}

	.triple_news div.views {
		padding: 3px 6px;
		font-size: 0.8em;
	}

	.shorttext_backend {
		font-size: 0.9em;
	}
}

/* ========== iPhone 12 / 390px: touch-friendly ---- */
@media only screen and (max-width: 390px) {
	#menudiv {
		padding: 0 4px;
	}
	#menudiv .service-menudiv-logo img {
		height: 20px;
		max-width: 80px;
	}

	/* Both toggles same touch-friendly size */
	.service-nav-toggle {
		width: 44px;
		height: 44px;
		min-width: 44px;
		min-height: 44px;
	}

	#jsddm > li > .header-block > a {
		padding: 12px 14px;
		min-height: 44px;
		display: flex;
		align-items: center;
	}

	div#navrighttop_div {
		min-height: 36px;
		padding: 2px 6px;
	}

	.seitenlinks_top li a {
		height: 32px;
		min-height: 32px;
		display: inline-flex;
		align-items: center;
		padding: 0 8px;
	}

	#servicefooter {
		font-size: 0.7em !important;
		line-height: 1.4;
	}

	#content_div {
		padding: 8px 4px !important;
		overflow-x: hidden;
	}

	/* Element card ultra-compact on iPhone */
	.element-card__content {
		padding: 0px;
	}

	.element-card__toolbar .element-toolbar__link {
		padding: 0 6px;
		height: 28px;
	}

	.element-card__toolbar .element-toolbar__badge {
		padding: 0 8px;
		height: 28px;
		font-size: 11px;
	}

	.element-card__toolbar .element-toolbar__reorder .handle {
		height: 28px;
	}

	/* Triple news ultra-compact on iPhone */
	.triple_news {
		padding: 6px;
	}

	/* When inside card, no extra padding */
	.element-card__content .triple_news {
		padding: 0;
	}

	.triple_news h2 {
		font-size: 0.95em;
		line-height: 1.25;
	}

	#sortable li.listitem {
		padding-left: 4px !important;
		padding-right: 4px !important;
	}
}

/* ============================================
   Edit form: card-style (sechxbild, edittable)
   Same width as edit-form-main; cards distributed evenly
   ============================================ */

.edit-form-sechxbild {
	margin: 0;
	width: 100%;
	max-width: 70%;
	box-sizing: border-box;
}

.edit-form-sechxbild .edit-form-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	max-width: 100%;
}

/* Even distribution: each card equal flex basis */
.edit-form-sechxbild .edit-form-card {
	flex: 1 1 0;
	min-width: 100px;
	padding: 5px;
	background: #fff;
	border: 0px solid #e5e7eb;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

.edit-form-card__slot {
	display: inline-block;
	font-size: 0.75em;
	font-weight: 600;
	color: #6b7280;
	margin-bottom: 6px;
}

/* Image container 3:2 ratio; caption below matches width */
.edit-form-card .imagecontainer {
	width: 100%;
	aspect-ratio: 3 / 2;
	min-height: 0;
	background: #ffffff;
	border: 1px dashed #ddd;
	border-radius: 4px;
	position: relative;
	padding: 0;
	margin: 0 0 8px 0;
	overflow: hidden;
}

.edit-form-card .imagecontainer img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.edit-form-main .imagecontainer {
    min-height: 133px;
    background: #ffffff;
    border: 1px dashed #ddd;
    border-radius: 0px;
    position: relative;
    padding: 0px;
    margin: 0px 0px 10px 0px;
}

.edit-form-card .imagecontainer:not(:has(img)) {
	display: flex;
	align-items: center;
	justify-content: center;
}

.edit-form-card .imagecontainer:has(img) {
	display: block;
}

.edit-form-card .imagecontainer.drophover {
	border-color: #880000;
	
	background: #fef2f2;
}

/* Drag already-placed photos between 6x-Bild slots */
.edit-form-card .imagecontainer img.slot-image-drag {
	cursor: grab;
}
.edit-form-card .imagecontainer img.slot-image-drag:active,
.edit-form-card .imagecontainer img.ui-draggable-dragging {
	cursor: grabbing;
}
.edit-form-card .imagecontainer.slot-drag-source {
	opacity: 0.45;
}
.edit-form-card .imagecontainer.slot-drag-source img {
	outline: 2px dashed #880000;
	outline-offset: -2px;
}

.edit-form-card .imagecontainer .drop-placeholder {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 0.8em;
	color: #9ca3af;
	cursor: pointer;
}
.edit-form-card .imagecontainer .drop-placeholder__icon {
	font-size: 1.8em;
	opacity: 0.7;
}

.edit-form-card .imagecontainer:has(img) .drop-placeholder {
	display: none;
}

/* Textform same width as image (full card content width) */
.edit-form-card__caption {
	width: 100%;
	min-height: 60px;
	margin-top: 0;
	padding: 6px 8px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	font-size: 0.85em;
	box-sizing: border-box;
}

.edit-form-card__edit {
	position: static;
	margin-top: 4px;
	display: inline-block;
}

/* Fotogalerie button: same style as edit, hidden by default */
.edit-form-card__fotogalerie {
	display: none;
	margin-top: 4px;
	position: static;
}

.edit-form-card__fotogalerie .fa,
.edit-form-card__fotogalerie .far,
.edit-form-card__fotogalerie .fas {
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
}

/* Pencil icon (FA5) in card edit button */
.edit-form-card__edit .fa,
.edit-form-card__edit .far,
.edit-form-card__edit .fas {
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
}

/* ============================================
   Edit Form - Two Column Layout (color-scheme: form-modern)
   ============================================ */
.edit-form-main {
	margin: 0 0 24px 0;
	width: 100%;
	max-width: 70%;
	overflow: hidden;
	padding: 0;
	box-sizing: border-box;
}

.edit-form-main .edit-form__cols {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	max-width: 100%;
	align-items: flex-start;
}

.edit-form-main .edit-form__col {
	flex: 1 1 400px;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

/* Left column - generally main content */
.edit-form-main .edit-form__col--left {
	flex: 1 1 45%;
	min-width: 300px;
}

/* Right column - generally images/media */
.edit-form-main .edit-form__col--right {
	flex: 1 1 45%;
	min-width: 300px;
}

/* Single-column layout: all sections in one readable column */
.edit-form-main--single .edit-form__single {
	max-width: 100%;
}
.edit-form-main--single .form-modern-section {
	max-width: 100%;
}

.edit-form-main .edittable-modern {
	width: 100%;
	max-width: 100%;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.edit-form-main .edittable-modern th {
	background: #e8e8e8;
	padding: 12px 18px 10px 18px;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	color: #333;
	letter-spacing: 0.02em;
	border-bottom: 1px solid #ddd;
	border-left: 3px solid #851309;
}

.edit-form-main .edittable-modern td {
	padding: 10px 16px;
	border-bottom: 1px solid #ddd;
	background: #f5f5f5;
	font-size: 13px;
	color: #374151;
}

.edit-form-main .edittable-modern tr:last-child td {
	border-bottom: none;
}

/* Drop zones in main edittable (single picture fields) - form-modern palette */
.edit-form-main .imagecontainer {
    min-height: 106px;
    background: #ffffff;
    border: 1px dashed #ddd;
    border-radius: 0px;
    position: relative;
    padding: 0px;
    margin: 0px;
}

.edit-form-main .imagecontainer:not(:has(img)) {
	display: flex;
	align-items: center;
	justify-content: center;
}

.edit-form-main .imagecontainer:has(img) {
	display: block;
}

.edit-form-main .imagecontainer.drophover {
	border-color: #851309;
	background: #f0f0f0;
}

.edit-form-main .imagecontainer .drop-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 0.8em;
	color: #666;
	cursor: pointer;
}
.edit-form-main .imagecontainer .drop-placeholder__icon {
	font-size: 1.8em;
	opacity: 0.7;
}

.edit-form-main .imagecontainer:has(img) .drop-placeholder {
	display: none;
}

/* Edit form sechxbild: same width as main on small screens */
@media only screen and (max-width: 768px) {
	.edit-form-sechxbild {
		max-width: 100%;
	}
	.edit-form-sechxbild .edit-form-card {
		flex: 1 1 45%;
		min-width: 100px;
	}
}

@media only screen and (max-width: 480px) {
	.edit-form-sechxbild .edit-form-cards {
		gap: 10px;
	}
	.edit-form-sechxbild .edit-form-card {
		flex: 1 1 100%;
		min-width: 0;
	}
}

/* Edit form main: stack columns on small screens */
@media only screen and (max-width: 768px) {
	.edit-form-main {
		margin: 0 0 16px 0;
		max-width: 100%;
	}

	.edit-form-main .edit-form__cols {
		flex-direction: column;
		gap: 16px;
	}

	.edit-form-main .edit-form__col,
	.edit-form-main .edit-form__col--left,
	.edit-form-main .edit-form__col--right {
		flex: 1 1 100%;
		min-width: 0;
		max-width: 100%;
	}

	.edit-form-main .edittable-modern {
		max-width: 100%;
	}

	/* edit-form-block: stack rows on small screens (flex children become full width) */
	.edit-form-main .edit-form-block table.edittable tr {
		flex-direction: column;
	}
	.edit-form-main .edit-form-block table.edittable td:first-child,
	.edit-form-main .edit-form-block table.edittable td:last-child {
		flex: 0 0 100%;
		max-width: 100%;
	}

	/* DIV-based form layout responsive */
	.edit-form-block--div .form-row {
		flex-direction: column;
	}
	.edit-form-block--div .form-label,
	.edit-form-block--div .form-field {
		flex: 0 0 100%;
		max-width: 100%;
	}
	.edit-form-block--div .form-label {
		padding: 10px 14px 4px 14px;
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: 0.02em;
		border-bottom: none;
		background: #f9fafb;
	}
	.edit-form-block--div .form-field {
		padding: 4px 14px 14px 14px;
		background: #f9fafb;
	}
	.edit-form-block--div .form-field input[type="text"],
	.edit-form-block--div .form-field input[type="password"],
	.edit-form-block--div .form-field textarea,
	.edit-form-block--div .form-field select {
		min-height: 44px;
		font-size: 16px !important;
		padding: 10px 12px;
	}
}

@media only screen and (max-width: 480px) {
	.edit-form-main {
		margin: 0 0 12px 0;
	}

	.edit-form-main .edit-form__cols {
		gap: 12px;
	}
}

/* ---- Compact upload bar (imagebar): best UX ---- */
.upload-bar--compact {
	margin: 0 0 16px 0;
	padding: 12px 14px;
	background: #f8f9fa;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}
.upload-bar--compact .upload-bar__inner {
	display: block;
}
.upload-bar--compact .upload-bar__form {
	display: block;
}
.upload-bar--compact .upload-bar__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}
.upload-bar--compact .upload-bar__file-wrap {
	position: relative;
	display: inline-block;
}
.upload-bar--compact .upload-bar__file-wrap input[type="file"] {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	font-size: 0;
}
.upload-bar--compact .upload-bar__file-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	font-size: 13px;
	color: #374151;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.upload-bar--compact .upload-bar__file-label:hover {
	border-color: #9ca3af;
	background: #f9fafb;
}
.upload-bar--compact .upload-bar__btn {
	flex-shrink: 0;
	padding: 8px 14px;
	font-size: 13px;
}
.upload-bar--compact .upload-bar__progress-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 22px;
}
.upload-bar--compact .upload-bar__progress {
	flex: 0 0 120px;
	width: 120px;
	height: 8px;
	vertical-align: middle;
}
.upload-bar--compact .upload-bar__hint {
	font-size: 12px;
	color: #6b7280;
}

@media only screen and (max-width: 480px) {
	.upload-bar--compact .upload-bar__row {
		flex-direction: column;
		align-items: stretch;
	}
	.upload-bar--compact .upload-bar__file-label {
		justify-content: center;
	}
	.upload-bar--compact .upload-bar__btn {
		width: 100%;
	}
}

/* ---- menu_intro: single column on small screens ---- */
@media only screen and (max-width: 768px) {
	.menu_intro {
		grid-template-columns: 1fr;
		gap: 10px 0;
		margin-top: 8px;
	}

	.menu_intro_col {
		max-width: 100%;
		font-size: 1em;
	}

	.menu_intro_col h4 {
		margin-top: 12px;
		padding-bottom: 6px;
		font-size: 1.05em;
	}

	.menu_intro_col h4:first-child {
		margin-top: 0;
	}

	.menu_intro_col ul {
		padding-bottom: 14px;
	}

	/* Touch-friendly link targets (min 44px) */
	.menu_intro_col ul li {
		padding: 4px 0;
	}

	.menu_intro_col a {
		min-height: 44px;
		padding: 6px 0;
		align-items: center;
		gap: 6px;
		font-size: 1em;
		-webkit-tap-highlight-color: transparent;
	}

	.menu_intro_col ul li.light {
		padding: 8px 0;
	}

	.menu_intro_col ul li.light input[type="text"],
	.menu_intro_col ul li.light input[type="button"] {
		min-height: 44px;
		padding: 8px 12px;
		font-size: 16px;
	}
}

@media only screen and (max-width: 480px) {
	.menu_intro {
		gap: 8px 0;
	}

	.menu_intro_col h4 {
		font-size: 1.02em;
	}
}

/* ============================================
   Quick Access & Menu Sections - Responsive
   ============================================ */

/* Tablet: quick access */
@media only screen and (max-width: 768px) {
	.quick-access {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		margin: 16px 0 24px 0;
	}

	.quick-access--compact {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
		margin: 12px 0 18px 0;
	}

	.quick-access__card {
		padding: 20px 16px;
		min-height: 100px;
	}

	.quick-access--compact .quick-access__card {
		padding: 12px 10px;
		min-height: 72px;
	}

	.quick-access__card i {
		font-size: 2em;
		margin-bottom: 10px;
	}

	.quick-access--compact .quick-access__card i {
		font-size: 1.5em;
		margin-bottom: 4px;
	}

	.quick-access__title {
		font-size: 1em;
	}

	.quick-access--compact .quick-access__title {
		font-size: 0.85em;
	}

	.quick-access--compact .quick-access__desc {
		font-size: 0.7em;
	}

	.menu-sections {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.menu-section__header {
		padding: 14px 16px;
		min-height: 48px;
	}

	.menu-section__body ul li {
		padding: 8px 0;
	}

	.menu-section__body ul li a {
		min-height: 44px;
		padding: 8px 0;
	}
}

/* Mobile: single column */
@media only screen and (max-width: 480px) {
	.quick-access {
		grid-template-columns: 1fr;
		gap: 10px;
		margin: 12px 0 20px 0;
	}

	.quick-access--compact {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
		margin: 10px 0 16px 0;
	}

	.quick-access__card {
		flex-direction: row;
		justify-content: flex-start;
		padding: 16px 20px;
		min-height: auto;
		gap: 16px;
	}

	.quick-access--compact .quick-access__card {
		flex-direction: column;
		justify-content: center;
		padding: 10px 8px;
		min-height: 70px;
		gap: 0;
	}

	.quick-access__card i {
		font-size: 1.8em;
		margin-bottom: 0;
	}

	.quick-access--compact .quick-access__card i {
		margin-bottom: 4px;
	}

	.quick-access__card-text {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}

	.quick-access__title {
		text-align: left;
	}

	.quick-access--compact .quick-access__title {
		text-align: center;
	}

	.quick-access__desc {
		text-align: left;
	}

	.quick-access--compact .quick-access__desc {
		text-align: center;
	}

	.menu-section__header {
		padding: 12px 14px;
	}

	.menu-section__body {
		padding: 10px 14px;
	}

	.menu-section__body ul li.light input[type="text"],
	.menu-section__body ul li.light input[type="button"] {
		min-height: 44px;
		font-size: 16px;
	}

	.menu-section[data-section] {
		border-left-width: 3px;
	}
}

/* iPhone 12 / 390px */
@media only screen and (max-width: 390px) {
	.quick-access__card {
		padding: 14px 16px;
	}

	.quick-access--compact .quick-access__card {
		padding: 8px 6px;
		min-height: 64px;
	}

	.quick-access__card i {
		font-size: 1.5em;
	}

	.quick-access--compact .quick-access__card i {
		font-size: 1.35em;
	}

	.quick-access__title {
		font-size: 0.95em;
	}

	.quick-access--compact .quick-access__title {
		font-size: 0.78em;
	}

	.quick-access__desc {
		font-size: 0.8em;
	}

	.quick-access--compact .quick-access__desc {
		font-size: 0.65em;
	}
}

/* ============================================
   Edit Layout Wrapper - Responsive (Grid)
   ============================================ */

/* Large tablet / small desktop: stack imagebar on top */
@media only screen and (max-width: 1200px) {
	.edit-layout-wrapper {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"imagebar imagebar"
			"left right";
		gap: 16px;
	}

	.edit-layout-wrapper > #imagebar {
		grid-area: imagebar;
		max-width: 100%;
	}

	.edit-layout-wrapper > .edit-form-main {
		grid-column: 1 / -1;
	}

	.edit-layout-wrapper .edit-form__cols {
		grid-template-columns: 1fr 1fr;
	}
}

/* ============================================
   Imagebar: hide on mobile, open as overlay when image-container clicked
   Breakpoint: 900px
   ============================================ */
@media only screen and (max-width: 900px) {
	div#imagebar {
		display: none;
		position: fixed;
		top: 0px !important;
		left: 0;
		width: 100vw;
		width: 100dvw;
		height: 100vh;
		height: 100dvh;
		right: auto;
		bottom: auto;
		z-index: 10002;
		background: #f9fafb;
		border: none;
		border-radius: 0;
		padding: 16px;
		overflow-y: auto;
		box-sizing: border-box;
		box-shadow: none;
	}

	body.imagebar-open-mobile #imagebar::before {
		content: '';
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		width: 100dvw;
		height: 100vh;
		height: 100dvh;
		background: rgba(0, 0, 0, 0.35);
		z-index: -1;
	}

	#imagebar .imagebar-mobile-close {
		display: none;
	}

	body.imagebar-open-mobile #imagebar {
		display: block;
	}

	body.imagebar-open-mobile #imagebar .imagebar-mobile-close {
		display: block;
		margin-bottom: 12px;
		background: #000;
	}

	/* Fotogalerie button: visible only in responsive mode */
	.edit-form-card__fotogalerie,
	.imagebar-open-btn.edit-form-card__fotogalerie {
		display: inline-block !important;
	}
}

/* Hide mobile close button on larger screens */
@media only screen and (min-width: 901px) {
	#imagebar .imagebar-mobile-close {
		display: none !important;
	}
}

/* ============================================
   Edittable Forms - Mobile Responsive
   ============================================ */

/* Tablet: adjust table layout for medium screens */
@media only screen and (max-width: 768px) {
	/* CKEditor popup (myDIV2) – make it mobile-friendly (edit_element.php uses bbEditor overlay) */
	#myDIV2 {
		left: 0 !important;
		top: 0 !important;
		margin-left: 0 !important;
		margin-top: 0 !important;
		width: 100vw !important;
		width: 100dvw !important;
		max-width: 100% !important;
		height: 100vh !important;
		height: 100dvh !important;
		box-sizing: border-box !important;
		padding: 10px !important;
		overflow: hidden !important;
	}
	/* When opened via fadeIn(), jQuery sets display:block inline – switch to flex layout */
	#myDIV2[style*="display: block"] {
		display: flex !important;
		flex-direction: column;
	}
	/* Fallback (before CKEditor replaces textarea) */
	#myDIV2 #bbEditor {
		width: 100% !important;
		height: calc(100dvh - 140px) !important;
		height: calc(100vh - 140px) !important;
		box-sizing: border-box !important;
	}
	/* CKEditor wrapper generated for bbEditor */
	#cke_bbEditor {
		width: 100% !important;
		flex: 1 1 auto;
	}
	#cke_bbEditor .cke_contents {
		height: calc(100dvh - 210px) !important;
		height: calc(100vh - 210px) !important;
		overflow-y: auto !important;
	}
	#myDIV2 > div[style*="padding"] {
		flex: 0 0 auto;
	}

	/* Edit layout wrapper - single column */
	.edit-layout-wrapper {
		grid-template-columns: 1fr;
		grid-template-areas:
			"imagebar"
			"left";
		gap: 12px;
	}

	.edit-layout-wrapper > #imagebar {
		padding: 12px;
	}

	.edit-layout-wrapper > .edit-form-main {
		grid-column: 1;
	}

	/* Inner form columns stack */
	.edit-layout-wrapper .edit-form__cols {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.edit-layout-wrapper .edit-form__col--left,
	.edit-layout-wrapper .edit-form__col--right {
		grid-column: 1;
	}

	/* Make edittable take full width */
	table.edittable,
	.edit-form-main .edittable-modern {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* Stack table cells vertically (exclude list tables like Händlernews) */
	table.edittable:not(.haendlernews-list-table),
	table.edittable:not(.haendlernews-list-table) tbody,
	table.edittable:not(.haendlernews-list-table) tr,
	table.edittable:not(.haendlernews-list-table) td,
	table.edittable:not(.haendlernews-list-table) th {
		display: block;
		width: 100% !important;
	}

	/* Hide empty first columns that just have labels */
	table.edittable:not(.haendlernews-list-table) tr {
		margin-bottom: 0;
		border-bottom: 1px solid #e5e7eb;
	}

	table.edittable:not(.haendlernews-list-table) tr:last-child {
		border-bottom: none;
	}

	/* Section headers */
	table.edittable:not(.haendlernews-list-table) th {
		padding: 12px 14px;
		border-left: 3px solid #851309;
	}

	table.edittable:not(.haendlernews-list-table) th[colspan="2"] {
		text-align: left;
	}

	/* Label cells - act as inline labels */
	table.edittable:not(.haendlernews-list-table) td:first-child {
		width: 100% !important;
		max-width: 100% !important;
		padding: 10px 14px 4px 14px;
		font-weight: 600;
		font-size: 12px;
		color: #6b7280;
		text-transform: uppercase;
		letter-spacing: 0.02em;
		border-bottom: none;
		background: #f9fafb;
	}

	/* Input cells - full width */
	table.edittable:not(.haendlernews-list-table) td:last-child,
	table.edittable:not(.haendlernews-list-table) td:nth-child(2) {
		width: 100% !important;
		max-width: 100% !important;
		padding: 4px 14px 14px 14px;
		background: #f9fafb;
	}

	/* When label and input are in same cell, adjust */
	table.edittable td[colspan="2"] {
		padding: 12px 14px;
	}

	/* Form inputs - touch-friendly sizing */
	table.edittable input[type="text"],
	table.edittable input[type="password"],
	table.edittable input[type="email"],
	table.edittable input[type="number"],
	table.edittable textarea,
	table.edittable select {
		min-height: 44px;
		font-size: 16px !important; /* Prevent iOS zoom */
		padding: 10px 12px;
	}

	/* Textareas - slightly taller on mobile */
	table.edittable textarea {
		min-height: 100px;
	}

	/* Select dropdowns */
	table.edittable select {
		min-height: 44px;
	}

	/* Multiple select - taller */
	table.edittable select[multiple] {
		min-height: 160px;
	}

	/* File inputs */
	table.edittable input[type="file"] {
		min-height: 44px;
		padding: 10px;
		font-size: 14px !important;
	}

	/* Checkboxes - larger touch target */
	table.edittable input[type="checkbox"] {
		width: 20px !important;
		height: 20px;
		margin-right: 8px;
	}

	/* Dual select (mselect) - stack columns */
	table.edittable td table {
		display: block;
	}

	table.edittable td table tr {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin-bottom: 8px;
		border: none;
	}

	table.edittable td table td {
		display: block;
		flex: 1 1 100%;
		padding: 4px 0;
		min-width: 0;
	}

	/* Mselect buttons - stack vertically */
	table.edittable td table td:has(.button.mselect) {
		flex: 0 0 auto;
		display: flex;
		flex-direction: row;
		gap: 8px;
		justify-content: center;
		padding: 8px 0;
	}

	table.edittable .button.black.mselect {
		width: 44px !important;
		height: 44px;
		font-size: 1.2em;
	}

	/* Mselect dropdowns */
	table.edittable td table select[multiple] {
		width: 100% !important;
		min-height: 120px;
	}

	/* Search inputs for mselect */
	table.edittable td table input[type="text"] {
		width: 100% !important;
	}

	/* Image container adjustments */
	.edit-form-main .imagecontainer,
	table.edittable .imagecontainer {
		min-height: 133px;
	}

	/* Thumbnail sections - gray backgrounds */
	table.edittable td[bgcolor="#C7C7C7"],
	table.edittable tr td[bgcolor="#C7C7C7"] {
		background: #f5f5f5 !important;
	}

	/* Editor buttons */
	table.edittable .button.black.editor {
		margin-left: 0;
		margin-top: 8px;
		display: inline-flex;
	}

	/* Color pickers */
	table.edittable .clr-field {
		display: inline-flex;
		margin-bottom: 8px;
	}

	/* Hidden fields - maintain hidden state */
	table.edittable tr.hiddenfield {
		display: none !important;
	}

	/* When hiddenfield is shown via JS toggle */
	table.edittable tr.hiddenfield[style*="display: table-row"],
	table.edittable tr.hiddenfield[style*="display:table-row"] {
		display: block !important;
	}

	/* Händlernews list table: card layout on tablet/mobile */
	.haendlernews-table-wrap {
		overflow-x: visible;
	}
	table.haendlernews-list-table {
		display: block;
		width: 100% !important;
	}
	table.haendlernews-list-table tr:first-child {
		display: none; /* hide header row; labels come from data-label on td */
	}
	table.haendlernews-list-table tbody,
	table.haendlernews-list-table tr {
		display: block;
		width: 100%;
	}
	table.haendlernews-list-table tr:not(:first-child):not(:last-child) {
		border: 1px solid #e5e7eb;
		border-radius: 8px;
		margin-bottom: 12px;
		background: #fff;
		box-shadow: 0 1px 3px rgba(0,0,0,0.08);
		overflow: hidden;
	}
	table.haendlernews-list-table tr:not(:first-child):not(:last-child) td {
		display: block;
		width: 100% !important;
		padding: 8px 12px;
		border-bottom: 1px solid #f0f0f0;
		box-sizing: border-box;
	}
	table.haendlernews-list-table tr:not(:first-child):not(:last-child) td:last-child {
		border-bottom: none;
	}
	table.haendlernews-list-table tr:not(:first-child):not(:last-child) td::before {
		content: attr(data-label);
		font-weight: 600;
		font-size: 11px;
		color: #6b7280;
		text-transform: uppercase;
		letter-spacing: 0.03em;
		display: block;
		margin-bottom: 4px;
	}
	table.haendlernews-list-table tr:last-child th {
		display: block;
		width: 100% !important;
		padding: 10px 12px;
		text-align: center;
		border: none;
		border-top: 1px solid #e5e7eb;
		margin-top: 8px;
		background: #f9fafb;
		border-radius: 6px;
		box-sizing: border-box;
	}
}

/* Mobile: compact layout */
@media only screen and (max-width: 480px) {
	table.edittable {
		border-radius: 6px;
	}

	table.edittable th {
		padding: 10px 12px;
		font-size: 12px;
	}

	table.edittable td:first-child {
		padding: 8px 12px 2px 12px;
		font-size: 11px;
	}

	table.edittable td:last-child,
	table.edittable td:nth-child(2) {
		padding: 2px 12px 12px 12px;
	}

	/* Compact inputs */
	table.edittable input[type="text"],
	table.edittable input[type="password"],
	table.edittable textarea,
	table.edittable select {
		padding: 8px 10px;
	}

	/* Smaller buttons */
	table.edittable .button {
		padding: 8px 12px;
		font-size: 12px;
	}

	/* Mselect buttons */
	table.edittable .button.black.mselect {
		width: 40px !important;
		height: 40px;
	}
}

/* Assistant wizard bubbles – narrow screens */
@media only screen and (max-width: 600px) {
	.assistant-wizard__bubbles {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px 12px;
	}
	.assistant-wizard-bubble {
		padding: 12px 10px;
		min-height: 88px;
	}
	.assistant-wizard-bubble__icon {
		width: 38px;
		height: 38px;
		font-size: 16px;
		margin-bottom: 8px;
	}
	.assistant-wizard-bubble__title {
		font-size: 11px;
	}
	.assistant-wizard-bubble__action .button {
		font-size: 10px;
		padding: 5px 8px;
	}
}
@media only screen and (max-width: 380px) {
	.assistant-wizard__bubbles {
		grid-template-columns: 1fr;
	}
}

/* iPhone 12 / 390px - ultra compact */
@media only screen and (max-width: 390px) {
	table.edittable th {
		padding: 8px 10px;
	}

	table.edittable td:first-child {
		padding: 6px 10px 2px 10px;
	}

	table.edittable td:last-child {
		padding: 2px 10px 10px 10px;
	}

	table.edittable input[type="text"],
	table.edittable input[type="password"],
	table.edittable textarea,
	table.edittable select {
		font-size: 16px !important; /* Keep iOS zoom prevention */
	}
}

/* Termine-only top bar: keep single link visible (no hamburger) on narrow screens */
@media only screen and (max-width: 768px) {
	#menudiv .service-nav-termine-only-wrap {
		position: relative;
		padding-right: 0;
	}
	#menudiv .service-nav-termine-only-wrap #jsddm.service-nav-termine-only {
		display: flex !important;
		position: relative !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		width: auto !important;
		max-height: none !important;
		overflow: visible !important;
		background: transparent !important;
		box-shadow: none !important;
		flex-direction: row !important;
		align-items: center !important;
		padding: 0 4px 0 8px !important;
		flex: 1 !important;
		min-height: 48px !important;
	}
	.service-header-wrapper.service-nav-open #menudiv .service-nav-termine-only-wrap #jsddm.service-nav-termine-only {
		display: flex !important;
	}
	#menudiv .service-nav-termine-only-wrap .service-menudiv-logo {
		position: relative !important;
		left: auto !important;
		transform: none !important;
		margin-left: auto !important;
		margin-right: 8px !important;
	}
}
