/* NZG Arbeitsdienste – Website. Farben kommen aus dem Total-Customizer (Betonungsfarbe). */
.nzgad {
	--nzgad-accent: var(--wpex-accent, #b72922);
	--nzgad-on-accent: var(--wpex-on-accent, #fff);
	--nzgad-open: #1e8e3e;
	--nzgad-full: #c62828;
	--nzgad-border: var(--wpex-border-main, #e3e3e3);
	--nzgad-surface: var(--wpex-surface-1, #fff);
	--nzgad-surface-2: var(--wpex-surface-2, #f6f6f6);
	--nzgad-muted: var(--wpex-text-3, #666);
	--nzgad-radius: 14px;
	--nzgad-gap: 18px;
	--nzgad-tile-min: 190px;
	container-type: inline-size;
	scroll-margin-top: 120px;
}
.nzgad [hidden] { display: none !important; }
.nzgad *, .nzgad *::before, .nzgad *::after { box-sizing: border-box; }

/* Übersicht */
.nzgad-intro { margin-bottom: 24px; }
.nzgad-overview {
	display: grid;
	/* höchstens --nzgad-cols Spalten, jede mindestens --nzgad-tile-min breit */
	grid-template-columns: repeat(auto-fill, minmax(max(var(--nzgad-tile-min), calc((100% - (var(--nzgad-cols, 5) - 1) * var(--nzgad-gap)) / var(--nzgad-cols, 5))), 1fr));
	gap: var(--nzgad-gap);
}
@container (max-width: 560px) { .nzgad { --nzgad-gap: 12px; --nzgad-tile-min: 150px; } .nzgad-overview { gap: 12px; } }
@container (max-width: 330px) { .nzgad-overview { grid-template-columns: minmax(0, 1fr); } }

.nzgad a.nzgad-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 120px;
	padding: 18px 18px 16px;
	background: var(--nzgad-surface);
	border: 1px solid var(--nzgad-border);
	border-top: 4px solid var(--nzgad-accent);
	border-radius: var(--nzgad-radius);
	color: inherit;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.nzgad a.nzgad-tile:hover,
.nzgad a.nzgad-tile:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, .09);
	color: inherit;
	text-decoration: none;
}
.nzgad-tile__title {
	font-family: var(--wpex-heading-font-family, inherit);
	font-weight: 500;
	font-size: 1.08em;
	line-height: 1.3;
	color: var(--wpex-heading-color, inherit);
	hyphens: auto;
	overflow-wrap: break-word;
}
.nzgad-tile__date { font-size: .92em; color: var(--wpex-text-1, #222); font-weight: 500; }
.nzgad-tile__status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 8px;
	font-size: .9em;
	font-weight: 500;
}
.nzgad-tile.is-open .nzgad-tile__status { color: var(--nzgad-open); }
.nzgad-tile.is-full .nzgad-tile__status { color: var(--nzgad-full); }

.nzgad-dot {
	display: inline-block;
	flex: none;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--nzgad-open);
	box-shadow: 0 0 0 3px rgba(30, 142, 62, .15);
}
.is-full .nzgad-dot, .nzgad-dot.is-full { background: var(--nzgad-full); box-shadow: 0 0 0 3px rgba(198, 40, 40, .15); }
.is-past .nzgad-dot { background: #9e9e9e; box-shadow: none; }

.nzgad-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 18px 0 0;
	font-size: .9em;
	color: var(--nzgad-muted);
}
.nzgad-legend > span { display: inline-flex; align-items: center; gap: 8px; }

/* Fest */
.nzgad-event { scroll-margin-top: 120px; }
.nzgad-js .nzgad-event + .nzgad-event { margin-top: 0; }
.nzgad-event + .nzgad-event { margin-top: 48px; }
.nzgad-overview + .nzgad-legend + .nzgad-event { margin-top: 48px; }
.nzgad-js .nzgad-overview + .nzgad-legend + .nzgad-event { margin-top: 0; }
.nzgad a.nzgad-back {
	display: inline-block;
	margin-bottom: 14px;
	font-weight: 500;
	color: var(--nzgad-accent);
	text-decoration: none;
}
.nzgad a.nzgad-back:hover { text-decoration: underline; }
.nzgad-event__head { margin-bottom: 18px; }
.nzgad .nzgad-event__title { margin: 0 0 4px; }
.nzgad .nzgad-event__date { margin: 4px 0 0; color: var(--nzgad-accent); font-size: 1.25em; font-weight: 500; }
.nzgad-event__desc { margin-top: 10px; }

/* Schichten */
.nzgad-shifts { display: grid; gap: 12px; }
.nzgad-shift {
	background: var(--nzgad-surface);
	border: 1px solid var(--nzgad-border);
	border-left: 5px solid var(--nzgad-open);
	border-radius: var(--nzgad-radius);
	padding: 16px 18px;
}
.nzgad-shift.is-full { border-left-color: var(--nzgad-full); }
.nzgad-shift.is-past { border-left-color: #bdbdbd; opacity: .7; }
.nzgad-shift__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(170px, 240px) auto;
	gap: 12px 24px;
	align-items: center;
}
.nzgad .nzgad-shift__title { margin: 0; font-size: 1.1em; line-height: 1.3; }
.nzgad .nzgad-shift__meta { margin: 3px 0 0; color: var(--wpex-text-2, #444); font-size: .95em; font-weight: 500; }
.nzgad .nzgad-shift__note { margin: 4px 0 0; font-size: .9em; }
.nzgad-shift__status {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	font-size: .95em;
	color: var(--nzgad-open);
}
.is-full .nzgad-shift__status { color: var(--nzgad-full); }
.is-past .nzgad-shift__status { color: var(--nzgad-muted); }
.nzgad-bar {
	display: block;
	height: 6px;
	margin-top: 8px;
	background: var(--nzgad-surface-2);
	border-radius: 6px;
	overflow: hidden;
}
.nzgad-bar > span {
	display: block;
	height: 100%;
	background: var(--nzgad-open);
	border-radius: 6px;
	transition: width .3s ease;
}
.is-full .nzgad-bar > span { background: var(--nzgad-full); }
.is-past .nzgad-bar > span { background: #bdbdbd; }

.nzgad .nzgad-btn {
	min-width: 130px;
	text-align: center;
	cursor: pointer;
}
.nzgad .nzgad-btn[disabled] {
	cursor: default;
	opacity: .55;
	background: #9e9e9e;
	color: #fff;
}
.nzgad .nzgad-btn.is-loading { opacity: .7; }

@container (max-width: 700px) {
	.nzgad-shift__row { grid-template-columns: minmax(0, 1fr) auto; }
	.nzgad-shift__cap { grid-column: 1 / -1; grid-row: 2; }
	.nzgad-shift__action { grid-column: 2; grid-row: 1; align-self: start; }
}
@container (max-width: 480px) {
	.nzgad-shift { padding: 14px; }
	.nzgad-shift__row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.nzgad-shift__cap, .nzgad-shift__action { grid-column: auto; grid-row: auto; }
	.nzgad .nzgad-btn { width: 100%; }
}

/* Formular */
.nzgad-form {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px dashed var(--nzgad-border);
}
.nzgad-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 18px;
}
@container (max-width: 560px) { .nzgad-form__grid { grid-template-columns: minmax(0, 1fr); } }
.nzgad .nzgad-field { margin: 0; }
.nzgad .nzgad-field label { display: block; margin-bottom: 4px; font-weight: 500; font-size: .95em; }
.nzgad .nzgad-field input { width: 100%; }
/* Weitere Personen */
.nzgad-extra-add { display: none; }
.nzgad.nzgad-js .nzgad-extra-add { display: block; margin: 14px 0 0; }
.nzgad .nzgad-add-person {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 0;
	background: none;
	border: 0;
	color: var(--nzgad-muted);
	font: inherit;
	font-size: .88em;
	font-weight: 400;
	cursor: pointer;
}
.nzgad .nzgad-add-person:hover,
.nzgad .nzgad-add-person:focus-visible { color: var(--wpex-text-1, #222); background: none; text-decoration: underline; }
.nzgad .nzgad-plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
	font-weight: 400;
}
.nzgad-extras { display: grid; gap: 12px; }
.nzgad-extras:not(:empty) { margin-top: 12px; }
.nzgad .nzgad-optional { font-weight: 400; color: var(--nzgad-muted); }
.nzgad .nzgad-extra__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.nzgad .nzgad-extra__head label { margin-bottom: 0; }
.nzgad .nzgad-extra__remove {
	padding: 0;
	background: none;
	border: 0;
	color: var(--nzgad-muted);
	font: inherit;
	font-size: .85em;
	font-weight: 400;
	cursor: pointer;
}
.nzgad .nzgad-extra__remove:hover,
.nzgad .nzgad-extra__remove:focus-visible { color: var(--nzgad-full); background: none; text-decoration: underline; }
.nzgad .nzgad-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 22px 0 0; }
.nzgad .nzgad-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.nzgad .nzgad-msg { margin: 12px 0 0; font-weight: 500; }
.nzgad .nzgad-msg:empty { display: none; }
.nzgad .nzgad-msg.is-success { color: var(--nzgad-open); }
.nzgad .nzgad-msg.is-error { color: var(--nzgad-full); }
.nzgad-shift.is-done .nzgad-form { border-top-style: solid; }

.nzgad .nzgad-hint {
	margin: 24px 0 0;
	padding: 14px 18px;
	background: var(--nzgad-surface-2);
	border-left: 4px solid var(--nzgad-accent);
	border-radius: 10px;
	color: var(--wpex-text-1, #222);
	font-size: 1em;
	font-weight: 500;
	line-height: 1.55;
}
.nzgad .nzgad-hint a { color: var(--nzgad-accent); font-weight: 500; }
.nzgad .nzgad-empty { padding: 18px; background: var(--nzgad-surface-2); border-radius: var(--nzgad-radius); }
