/* Gruppenhaus Buchungsmanager – Frontend. Farben kommen vom Theme (CSS-Variablen), mit Fallbacks. */
.ghb {
	--ghb-occ: var(--tanne, #0f3d3e);      /* Farbe belegter Tage */
	--ghb-strong: var(--tanne, #0f3d3e);   /* Textfarbe für Hervorhebungen (Monat, Zeitraum, Links) */
	--ghb-acc: var(--holz, #d9532b);
	--ghb-acc-d: var(--holz-d, #b53f1c);
	--ghb-free: #f1f5f4;
	--ghb-line: #d6e0dd;
	--ghb-ink: var(--tinte, #12201f);
	--ghb-mute: var(--grau, #54625f);
	font-family: var(--sans, inherit);
	color: var(--ghb-ink);
}
.ghb *, .ghb *::before, .ghb *::after { box-sizing: border-box; }
.ghb-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.ghb-h { margin: 0 0 .25em; font-size: 1.25rem; }
.ghb-hint { margin: 0 0 18px; color: var(--ghb-mute); font-size: .95rem; }

/* Kalender */
.ghb-cal { background: #fff; border: 1px solid var(--ghb-line); border-radius: 18px; padding: 18px; min-height: 120px; }
.ghb-loading { color: var(--ghb-mute); margin: 0; }
.ghb-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ghb-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ghb-line); background: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ghb-strong); }
.ghb-nav button:hover:not(:disabled) { background: var(--ghb-free); }
.ghb-nav button:disabled { opacity: .3; cursor: default; }
.ghb-nav-title { font-weight: 600; font-size: .95rem; color: var(--ghb-mute); }
.ghb-months { display: grid; gap: 24px; }
.ghb-months.n2 { grid-template-columns: 1fr 1fr; }
.ghb-mtitle { font-weight: 700; margin-bottom: 8px; text-align: center; color: var(--ghb-strong); }
.ghb-mgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ghb-wd { text-align: center; font-size: .72rem; color: var(--ghb-mute); padding-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.ghb-day {
	appearance: none; border: 1px solid var(--ghb-line); background: var(--ghb-free); color: var(--ghb-ink);
	aspect-ratio: 1; border-radius: 8px; padding: 0; font: inherit; font-size: .9rem; cursor: pointer; position: relative;
	display: flex; align-items: center; justify-content: center; transition: box-shadow .12s, transform .12s;
}
.ghb-day span { position: relative; z-index: 1; }
.ghb-day:hover:not(:disabled) { box-shadow: 0 0 0 2px var(--ghb-acc); z-index: 2; }
.ghb-day:focus-visible { outline: 3px solid var(--ghb-acc); outline-offset: 1px; z-index: 3; }
.ghb-day:disabled { cursor: default; }
.ghb-past { opacity: .35; background: transparent; border-color: transparent; }
.ghb-full { background: var(--ghb-occ); border-color: var(--ghb-occ); color: #fff; }
/* halb belegt: Abreisetag = oben links belegt, Anreisetag = unten rechts belegt */
.ghb-dep { background: linear-gradient(135deg, var(--ghb-occ) 0 50%, var(--ghb-free) 50% 100%); }
.ghb-arr { background: linear-gradient(135deg, var(--ghb-free) 0 50%, var(--ghb-occ) 50% 100%); }
.ghb-dep span, .ghb-arr span { background: rgba(255,255,255,.88); border-radius: 50%; min-width: 1.6em; height: 1.6em; display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; }
.ghb-inrange { background: #fbe3d9; border-color: #f3c6b3; }
.ghb-sel { box-shadow: 0 0 0 3px var(--ghb-acc); font-weight: 700; z-index: 2; }
.ghb-sel-start, .ghb-sel-end { background-color: var(--ghb-acc); color: #fff; }
.ghb-sel-start.ghb-dep, .ghb-sel-end.ghb-arr { background: var(--ghb-acc); }
.ghb-hintline { margin: 12px 0 0; font-size: .92rem; color: var(--ghb-acc-d); font-weight: 600; }
.ghb-legend { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .84rem; color: var(--ghb-mute); }
.ghb-legend li { display: flex; align-items: center; gap: 8px; }
.ghb-key { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--ghb-line); display: inline-block; flex: none; }
.ghb-key-free { background: var(--ghb-free); }
.ghb-key-full { background: var(--ghb-occ); border-color: var(--ghb-occ); }
.ghb-key-dep { background: linear-gradient(135deg, var(--ghb-occ) 0 50%, var(--ghb-free) 50% 100%); }
.ghb-key-arr { background: linear-gradient(135deg, var(--ghb-free) 0 50%, var(--ghb-occ) 50% 100%); }

/* Formular */
.ghb-row { margin-bottom: 14px; }
.ghb-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ghb-form label { display: block; font-size: .88rem; font-weight: 600; color: var(--ghb-ink); }
.ghb-form label small { font-weight: 400; color: var(--ghb-mute); }
.ghb-form input[type=text], .ghb-form input[type=email], .ghb-form input[type=tel], .ghb-form input[type=date],
.ghb-form input[type=number], .ghb-form select, .ghb-form textarea {
	display: block; width: 100%; margin-top: 5px; padding: 11px 13px; font: inherit; font-weight: 400; color: var(--ghb-ink);
	background: #fff; border: 1px solid #b9c7c3; border-radius: 10px;
}
.ghb-form textarea { resize: vertical; }
.ghb-form input:focus, .ghb-form select:focus, .ghb-form textarea:focus { outline: 3px solid rgba(217, 83, 43, .35); border-color: var(--ghb-acc); }
.ghb-summary { margin: -4px 0 14px; font-weight: 600; color: var(--ghb-strong); min-height: 1.4em; }
.ghb-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .86rem !important; color: var(--ghb-mute) !important; margin: 4px 0 16px; }
.ghb-check input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
.ghb-check a { color: var(--ghb-strong); }
.ghb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ghb-submit {
	appearance: none; border: 2px solid var(--ghb-acc); background: var(--ghb-acc); color: #fff; font: inherit; font-weight: 600;
	padding: 14px 30px; border-radius: 999px; cursor: pointer; transition: .2s;
}
.ghb-submit:hover:not(:disabled) { background: var(--ghb-acc-d); border-color: var(--ghb-acc-d); }
.ghb-submit:disabled { opacity: .6; cursor: wait; }
.ghb-fine { font-size: .82rem; color: var(--ghb-mute); margin: 12px 0 0; }
.ghb-alt { font-size: .9rem; color: var(--ghb-mute); margin-top: 20px; }
.ghb-alt a { color: var(--ghb-strong); }
.ghb-msg { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #fdecea; color: #8a1f11; font-size: .92rem; }
.ghb-notice { padding: 16px 18px; border-radius: 12px; margin-bottom: 16px; }
.ghb-ok { background: #e3f3ef; color: #0c3b37; }
.ghb-bad { background: #fdecea; color: #8a1f11; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
	.ghb-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 520px) {
	.ghb-row-2 { grid-template-columns: 1fr; }
	.ghb-cal { padding: 12px; }
}

/* Zeitraum als ein Feld, gesetzt über den Kalender */
.ghb-range { display: none; align-items: flex-end; gap: 10px; margin: 0 0 6px; }
.ghb.ghb-js .ghb-range { display: flex; }
.ghb-range label { flex: 1; margin: 0; }
.ghb-rangefield { cursor: default; font-weight: 600; }
.ghb-reset { background: none; border: 0; padding: 0 2px 12px; color: var(--ghb-strong); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; white-space: nowrap; }
.ghb.ghb-js .ghb-dates-fallback { display: none; }
.ghb-summary:empty { display: none; }
