/* NZH Zunftstube – alle Regeln sind auf .nzh-zs begrenzt, damit das Theme unberührt bleibt.
   Die Farben --nzh-primary, --nzh-busy und --nzh-ok samt Abstufungen kommen aus den
   Einstellungen des Plugins. Die Werte hier sind nur der Rückfall. */
.nzh-zs {
	--nzh-primary: #bd0a26;
	--nzh-primary-text: #fff;
	--nzh-primary-hover: #97081e;
	--nzh-primary-soft: #f8e7e9;
	--nzh-primary-ink: #bd0a26;
	--nzh-busy: #bd0a26;
	--nzh-busy-text: #fff;
	--nzh-busy-soft: #f4d4d9;
	--nzh-ok: #1d6b2a;
	--nzh-ok-soft: #dfece1;
	--nzh-ok-ink: #1d6b2a;
	--nzh-border: #c9c9c9;
	--nzh-text: #1f1f1f;
	--nzh-muted: #555;
	--nzh-req: #444;
	--nzh-error: #a11818;
	--nzh-error-soft: #fbe3e3;
	color: var(--nzh-text);
	max-width: 760px;
	margin: 0 auto 2em;
	line-height: 1.5;
	font-size: 16px;
}
.nzh-zs *, .nzh-zs *::before, .nzh-zs *::after { box-sizing: border-box; }
.nzh-zs h3 { font-size: 1.25em; margin: 1em 0 .5em; padding: 0; }
.nzh-zs h4 { font-size: 1.1em; margin: 0 0 .5em; padding: 0; }
.nzh-zs p { margin: 0 0 .8em; padding: 0; }
.nzh-zs a { text-decoration: underline; }
.nzh-zs :focus-visible { outline: 3px solid #1f1f1f; outline-offset: 2px; }
.nzh-zs [hidden] { display: none !important; }
.nzh-zs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hinweise */
.nzh-zs-msg { border: 1px solid var(--nzh-border); border-left-width: 6px; padding: .7em .9em; border-radius: 4px; background: #fff; }
.nzh-zs-msg-info { background: #f4f4f4; border-color: var(--nzh-border); border-left-color: var(--nzh-primary); }
.nzh-zs-msg-ok { background: var(--nzh-ok-soft); border-color: var(--nzh-ok); }
.nzh-zs-msg-error { background: var(--nzh-error-soft); border-color: var(--nzh-error); }
.nzh-zs-hint { color: var(--nzh-muted); font-size: .9em; }

/* Schaltflächen */
.nzh-zs .nzh-zs-btn {
	display: inline-block; min-height: 44px; padding: .55em 1em; margin: 0;
	border: 2px solid var(--nzh-primary); border-radius: 6px;
	background: #fff; color: var(--nzh-primary-ink);
	font: inherit; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer;
	box-shadow: none; text-shadow: none; height: auto;
}
.nzh-zs .nzh-zs-btn:hover { background: var(--nzh-primary-soft); color: var(--nzh-primary-ink); }
.nzh-zs .nzh-zs-btn-primary { background: var(--nzh-primary); color: var(--nzh-primary-text); }
.nzh-zs .nzh-zs-btn-primary:hover { background: var(--nzh-primary-hover); border-color: var(--nzh-primary-hover); color: var(--nzh-primary-text); }
.nzh-zs .nzh-zs-btn-danger { background: var(--nzh-text); border-color: var(--nzh-text); color: #fff; }
.nzh-zs .nzh-zs-btn-danger:hover { background: #000; border-color: #000; color: #fff; }
.nzh-zs .nzh-zs-btn-link { border-color: transparent; text-decoration: underline; font-weight: 400; }
.nzh-zs .nzh-zs-btn:disabled { opacity: .5; cursor: not-allowed; }
.nzh-zs button, .nzh-zs a { -webkit-tap-highlight-color: transparent; }
.nzh-zs-actions { display: flex; flex-wrap: wrap; gap: .5em; margin: .8em 0; }

/* Kalender */
.nzh-zs-cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
.nzh-zs-cal-head .nzh-zs-btn { min-width: 48px; font-size: 1.4em; padding: .2em .5em; }
.nzh-zs .nzh-zs-cal-title { margin: 0; text-align: center; flex: 1; }
.nzh-zs-cal-status { min-height: 1.5em; margin: .3em 0; color: var(--nzh-muted); }
.nzh-zs .nzh-zs-cal-table { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; margin: 0; border: 0; }
.nzh-zs .nzh-zs-cal-table th { text-align: center; font-weight: 600; padding: .3em 0; border: 0; background: none; color: var(--nzh-muted); }
.nzh-zs .nzh-zs-cal-table td { padding: 0; border: 0; background: none; }
.nzh-zs .nzh-zs-daybtn {
	display: flex; flex-direction: column; align-items: center; justify-content: space-between;
	width: 100%; min-height: 52px; height: auto; padding: 4px 2px 3px; margin: 0;
	border: 2px solid var(--nzh-border); border-radius: 6px;
	background: #fff; color: var(--nzh-text); font: inherit; line-height: 1.15; cursor: pointer;
	box-shadow: none; text-shadow: none;
}
.nzh-zs .nzh-zs-daybtn:hover { border-color: var(--nzh-text); }
.nzh-zs-daynum { font-weight: 600; }
.nzh-zs-daysym { font-size: .9em; min-height: 1.15em; font-weight: 700; }
/* belegt: ganze Fläche gefüllt */
.nzh-zs .nzh-zs-daybtn.is-belegt { background: var(--nzh-busy); border-color: var(--nzh-busy); color: var(--nzh-busy-text); }
/* teilweise belegt: untere Hälfte gefüllt */
.nzh-zs .nzh-zs-daybtn.is-teil { background: linear-gradient(to top, var(--nzh-busy) 0, var(--nzh-busy) 46%, #fff 46%, #fff 100%); border-color: var(--nzh-busy); }
.nzh-zs .nzh-zs-daybtn.is-teil .nzh-zs-daysym { color: var(--nzh-busy-text); }
/* angefragt: gestrichelter Rahmen */
.nzh-zs .nzh-zs-daybtn.has-req { border-style: dashed; }
.nzh-zs .nzh-zs-daybtn.is-frei.has-req { border-color: var(--nzh-req); }
.nzh-zs .nzh-zs-daybtn.is-today .nzh-zs-daynum { text-decoration: underline; }
.nzh-zs .nzh-zs-daybtn.is-past { opacity: .45; }
.nzh-zs .nzh-zs-daybtn.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--nzh-text); }
.nzh-zs .nzh-zs-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4em 1.2em; margin: .8em 0 1em; padding: 0; font-size: .9em; color: var(--nzh-muted); }
.nzh-zs .nzh-zs-legend li { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: .4em; }
.nzh-zs-swatch { display: inline-block; width: 1.3em; height: 1.3em; border: 2px solid var(--nzh-border); border-radius: 4px; background: #fff; flex: none; }
.nzh-zs-swatch.is-belegt { background: var(--nzh-busy); border-color: var(--nzh-busy); }
.nzh-zs-swatch.is-teil { background: linear-gradient(to top, var(--nzh-busy) 0, var(--nzh-busy) 50%, #fff 50%, #fff 100%); border-color: var(--nzh-busy); }
.nzh-zs-swatch.is-req { border-style: dashed; border-color: var(--nzh-req); }
.nzh-zs-sym { display: inline-block; min-width: 1.1em; text-align: center; font-weight: 700; }
.nzh-zs-day { margin: 1em 0; }
.nzh-zs .nzh-zs-slots { list-style: none; margin: 0 0 .8em; padding: 0; }
.nzh-zs .nzh-zs-slots li { list-style: none; margin: 0 0 .3em; padding: .45em .7em; border: 1px solid var(--nzh-border); border-left-width: 6px; border-radius: 4px; background: #fff; }
.nzh-zs .nzh-zs-slots li.is-belegt { border-left-color: var(--nzh-busy); }
.nzh-zs .nzh-zs-slots li.is-angefragt { border: 2px dashed var(--nzh-req); }

/* Formulare */
.nzh-zs-form, .nzh-zs-actionform { border: 1px solid var(--nzh-border); border-radius: 6px; padding: 1em; margin: 1em 0; background: #fafafa; }
.nzh-zs-field { margin: 0 0 .9em; }
.nzh-zs .nzh-zs-field label, .nzh-zs fieldset legend { display: block; font-weight: 600; margin: 0 0 .2em; padding: 0; }
.nzh-zs .nzh-zs-field input, .nzh-zs .nzh-zs-field select, .nzh-zs .nzh-zs-field textarea {
	display: block; width: 100%; max-width: none; min-height: 44px; padding: .5em .6em; margin: 0;
	border: 1px solid #767676; border-radius: 4px; background-color: #fff; color: var(--nzh-text); font: inherit; line-height: 1.4;
}
.nzh-zs fieldset { border: 0; margin: 0 0 .5em; padding: 0; min-width: 0; }
.nzh-zs fieldset.nzh-zs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8em; }
.nzh-zs fieldset.nzh-zs-row legend, .nzh-zs fieldset.nzh-zs-row .nzh-zs-hint { grid-column: 1 / -1; }
.nzh-zs fieldset.nzh-zs-row .nzh-zs-field label { font-weight: 400; font-size: .9em; }
.nzh-zs-check { display: flex; gap: .6em; align-items: flex-start; margin: 0 0 .9em; }
.nzh-zs .nzh-zs-check input { width: 22px; height: 22px; min-width: 22px; margin: .15em 0 0; flex: none; }
.nzh-zs .nzh-zs-check label { margin: 0; font-weight: 400; }
.nzh-zs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Verwaltung */
.nzh-zs-userline { color: var(--nzh-muted); font-size: .9em; }
.nzh-zs-tabs { display: flex; flex-wrap: wrap; gap: .4em; margin: 0 0 1em; }
.nzh-zs .nzh-zs-tab.is-active, .nzh-zs .nzh-zs-tab.is-active:hover { background: var(--nzh-primary); color: var(--nzh-primary-text); }
.nzh-zs-card { border: 1px solid var(--nzh-border); border-left-width: 6px; border-radius: 6px; padding: .9em 1em; margin: 0 0 1em; background: #fff; }
.nzh-zs-card.is-requested { border: 2px dashed var(--nzh-req); }
.nzh-zs-card.is-confirmed { border-left-color: var(--nzh-ok); }
.nzh-zs-card.is-rejected, .nzh-zs-card.is-cancelled, .nzh-zs-card.is-withdrawn { border-left-color: #767676; }
.nzh-zs .nzh-zs-card h3 { margin-top: 0; }
.nzh-zs-badges { display: flex; flex-wrap: wrap; gap: .4em; }
.nzh-zs-badge { display: inline-block; padding: .1em .6em; border: 1px solid #767676; border-radius: 999px; font-size: .85em; background: #f1f1f1; }
.nzh-zs-badge.is-confirmed { background: var(--nzh-ok-soft); border-color: var(--nzh-ok); }
.nzh-zs-badge.is-requested { background: #fff; border-style: dashed; border-color: var(--nzh-req); }
.nzh-zs .nzh-zs-details { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; gap: .2em .8em; margin: .5em 0; }
.nzh-zs .nzh-zs-details dt { font-weight: 600; margin: 0; padding: 0; }
.nzh-zs .nzh-zs-details dd { margin: 0; padding: 0; overflow-wrap: anywhere; white-space: pre-line; }
.nzh-zs .nzh-zs-log { margin: 0 0 .5em 1.2em; padding: 0; font-size: .9em; }
.nzh-zs-checks { margin: 0 0 .9em; }

/* Im WordPress-Backend linksbündig */
.wrap .nzh-zs { margin-left: 0; margin-top: 1em; }

@media (max-width: 480px) {
	.nzh-zs .nzh-zs-cal-table { border-spacing: 2px; }
	.nzh-zs .nzh-zs-daybtn { min-height: 46px; }
	.nzh-zs .nzh-zs-details { grid-template-columns: 1fr; }
	.nzh-zs .nzh-zs-details dd { margin-bottom: .4em; }
	.nzh-zs-actions .nzh-zs-btn { flex: 1 1 100%; text-align: center; }
}
