/**
 * Gastronomiecenter Haumer – Interne Produktdaten: Mitarbeiterzugang.
 *
 * Geladen nur auf der Anmeldeseite und – für Leseberechtigte – auf
 * Produktseiten. Alles unter .gcth-office bzw. .gcth-office-panel; keine
 * globalen Element-Regeln, kein !important. Farben und Rundung aus den
 * zentralen Website-Token (--hgm-*) mit den gemeinsamen Rückfallwerten
 * (_hub/knowledge/haumer-design-tokens.md); dieses Plugin definiert keine
 * --hgm-*-Token. Die erhöhte Spezifität setzt sich gegen globale
 * Elementor-/Theme-Knopf- und Feldstile durch.
 */

.gcth-office,
.gcth-office-panel {
	--gcth-accent: var(--hgm-brand-red, #d9001c);
	--gcth-accent-hover: var(--hgm-brand-red-hover, #b80018);
	--gcth-accent-contrast: var(--hgm-brand-red-contrast, #ffffff);
	--gcth-radius: var(--hgm-button-radius, 3px);
	--gcth-text: #212020;
	--gcth-secondary: #2d2e30;
	--gcth-muted: #5f5f5f;
	--gcth-border: #d9d9d9;
	--gcth-line: #efefef;
	--gcth-surface: #f6f6f6;
	--gcth-focus: #1a5fb4;
	--gcth-error: #b3261e;
	--gcth-error-bg: #fdecea;
	--gcth-ok: #1e6b35;
	--gcth-ok-bg: #e8f3ec;
	--gcth-info-bg: #eef3fa;
	--gcth-warn: #8a5a00;
	--gcth-touch: 44px;
	color: var(--gcth-text);
	box-sizing: border-box;
}

.gcth-office *,
.gcth-office *::before,
.gcth-office *::after,
.gcth-office-panel *,
.gcth-office-panel *::before,
.gcth-office-panel *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------ Anmeldung */

.gcth-office {
	display: flex;
	justify-content: center;
	padding: clamp(1rem, 4vw, 3rem) 0;
	width: 100%;
}

.gcth-office .gcth-office__card {
	background: #fff;
	border: 1px solid var(--gcth-line);
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
	max-width: 440px;
	padding: clamp(1.25rem, 5vw, 2.25rem);
	width: 100%;
}

.gcth-office .gcth-office__eyebrow {
	color: var(--gcth-accent);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	margin: 0 0 0.35rem;
	text-transform: uppercase;
}

.gcth-office .gcth-office__title {
	color: var(--gcth-secondary);
	font-size: clamp(1.5rem, 4vw, 1.85rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 1rem;
	padding: 0;
}

.gcth-office .gcth-office__text {
	color: var(--gcth-muted);
	font-size: 1rem;
	line-height: 1.5;
	margin: 0 0 1rem;
}

.gcth-office .gcth-office__form {
	margin: 0;
}

.gcth-office .gcth-office__field {
	margin: 0 0 1rem;
}

.gcth-office .gcth-office__label {
	color: var(--gcth-text);
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 0.35rem;
}

.gcth-office .gcth-office__input {
	background: #fff;
	border: 1px solid var(--gcth-border);
	border-radius: var(--gcth-radius);
	box-shadow: none;
	color: var(--gcth-text);
	font: inherit;
	font-size: 1rem; /* ≥ 16 px: kein Zoom auf iOS */
	line-height: 1.4;
	margin: 0;
	min-height: var(--gcth-touch);
	padding: 0.6rem 0.75rem;
	width: 100%;
}

.gcth-office .gcth-office__input:focus {
	border-color: var(--gcth-focus);
	outline: 2px solid var(--gcth-focus);
	outline-offset: 1px;
}

.gcth-office .gcth-office__input[aria-invalid="true"] {
	border-color: var(--gcth-error);
}

.gcth-office .gcth-office__password {
	position: relative;
}

.gcth-office .gcth-office__password .gcth-office__input {
	padding-right: 6.5rem;
}

.gcth-office .gcth-office__toggle {
	background: transparent;
	border: 0;
	border-radius: var(--gcth-radius);
	box-shadow: none;
	color: var(--gcth-secondary);
	cursor: pointer;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1;
	margin: 0;
	min-height: 36px;
	min-width: 5.5rem;
	padding: 0.4rem 0.6rem;
	position: absolute;
	right: 4px;
	text-decoration: underline;
	text-transform: none;
	top: 50%;
	transform: translateY(-50%);
}

.gcth-office .gcth-office__toggle:hover {
	background: var(--gcth-surface);
	color: var(--gcth-text);
}

.gcth-office .gcth-office__toggle:focus-visible {
	outline: 2px solid var(--gcth-focus);
	outline-offset: 1px;
}

.gcth-office .gcth-office__toggle[hidden] {
	display: none;
}

.gcth-office .gcth-office__check {
	align-items: center;
	color: var(--gcth-text);
	cursor: pointer;
	display: inline-flex;
	font-size: 0.95rem;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	min-height: var(--gcth-touch);
}

.gcth-office .gcth-office__check input {
	height: 1.15rem;
	margin: 0;
	width: 1.15rem;
}

.gcth-office .gcth-office__check input:focus-visible {
	outline: 2px solid var(--gcth-focus);
	outline-offset: 2px;
}

/* Knöpfe – gemeinsam für Anmeldung und angemeldeten Zustand */
.gcth-office .gcth-office__btn {
	align-items: center;
	border: 0;
	border-radius: var(--gcth-radius);
	box-shadow: none;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	justify-content: center;
	letter-spacing: normal;
	line-height: 1.3;
	margin: 0;
	min-height: var(--gcth-touch);
	padding: 0.7rem 1.4rem;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.gcth-office .gcth-office__btn--primary {
	background: var(--gcth-accent);
	color: var(--gcth-accent-contrast);
}

.gcth-office .gcth-office__btn--primary:hover,
.gcth-office .gcth-office__btn--primary:focus-visible {
	background: var(--gcth-accent-hover);
	color: var(--gcth-accent-contrast);
}

.gcth-office .gcth-office__btn--secondary {
	background: #fff;
	box-shadow: inset 0 0 0 1.5px var(--gcth-secondary);
	color: var(--gcth-secondary);
}

.gcth-office .gcth-office__btn--secondary:hover,
.gcth-office .gcth-office__btn--secondary:focus-visible {
	background: var(--gcth-surface);
	color: var(--gcth-text);
}

.gcth-office .gcth-office__btn:focus-visible {
	outline: 2px solid var(--gcth-focus);
	outline-offset: 2px;
}

.gcth-office .gcth-office__btn[disabled],
.gcth-office .gcth-office__btn[aria-busy="true"] {
	cursor: progress;
	opacity: 0.75;
}

.gcth-office .gcth-office__submit {
	width: 100%;
}

.gcth-office .gcth-office__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.5rem 0 0;
}

.gcth-office .gcth-office__actions .gcth-office__btn {
	flex: 1 1 10rem;
}

.gcth-office .gcth-office__links {
	font-size: 0.95rem;
	margin: 1rem 0 0;
	text-align: center;
}

.gcth-office .gcth-office__links a {
	color: var(--gcth-secondary);
	text-decoration: underline;
}

.gcth-office .gcth-office__links a:hover,
.gcth-office .gcth-office__links a:focus-visible {
	color: var(--gcth-accent);
}

.gcth-office .gcth-office__fineprint {
	border-top: 1px solid var(--gcth-line);
	color: var(--gcth-muted);
	font-size: 0.85rem;
	margin: 1.25rem 0 0;
	padding-top: 1rem;
	text-align: center;
}

.gcth-office .gcth-office__notice {
	border-left: 4px solid;
	border-radius: var(--gcth-radius);
	font-size: 0.95rem;
	line-height: 1.45;
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem;
}

.gcth-office .gcth-office__notice--error {
	background: var(--gcth-error-bg);
	border-color: var(--gcth-error);
	color: #6b1610;
}

.gcth-office .gcth-office__notice--success {
	background: var(--gcth-ok-bg);
	border-color: var(--gcth-ok);
	color: #133f20;
}

.gcth-office .gcth-office__notice--info {
	background: var(--gcth-info-bg);
	border-color: var(--gcth-focus);
	color: #12315c;
}

/* ------------------------------------------------- Office-Bereich (Produkt) */

.gcth-office-panel {
	border: 2px dashed var(--gcth-warn);
	border-radius: 6px;
	clear: both;
	margin: 1.5rem 0;
	padding: 0.8rem 1rem;
}

.gcth-office-panel .gcth-office-panel__head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: space-between;
}

.gcth-office-panel .gcth-office-panel__title {
	color: var(--gcth-warn);
	font-size: 1em;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	padding: 0;
	text-transform: none;
}

.gcth-office-panel .gcth-office-panel__btn {
	background: transparent;
	border: 0;
	border-radius: var(--gcth-radius);
	box-shadow: inset 0 0 0 1.5px currentColor;
	color: var(--gcth-text);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.9em;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.4;
	margin: 0;
	min-height: var(--gcth-touch);
	padding: 0.6em 1.2em;
	text-shadow: none;
	text-transform: none;
}

.gcth-office-panel .gcth-office-panel__btn:hover,
.gcth-office-panel .gcth-office-panel__btn:focus-visible {
	background: rgba(0, 0, 0, 0.04);
	color: var(--gcth-text);
}

.gcth-office-panel .gcth-office-panel__btn:focus-visible {
	outline: 2px solid var(--gcth-focus);
	outline-offset: 2px;
}

.gcth-office-panel .gcth-office-panel__body {
	margin-top: 0.8rem;
}

.gcth-office-panel .gcth-office-panel__body[hidden] {
	display: none;
}

.gcth-office-panel .gcth-office-panel__list {
	display: grid;
	gap: 0.3rem 1rem;
	grid-template-columns: max-content 1fr;
	margin: 0 0 0.8rem;
}

.gcth-office-panel .gcth-office-panel__list dt {
	font-weight: 600;
	margin: 0;
}

.gcth-office-panel .gcth-office-panel__list dd {
	margin: 0;
	overflow-wrap: anywhere;
	white-space: pre-line;
}

.gcth-office-panel .gcth-office-panel__docs {
	margin: 0 0 0.8rem;
	padding-left: 1.2rem;
}

.gcth-office-panel .gcth-office-panel__docs li {
	margin: 0.2rem 0;
}

.gcth-office-panel .gcth-office-panel__docs a,
.gcth-office-panel .gcth-office-panel__edit,
.gcth-office-panel .gcth-office-panel__msg a {
	color: var(--gcth-secondary);
	text-decoration: underline;
}

.gcth-office-panel .gcth-office-panel__msg {
	margin: 0;
}

.gcth-office-panel .gcth-office-panel__session {
	color: var(--gcth-muted);
	font-size: 0.85em;
	margin: 0.6rem 0 0;
}

.gcth-office-panel .gcth-office-panel__session a {
	color: var(--gcth-secondary);
	text-decoration: underline;
}

@media (max-width: 600px) {
	.gcth-office-panel .gcth-office-panel__list {
		grid-template-columns: 1fr;
	}

	.gcth-office-panel .gcth-office-panel__list dd {
		margin-bottom: 0.4rem;
	}

	.gcth-office-panel .gcth-office-panel__btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gcth-office .gcth-office__btn {
		transition: none;
	}
}
