/* Herrenteich Belegungskalender – ausschließlich innerhalb von .htbk-calendar */
#verfuegbarkeit {
	scroll-margin-top: 96px;
}

.htbk-calendar {
	--htbk-font-heading: var(--gp-font--lobster-two, "Lobster Two", Georgia, serif);
	--htbk-font-base: var(--gp-font--oxygen, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	--htbk-border: #d8d3c2;
	--htbk-text: #292820;
	--htbk-muted: #68665b;
	--htbk-calendar-background: #ffffff;
	--htbk-shadow: #292820;
	--htbk-free: #dff2e4;
	--htbk-occupied: #c53f3f;
	--htbk-reserved: #e4bf55;
	--htbk-blocked: #77766f;
	--htbk-inquiry: #c98732;
	--htbk-control: #b4a980;
	--htbk-control-hover: #766e52;
	--htbk-button-text: #232119;
	--htbk-button-text-hover: #ffffff;
	--htbk-focus: #766e52;
    --htbk-selected: var(--accent);
	--htbk-day-number-background: #ffffff;
	--htbk-day-number-text: #292820;
	--htbk-panel-background: #f7f5ee;
	--htbk-field-background: #ffffff;
	--htbk-input-border: #a9a38e;
	--htbk-info-background: #f4f1e7;
	--htbk-info-text: #4d493b;
	--htbk-error-background: #fff0f0;
	--htbk-error-text: #861f1f;
	--htbk-error-border: #c62828;
	--htbk-success-background: #edf8ef;
	--htbk-success-text: #155b32;
	--htbk-success-border: #218549;
    width: 100%;
    max-width: 760px;
    min-width: 0;
    margin: 28px auto;
    padding: 22px;
    color: var(--htbk-text);
    background: var(--htbk-calendar-background);
    border: 1px solid var(--htbk-border);
    border-radius: 14px;
    box-shadow: 0 10px 32px color-mix(in srgb, var(--htbk-shadow) 8%, transparent);
    box-sizing: border-box;
    font-family: var(--htbk-font-base);
}

.htbk-calendar *,
.htbk-calendar *::before,
.htbk-calendar *::after {
    box-sizing: border-box;
}

.htbk-calendar h2,
.htbk-calendar h3,
.htbk-calendar h4,
.htbk-calendar h5 {
	color: var(--htbk-text);
	font-family: var(--htbk-font-heading);
}

.htbk-calendar button,
.htbk-calendar input,
.htbk-calendar select,
.htbk-calendar textarea {
	font-family: var(--htbk-font-base);
}

.htbk-calendar-heading {
    margin-bottom: 14px;
    text-align: center;
}

.htbk-calendar-heading h2 {
    margin: 0 0 4px;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.htbk-calendar-heading p {
    margin: 0;
    color: var(--htbk-muted);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.htbk-calendar-toolbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    margin: 14px 0 10px;
}

.htbk-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--htbk-button-text);
    background: var(--htbk-control);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font: inherit;
    font-size: 2rem;
    line-height: 1;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.htbk-nav:hover,
.htbk-nav:focus-visible {
	color: var(--htbk-button-text-hover);
    background: var(--htbk-control-hover);
    transform: translateY(-1px);
}

.htbk-nav:focus-visible,
.htbk-today:focus-visible,
.htbk-day-button:focus-visible,
.htbk-selection-reset:focus-visible,
.htbk-inquiry-form input:focus-visible,
.htbk-inquiry-form textarea:focus-visible,
.htbk-inquiry-submit:focus-visible {
    outline: 3px solid var(--htbk-focus);
    outline-offset: 3px;
}

.htbk-nav:disabled,
.htbk-today:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

.htbk-nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 12px;
    min-width: 0;
    text-align: center;
}

.htbk-nav-label {
    color: var(--htbk-text);
    font-size: 0.95rem;
    font-weight: 700;
}

.htbk-today {
    min-height: 32px;
    padding: 4px 10px;
    color: var(--htbk-control);
    background: var(--htbk-calendar-background);
    border: 1px solid var(--htbk-control);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
}

.htbk-today:hover:not(:disabled) {
	color: var(--htbk-button-text-hover);
    background: var(--htbk-control);
}

.htbk-months {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
}

.htbk-month[hidden] {
    display: none !important;
}

.htbk-month-title {
    margin: 6px 0 8px;
    text-align: center;
    font-size: 1.3rem;
}

.htbk-month-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 5px;
    table-layout: fixed;
}

.htbk-month-table th,
.htbk-month-table td {
    width: calc(100% / 7);
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
    vertical-align: top;
}

.htbk-month-table th {
    padding: 6px 2px;
    color: var(--htbk-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.htbk-month-table th abbr {
    border: 0;
    text-decoration: none;
    cursor: help;
}

.htbk-day-content {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 66px;
    padding: 7px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--htbk-border) 75%, var(--htbk-text));
    border-radius: 7px;
    isolation: isolate;
}

.htbk-day-button {
    width: 100%;
    margin: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
    appearance: none;
}

.htbk-day-button:hover:not(:disabled) {
    border-color: var(--htbk-control);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--htbk-control) 16%, transparent);
}

.htbk-day-button:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.htbk-day--empty .htbk-day-content {
    border-color: transparent;
}

.htbk-day-half {
    position: absolute;
    z-index: 0;
    inset: 0;
}

.htbk-day-half--am {
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.htbk-day-half--pm {
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.htbk-selection-half {
    position: absolute;
    z-index: 1;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-color: var(--htbk-selected);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.24) 0 3px, transparent 3px 8px);
}

.htbk-selection-half--am {
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.htbk-selection-half--pm {
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.htbk-day-button.is-selected-am .htbk-selection-half--am,
.htbk-day-button.is-selected-pm .htbk-selection-half--pm {
    opacity: 1;
}

.htbk-day-button.is-selection-start,
.htbk-day-button.is-selection-end {
    border-color: var(--htbk-selected);
    box-shadow: 0 0 0 2px var(--htbk-selected);
}

.htbk-status--frei {
    background-color: var(--htbk-free);
}

.htbk-status--belegt {
    background-color: var(--htbk-occupied);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 0 3px, transparent 3px 8px);
}

.htbk-status--reserviert {
    background-color: var(--htbk-reserved);
    background-image: radial-gradient(rgba(70, 55, 0, 0.22) 1.2px, transparent 1.2px);
    background-size: 7px 7px;
}

.htbk-status--gesperrt {
    background-color: var(--htbk-blocked);
    background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 0 2px, transparent 2px 6px);
}

.htbk-status--angefragt {
    background-color: var(--htbk-inquiry);
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 2px, transparent 2px 7px);
}

.htbk-day-number {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 5px;
    color: var(--htbk-day-number-text);
    background: color-mix(in srgb, var(--htbk-day-number-background) 90%, transparent);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
}

.htbk-day--today .htbk-day-content {
    outline: 3px solid var(--htbk-control);
    outline-offset: -3px;
}

.htbk-selection-panel {
    margin-top: 20px;
    padding: 18px;
    background: var(--htbk-panel-background);
    border: 1px solid var(--htbk-border);
    border-radius: 10px;
}

.htbk-selection-panel[hidden] {
    display: none !important;
}

.htbk-selection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.htbk-selection-head h3 {
    margin: 0;
    font-size: 1.08rem;
}

.htbk-selection-reset {
    min-height: 34px;
    padding: 5px 11px;
    color: var(--htbk-control);
    background: var(--htbk-field-background);
    border: 1px solid var(--htbk-control);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
}

.htbk-selection-reset:hover {
	color: var(--htbk-button-text-hover);
    background: var(--htbk-control);
}

.htbk-selection-reset[hidden] {
    display: none !important;
}

.htbk-selection-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.htbk-selection-summary > div {
    min-width: 0;
    padding: 10px;
    background: var(--htbk-field-background);
    border: 1px solid var(--htbk-border);
    border-radius: 7px;
}

.htbk-selection-summary dt {
    margin: 0 0 3px;
    color: var(--htbk-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.htbk-selection-summary dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 0.92rem;
    font-weight: 700;
}

.htbk-price-summary {
    margin: 14px 0 0;
    padding: 14px;
    color: var(--htbk-text);
    background: var(--htbk-field-background);
    border: 1px solid var(--htbk-border);
    border-radius: 8px;
}

.htbk-price-summary[hidden],
.htbk-price-additional-row[hidden] {
    display: none !important;
}

.htbk-price-summary h4 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.htbk-price-summary dl {
    margin: 0;
}

.htbk-price-summary dl > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 12px;
    padding: 5px 0;
}

.htbk-price-summary dt,
.htbk-price-summary dd {
    margin: 0;
}

.htbk-price-summary dd {
    display: flex;
    gap: 14px;
    text-align: right;
}

.htbk-price-summary dd span {
    color: var(--htbk-muted);
}

.htbk-price-total-row {
    margin-top: 5px;
    padding-top: 10px !important;
    border-top: 1px solid var(--htbk-border);
    font-weight: 800;
}

.htbk-price-total {
    font-size: 1.08rem;
}

.htbk-selection-status {
    margin: 14px 0 0;
    padding: 10px 12px;
    color: var(--htbk-info-text);
    background: var(--htbk-info-background);
    border-left: 4px solid var(--htbk-control);
    border-radius: 4px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.htbk-selection-status.is-error {
    color: var(--htbk-error-text);
    background: var(--htbk-error-background);
    border-left-color: var(--htbk-error-border);
}

.htbk-selection-status.is-success {
    color: var(--htbk-success-text);
    background: var(--htbk-success-background);
    border-left-color: var(--htbk-success-border);
}

.htbk-selection-disclaimer {
    margin: 9px 0 0;
    color: var(--htbk-muted);
    font-size: 0.78rem;
}

.htbk-inquiry-form {
    position: relative;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--htbk-border);
}

.htbk-inquiry-form[hidden] {
    display: none !important;
}

.htbk-inquiry-form h4 {
    margin: 0 0 5px;
    font-size: 1.05rem;
}

.htbk-inquiry-form > p {
    margin: 0 0 15px;
    color: var(--htbk-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.htbk-inquiry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.htbk-inquiry-field--wide {
    grid-column: 1 / -1;
}

.htbk-inquiry-form > .htbk-inquiry-address-label {
    margin: 18px 0 10px;
    color: var(--htbk-text);
    font-family: var(--htbk-font-base);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.45;
}

.htbk-inquiry-field {
    margin-bottom: 13px;
}

.htbk-inquiry-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.86rem;
    font-weight: 700;
}

.htbk-inquiry-field label span {
    color: var(--htbk-muted);
    font-weight: 400;
}

.htbk-inquiry-field input,
.htbk-inquiry-field textarea {
    display: block;
    width: 100%;
    margin: 0;
    padding: 9px 10px;
    color: var(--htbk-text);
    background: var(--htbk-field-background);
    border: 1px solid var(--htbk-input-border);
    border-radius: 6px;
    font: inherit;
    font-size: 0.92rem;
}

.htbk-inquiry-field input::placeholder,
.htbk-inquiry-field textarea::placeholder {
	color: var(--htbk-muted);
	opacity: 1;
}

.htbk-inquiry-field textarea {
    min-height: 92px;
    resize: vertical;
}

.htbk-inquiry-privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 2px 0 14px;
    font-size: 0.8rem;
    line-height: 1.45;
}

.htbk-inquiry-privacy input {
    flex: 0 0 auto;
    margin: 3px 0 0;
	accent-color: var(--htbk-control);
}

.htbk-inquiry-privacy a {
	color: var(--htbk-control);
}

.htbk-inquiry-privacy a:hover,
.htbk-inquiry-privacy a:focus-visible {
	color: var(--htbk-control-hover);
}

.htbk-inquiry-submit {
    min-height: 42px;
    padding: 8px 16px;
    color: var(--htbk-button-text);
    background: var(--htbk-control);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.htbk-inquiry-submit:hover:not(:disabled) {
	color: var(--htbk-button-text-hover);
    background: var(--htbk-control-hover);
}

.htbk-inquiry-submit:disabled {
    opacity: 0.55;
    cursor: wait;
}

.htbk-inquiry-result {
    margin: 12px 0 0 !important;
    padding: 10px 12px;
    border-left: 4px solid var(--htbk-control);
    border-radius: 4px;
}

.htbk-inquiry-result[hidden] {
    display: none !important;
}

.htbk-inquiry-result.is-error {
    color: var(--htbk-error-text);
    background: var(--htbk-error-background);
    border-left-color: var(--htbk-error-border);
}

.htbk-inquiry-result.is-info {
    color: var(--htbk-info-text);
    background: var(--htbk-info-background);
}

.htbk-inquiry-result.is-success {
	color: var(--htbk-success-text);
	background: var(--htbk-success-background);
	border-left-color: var(--htbk-success-border);
}

.htbk-inquiry-trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.htbk-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--htbk-border);
    font-size: 0.9rem;
}

.htbk-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.htbk-legend-color {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid color-mix(in srgb, var(--htbk-border) 65%, var(--htbk-text));
    border-radius: 4px;
}

.htbk-selection-color {
    background-color: var(--htbk-selected);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.24) 0 3px, transparent 3px 8px);
}

.htbk-calendar-note {
    margin: 14px 0 0;
    color: var(--htbk-muted);
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.45;
}

.htbk-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.htbk-error {
    padding: 12px 14px;
	color: var(--htbk-error-text, #861f1f);
	border-left: 4px solid var(--htbk-error-border, #c62828);
	background: var(--htbk-error-background, #fff0f0);
}

/* Mehrere Kalender in WordPress-/GenerateBlocks-Spalten mobil stapeln. */
@media (max-width: 780px) {
    .htbk-calendar-group,
    .wp-block-columns:has(.htbk-calendar),
    .gb-grid-wrapper:has(.htbk-calendar) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        flex-direction: column !important;
        gap: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .htbk-calendar-group > *,
    .wp-block-columns:has(.htbk-calendar) > *,
    .gb-grid-wrapper:has(.htbk-calendar) > * {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .htbk-calendar {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .htbk-calendar {
        margin: 18px 0;
        padding: 12px 9px;
        border-radius: 10px;
    }

    .htbk-calendar-toolbar {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 6px;
    }

    .htbk-nav {
        width: 40px;
        height: 40px;
    }

    .htbk-nav-center {
        flex-direction: column;
        gap: 4px;
    }

    .htbk-calendar-heading h2,
    .htbk-calendar-heading p {
        max-width: 100%;
        overflow-wrap: normal;
        word-break: normal;
    }

    .htbk-nav-label {
        font-size: 0.86rem;
    }

    .htbk-month-table {
        border-spacing: 3px;
    }

    .htbk-day-content,
    .htbk-day--empty .htbk-day-content {
        min-height: 48px;
        padding: 4px;
        border-radius: 5px;
    }

    .htbk-day-number {
        min-width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    .htbk-selection-panel {
        padding: 14px 11px;
    }

    .htbk-selection-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .htbk-selection-summary {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .htbk-inquiry-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .htbk-price-summary dl > div {
        align-items: flex-start;
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .htbk-price-summary dd {
        justify-content: space-between;
        text-align: left;
    }

    .htbk-legend {
        justify-content: flex-start;
        gap: 8px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .htbk-calendar * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
