/* Casa Gelsomino – Belegungskalender (Buchungsseite und Schnellbuchung auf der Startseite). */
.cg-cal, .cg-qb-pop {
	--b-ink: var(--cg-ink, #1C2B36);
	--b-lake: var(--cg-lake, #1F4E6B);
	--b-lake-d: var(--cg-lake-dark, #163A50);
	--b-sky: var(--cg-sky, #EAF1F5);
	--b-line: var(--cg-line, #DCD6CC);
	--b-muted: var(--cg-muted, #5E6B74);
	--b-ok: #2F6B45;
	--b-r: var(--cg-radius, 6px);
}
/* Anzahl der Monate richtet sich nach der Breite des Kalenders selbst (nicht des Fensters). */
.cg-cal { position: relative; container-type: inline-size; min-width: 0; }
.cg-cal__status { background: var(--b-sky); border-radius: var(--b-r); padding: 12px 16px; margin: 0 0 16px; font-size: .95rem; color: var(--b-lake-d); min-height: 22px; }
.cg-cal__status.is-complete { background: #E8F1EA; color: var(--b-ok); }
.cg-cal__nav { position: relative; height: 0; overflow: visible; display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; z-index: 1; }
.cg-cal__nav button { pointer-events: auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--b-line); background: #fff; color: var(--b-ink); font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; }
.cg-cal__nav button:hover:not(:disabled) { border-color: var(--b-lake); color: var(--b-lake); }
.cg-cal__nav button:disabled { opacity: .3; cursor: default; }
.cg-cal__months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.cg-cal__months.is-single { grid-template-columns: minmax(0, 1fr); }
.cg-cal__month { min-width: 0; }
/* Ein Monat über die volle Breite: Tage nicht quadratisch aufblähen. */
.cg-cal__months.is-single .cg-cal__day { aspect-ratio: auto; height: 44px; min-height: 0; }
.cg-cal__title { text-align: center; font-weight: 600; font-size: 1rem; height: 38px; line-height: 38px; margin-bottom: 8px; color: var(--b-ink); }
.cg-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.cg-cal__dow { text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--b-muted); padding: 4px 0 8px; }
.cg-cal__day {
	position: relative; aspect-ratio: 1 / 1; min-height: 38px; min-width: 0; border: 0; background: transparent; font: inherit; font-size: .92rem; color: var(--b-ink);
	cursor: pointer; border-radius: 0; padding: 0; transition: background .1s;
}
.cg-cal__day:hover:not(:disabled) { background: var(--b-sky); border-radius: var(--b-r); }
.cg-cal__day:disabled { cursor: default; }
.cg-cal__day.is-past { color: #BDB6AB; }
.cg-cal__day.is-booked { color: #A79F93; background: repeating-linear-gradient(135deg, #F1ECE4 0 4px, #E7E0D5 4px 8px); text-decoration: line-through; }
.cg-cal__day.is-booked-start { border-radius: var(--b-r) 0 0 var(--b-r); }
.cg-cal__day.is-booked.is-booked-end, .cg-cal__day.is-booked:has(+ .cg-cal__day:not(.is-booked)) { border-radius: 0 var(--b-r) var(--b-r) 0; }
.cg-cal__day.is-booked-start.is-booked:has(+ .cg-cal__day:not(.is-booked)) { border-radius: var(--b-r); }
.cg-cal__day.is-unavailable-dep:not(.is-booked):not(:disabled) { color: #9A9187; }
.cg-cal__day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--b-lake); }
.cg-cal__day.is-in { background: var(--b-sky); border-radius: 0; color: var(--b-lake-d); }
.cg-cal__day.is-arr, .cg-cal__day.is-dep { background: var(--b-lake) !important; color: #fff !important; font-weight: 600; text-decoration: none; }
.cg-cal__day.is-arr { border-radius: var(--b-r) 0 0 var(--b-r); }
.cg-cal__day.is-dep { border-radius: 0 var(--b-r) var(--b-r) 0; }
.cg-cal__day.is-arr:not(:has(~ .is-in)):not(:has(~ .is-dep)) { border-radius: var(--b-r); }
.cg-cal__day.is-hover { background: var(--b-lake-d) !important; color: #fff; border-radius: 0 var(--b-r) var(--b-r) 0; }
.cg-cal__day:focus-visible { outline: 2px solid var(--b-lake); outline-offset: -2px; z-index: 1; }
.cg-cal__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--b-line); }
.cg-cal__legend { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; font-size: .8rem; color: var(--b-muted); flex-wrap: wrap; }
.cg-cal__legend li { display: flex; align-items: center; gap: 6px; }
.cg-cal__legend li::before { content: ""; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--b-line); background: #fff; }
.cg-cal__legend .l-booked::before { background: repeating-linear-gradient(135deg, #F1ECE4 0 3px, #E2DACE 3px 6px); }
.cg-cal__legend .l-sel::before { background: var(--b-lake); border-color: var(--b-lake); }
.cg-link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: .85rem; color: var(--b-lake); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@container (max-width: 539px) {
	.cg-cal__months { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.cg-cal__day { aspect-ratio: auto; height: 44px; min-height: 0; font-size: 1rem; }
}
