/*
 * Buchungs-Widget fuer die Kundenwebseite.
 *
 * Bewusst ohne Bootstrap-Klassen und mit eigenem Namensraum (.lm-widget / .lm-suggest): das
 * Widget wird in fremde Seiten eingebunden, deren CSS wir nicht kennen. Alles Sichtbare traegt
 * hier eine eigene Klasse, und die Kundenfarbe kommt ueber die Variablen --lm-brand /
 * --lm-brand-2, die die Vorlage aus den Kundendaten setzt (siehe widgetBranding()).
 *
 * Dieselbe Datei versorgt beide Einbauarten: den eingebetteten iframe (Layout Embed) und die
 * Einbindung direkt auf einer Portalseite.
 */

.lm-widget,
.lm-suggest {
    --lm-radius: 14px;
    --lm-ink: #1c2530;
    --lm-muted: #5d6b7a;
    --lm-line: #e3e8ee;
    --lm-surface: #fff;

    color: var(--lm-ink);
    font-size: 1rem;
    line-height: 1.5;
}

/* --- Kopf ------------------------------------------------------------------ */

.lm-widget-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.lm-widget-logo {
    height: 2.75rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    flex: 0 0 auto;
}

.lm-widget-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lm-widget-subtitle {
    margin: 0.15rem 0 0;
    color: var(--lm-muted);
}

/* --- Suchformular ---------------------------------------------------------- */

.lm-widget-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--lm-line);
    border-radius: var(--lm-radius);
    background: var(--lm-surface);
}

.lm-widget-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1 1 8rem;
    min-width: 0;
}

.lm-widget-field-wide {
    flex: 3 1 16rem;
}

.lm-widget-field-zip {
    flex: 0 1 7rem;
}

.lm-widget-field-submit {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.lm-widget-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--lm-muted);
}

.lm-widget-field input {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--lm-line);
    border-radius: 9px;
    font: inherit;
    color: inherit;
    background: #fff;
}

.lm-widget-field input:focus {
    outline: none;
    border-color: var(--lm-brand);
    /* color-mix haelt den Fokusring automatisch in der Kundenfarbe, ohne dass wir je Kunde
       einen zweiten Farbwert pflegen muessten. */
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lm-brand) 25%, transparent);
}

.lm-widget-field-submit button {
    padding: 0.65rem 1.25rem;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--lm-brand);
    cursor: pointer;
}

.lm-widget-field-submit button:hover {
    background: color-mix(in srgb, var(--lm-brand) 85%, #000);
}

/* Der Ladehinweis haengt an htmx' hx-indicator und ist ohne laufende Anfrage unsichtbar. */
.lm-widget-busy {
    display: none;
    margin: 0.9rem 0 0;
    color: var(--lm-muted);
}

.lm-widget-busy.htmx-request {
    display: block;
}

.lm-widget-empty {
    padding: 1rem;
    border: 1px dashed var(--lm-line);
    border-radius: var(--lm-radius);
    color: var(--lm-muted);
}

/* "Passt nichts – weitere Termine zeigen": während der Suche Spinner + Text statt Knopftext */
.lm-more-busy {
    display: none;
}

.htmx-request > .lm-more-idle {
    display: none;
}

.htmx-request > .lm-more-busy {
    display: inline-block;
}

.htmx-request > span.lm-more-busy[aria-hidden] {
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -0.15em;
    animation: lm-spin var(--lm-spin-speed, .75s) linear infinite;
}

/* Gleichlautend mit dem Portal (bs_laemmermann_partner scss/custom/components/_lm-spin.scss):
   die eingebettete Widget-Seite laedt kein Portal-CSS und braucht die Drehung deshalb selbst. */
@keyframes lm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Der eine Vorschlag ---------------------------------------------------- */

.lm-suggest {
    margin-top: 1.25rem;
}

.lm-suggest-card {
    overflow: hidden;
    border: 1px solid var(--lm-line);
    border-radius: var(--lm-radius);
    background: var(--lm-surface);
    box-shadow: 0 10px 30px -18px rgb(16 32 51 / 45%);
}

.lm-suggest-head {
    padding: 1.4rem 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--lm-brand), var(--lm-brand-2));
}

.lm-suggest-eyebrow {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.lm-suggest-date {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.lm-suggest-time {
    margin: 0.1rem 0 0;
    font-size: 1.1rem;
    opacity: 0.92;
}

.lm-suggest-body {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}

.lm-suggest-fitter {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    flex: 1 1 15rem;
}

.lm-suggest-fitter-photo {
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
}

.lm-suggest-fitter-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    background: var(--lm-brand);
}

.lm-suggest-fitter-name {
    margin: 0;
    font-weight: 700;
}

.lm-suggest-fitter-role,
.lm-suggest-greeting {
    margin: 0;
    font-size: 0.88rem;
    color: var(--lm-muted);
}

.lm-suggest-greeting {
    margin-top: 0.35rem;
}

.lm-suggest-facts {
    flex: 1 1 15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lm-suggest-facts li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.93rem;
}

.lm-suggest-facts .mdi {
    color: var(--lm-brand);
}

.lm-suggest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1rem 1.5rem 1.4rem;
    border-top: 1px solid var(--lm-line);
}

.lm-suggest-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.3rem;
    border-radius: 9px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.lm-suggest-btn-primary {
    color: #fff;
    background: var(--lm-brand);
}

.lm-suggest-btn-primary:hover {
    background: color-mix(in srgb, var(--lm-brand) 85%, #000);
}

.lm-suggest-btn-ghost {
    color: var(--lm-muted);
    background: transparent;
    border-color: var(--lm-line);
}

.lm-suggest-btn-ghost:hover {
    color: var(--lm-ink);
    border-color: var(--lm-brand);
}

.lm-suggest-card-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--lm-muted);
}

.lm-suggest-card-empty .mdi {
    font-size: 2.2rem;
    color: var(--lm-brand);
}

.lm-suggest-card-empty .lm-suggest-date {
    color: var(--lm-ink);
    font-size: 1.2rem;
}

/* Auf Handybreite sind mehrspaltige Felder unbedienbar - alles untereinander. */
@media (max-width: 40rem) {
    .lm-widget-field,
    .lm-widget-field-wide,
    .lm-widget-field-zip,
    .lm-widget-field-submit {
        flex: 1 1 100%;
    }

    .lm-suggest-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* --- Alternativen unter dem Hauptvorschlag ----------------------------------
   Schmale Zeilen statt weiterer Karten: die Empfehlung soll die Empfehlung
   bleiben, die Alternativen nur erreichbar sein.
   --------------------------------------------------------------------------- */

.lm-suggest-alt-title {
    margin: 1.1rem 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lm-muted);
}

.lm-suggest-alts {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--lm-line);
    border-radius: var(--lm-radius);
    overflow: hidden;
    background: var(--lm-surface);
}

.lm-suggest-alt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--lm-line);
}

.lm-suggest-alt:last-child {
    border-bottom: 0;
}

.lm-suggest-alt-when {
    display: flex;
    flex-direction: column;
    flex: 0 0 9.5rem;
    line-height: 1.3;
}

.lm-suggest-alt-when span {
    font-size: 0.85rem;
    color: var(--lm-muted);
}

.lm-suggest-alt-who {
    flex: 1 1 10rem;
    min-width: 0;
    font-size: 0.9rem;
}

.lm-suggest-alt-travel {
    color: var(--lm-muted);
}

.lm-suggest-alt-btn {
    flex: 0 0 auto;
    padding: 0.45rem 1rem;
    min-height: 0;
}

@media (max-width: 30rem) {
    .lm-suggest-alt-when,
    .lm-suggest-alt-who {
        flex: 1 1 100%;
    }

    .lm-suggest-alt-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* --- Kontaktwunsch, wenn kein Termin gefunden wurde ------------------------ */

.lm-request-form-wrap {
    margin-top: 1rem;
    text-align: left;
}

.lm-request-toggle {
    width: 100%;
    justify-content: center;
}

.lm-request-form {
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px dashed var(--lm-line);
    border-radius: var(--lm-radius);
}

.lm-request-form .form-control {
    background: #fff;
}

/* --- Suchformular als Raster --------------------------------------------------
   Adresse und Knopf ueber die ganze Breite, PLZ / Anzahl / Datum nebeneinander. Im
   eingebetteten iframe (600 px) standen sonst alle Felder einzeln untereinander.
   --------------------------------------------------------------------------- */

.lm-widget-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem 0.75rem;
    padding: 1.1rem;
}

.lm-widget-form .lm-widget-field-wide,
.lm-widget-form .lm-widget-field-submit,
.lm-widget-note {
    grid-column: 1 / -1;
}

.lm-widget-field-submit button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.8rem 1.25rem;
    font-size: 1.02rem;
}

.lm-widget-note {
    margin: -0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--lm-muted);
}

/* Hinweise erscheinen erst, wenn eine Eingabe wirklich falsch ist - :user-invalid greift
   nach der ersten Eingabe oder dem ersten Absendeversuch, nicht schon beim Laden. */
.lm-widget-hint,
.lm-book-hint {
    display: none;
    font-size: 0.78rem;
    color: #b42318;
}

.lm-widget-field:has(input:user-invalid) .lm-widget-hint,
.lm-book-field:has(input:user-invalid) .lm-book-hint {
    display: block;
}

.lm-widget-field input:user-invalid,
.lm-book-field input:user-invalid {
    border-color: #d92d20;
    box-shadow: 0 0 0 3px rgb(217 45 32 / 12%);
}

.lm-widget-busy.htmx-request {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 30rem) {
    .lm-widget-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --- Buchungsdialog ------------------------------------------------------------
   Bootstrap liefert nur das Geruest (Oeffnen, Schliessen, Hintergrund); das Aussehen kommt
   von hier, in der Kundenfarbe. Der Dialog steht auch in der Terminauswahl des Portals, dort
   ohne Kundenfarbe - deshalb die Rueckfallwerte.
   --------------------------------------------------------------------------- */

.lm-book-modal {
    --lm-ink: #1c2530;
    --lm-muted: #5d6b7a;
    --lm-line: #e3e8ee;
    --lm-book-brand: var(--lm-brand, #0d6efd);
    --lm-book-brand-2: var(--lm-brand-2, var(--lm-book-brand));
    color: var(--lm-ink);
}

.lm-book-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 60px -20px rgb(16 32 51 / 55%);
}

.lm-book-head {
    position: relative;
    padding: 1.3rem 3.2rem 1.2rem 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--lm-book-brand), var(--lm-book-brand-2));
}

.lm-book-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    color: #fff;
    background: rgb(255 255 255 / 16%);
    cursor: pointer;
}

.lm-book-close:hover {
    background: rgb(255 255 255 / 28%);
}

.lm-book-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.lm-book-date {
    margin: 0.2rem 0 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lm-book-time {
    margin: 0;
    font-size: 1.05rem;
    opacity: 0.92;
}

.lm-book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0.7rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.86rem;
    opacity: 0.95;
}

.lm-book-meta .mdi {
    margin-right: 0.3rem;
}

.lm-book-body {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    padding: 1.3rem 1.5rem;
}

.lm-book-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem 0.75rem;
}

@media (max-width: 30rem) {
    .lm-book-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.lm-book-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.lm-book-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--lm-muted);
}

.lm-book-req {
    color: #d92d20;
}

.lm-book-field input,
.lm-book-rooms input {
    width: 100%;
    padding: 0.62rem 0.8rem;
    border: 1px solid var(--lm-line);
    border-radius: 9px;
    font: inherit;
    color: var(--lm-ink);
    /* Nur die Farbe: die Kurzform setzte Wiederholung und Größe des Kalender-/Uhr-Symbols aus dem
       Datumswähler (lm-dtp-input) zurück, das Symbol kachelte quer durchs Feld. */
    background-color: #fff;
}

.lm-book-field input:focus,
.lm-book-rooms input:focus {
    outline: none;
    border-color: var(--lm-book-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lm-book-brand) 25%, transparent);
}

.lm-book-rooms {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--lm-line);
    border-radius: 11px;
    background: #f8fafc;
}

.lm-book-rooms summary {
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.lm-book-rooms summary span {
    font-weight: 400;
    color: var(--lm-muted);
}

.lm-book-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.lm-book-rooms-grid input {
    padding: 0.45rem 0.65rem;
    font-size: 0.9rem;
}

.lm-book-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--lm-muted);
    cursor: pointer;
}

.lm-book-consent input {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.1rem;
    accent-color: var(--lm-book-brand);
}

.lm-book-consent a {
    color: var(--lm-book-brand);
}

.lm-book-consent:has(input:user-invalid) {
    color: #b42318;
}

.lm-book-altcha altcha-widget {
    --altcha-max-width: 100%;
    --altcha-border-radius: 11px;
    --altcha-color-border: var(--lm-line);
}

.lm-book-error {
    padding: 0.75rem 0.9rem;
    border: 1px solid #fda29b;
    border-radius: 11px;
    font-size: 0.9rem;
    color: #912018;
    background: #fef3f2;
}

.lm-book-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.9rem 1.5rem 1.2rem;
    border-top: 1px solid var(--lm-line);
}

.lm-book-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.3rem;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.lm-book-btn-primary {
    color: #fff;
    background: var(--lm-book-brand);
}

.lm-book-btn-primary:hover {
    background: color-mix(in srgb, var(--lm-book-brand) 85%, #000);
}

.lm-book-btn-primary:disabled {
    opacity: 0.6;
    cursor: progress;
}

.lm-book-btn-ghost {
    color: var(--lm-muted);
    background: transparent;
    border-color: var(--lm-line);
}

.lm-book-btn-ghost:hover {
    color: var(--lm-ink);
}

/* Nur waehrend der Anfrage sichtbar (hx-indicator setzt .htmx-request). Vorher fehlte diese
   Regel im Widget, und "Termin wird gebucht …" stand dauerhaft im Dialog. */
.lm-book-busy {
    display: none;
    align-items: center;
    gap: 0.45rem;
    margin-right: auto;
    font-size: 0.88rem;
    color: var(--lm-muted);
}

.lm-book-busy.htmx-request {
    display: inline-flex;
}

.lm-book-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid color-mix(in srgb, var(--lm-brand, #0d6efd) 25%, transparent);
    border-top-color: var(--lm-brand, #0d6efd);
    border-radius: 50%;
    animation: lm-spin var(--lm-spin-speed, .75s) linear infinite;
}

@media (max-width: 30rem) {
    .lm-book-footer .lm-book-btn {
        flex: 1 1 100%;
    }
}

/* --- Bestaetigung ------------------------------------------------------------ */

.lm-confirm-head {
    position: relative;
}

.lm-confirm-check {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 2.2rem;
    line-height: 1;
}

.lm-confirm-mail {
    display: flex;
    gap: 0.6rem;
    flex: 1 1 15rem;
    padding: 0.8rem 0.9rem;
    border-radius: 11px;
    font-size: 0.9rem;
    background: color-mix(in srgb, var(--lm-brand) 8%, #fff);
}

.lm-confirm-mail .mdi {
    font-size: 1.3rem;
    color: var(--lm-brand);
}

.lm-confirm-mail p {
    margin: 0;
}

.lm-confirm-ref {
    align-self: center;
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--lm-muted);
}

/* --- Guenstige Termine ----------------------------------------------------- */
/* Gruen statt Minuten: kurze Anfahrt fuer den Monteur (AppointmentController::isNear()). */

.lm-suggest-card-near {
    border-color: #2e9e5b;
    box-shadow: 0 0 0 2px rgba(46, 158, 91, 0.25);
}

.lm-suggest-card-near .lm-suggest-head {
    background: #2e9e5b;
}

.lm-suggest-near-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    letter-spacing: normal;
    text-transform: none;
}

.lm-suggest-alt-near {
    background: #eaf7ef;
    box-shadow: inset 4px 0 0 #2e9e5b;
}

.lm-suggest-alt-near .lm-suggest-alt-when strong {
    color: #1f7a43;
}

/* --- Termine nach Tagen (Suggest.html) --------------------------------------------------- */

.lm-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    gap: 0.6rem;
    margin: 0.4rem 0 0.6rem;
}

.lm-day {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lm-day-head {
    margin: 0 0 0.1rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    color: var(--lm-muted);
}

.lm-time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.45rem 0.4rem;
    border: 1px solid var(--lm-line);
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    color: var(--lm-brand, #0d6efd);
    background: #fff;
    cursor: pointer;
}

.lm-time:hover,
.lm-time:focus-visible {
    border-color: var(--lm-brand, #0d6efd);
    background: color-mix(in srgb, var(--lm-brand, #0d6efd) 8%, #fff);
}

/* 🌿 kurze Anfahrt: grün umrandet, Blatt davor */
.lm-time-near {
    border-color: #8bc79a;
    background: #f1faf3;
    color: #1f6b35;
}

.lm-time-leaf {
    font-size: 0.85em;
}

.lm-days-nav {
    display: flex;
    gap: 0.5rem;
    margin: 0.2rem 0 0.6rem;
}

.lm-days-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.8rem;
    font-size: 0.8rem;
    color: var(--lm-muted);
}

.lm-time-sample {
    flex: 0 0 auto;
    padding: 0.15rem 0.4rem;
    cursor: default;
    font-size: 0.75rem;
}

/* Scrollbarer Dialog: zwischen .modal-content und .modal-body steht das <form>. Bootstrap begrenzt beim
   scrollbaren Dialog nur die direkten Kinder - das Formular wuchs über den Bildschirm hinaus, der Rest wurde
   abgeschnitten statt gescrollt (Terminauswahl, kleine Bildschirme). Das Formular wird selbst zur Spalte,
   nur der Inhalt scrollt; Kopf und Buchen-Knopf bleiben stehen. */
.lm-book-modal .modal-dialog-scrollable .lm-book-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.lm-book-modal .modal-dialog-scrollable .lm-book-body {
    min-height: 0;
    overflow-y: auto;
}

/* Buchen an derselben Stelle statt im Dialog */
.lm-book-modal.lm-book-inline {
    position: static;
    display: none;
    height: auto;
    overflow: visible;
    background: none;
}

.lm-book-modal.lm-book-inline.lm-inline-open {
    display: block;
}

.lm-book-inline .modal-dialog {
    max-width: none;
    margin: 0;
    transform: none !important;
}

.lm-book-inline .modal-dialog-scrollable {
    height: auto;
    max-height: none;
}

.lm-book-inline .modal-dialog-scrollable .modal-content {
    max-height: none;
}

.lm-suggest-booking .lm-suggest-picker {
    display: none;
}

.lm-book-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: -0.4rem 0 0.5rem -0.3rem;
    padding: 0.2rem 0.3rem;
    border: 0;
    font: inherit;
    font-size: 0.85rem;
    color: #fff;
    background: none;
    cursor: pointer;
    opacity: 0.9;
}

/*
 * Hinweise an den Monteur (Büro-Buchung, Telefonbuchung): Chips zum Antippen statt Häkchen.
 * Bewusst nicht in .lm-book-field - dessen "input { width: 100% }" machte die Checkboxen zu
 * Textfeld-Kästen, Häkchen und Beschriftung standen in zwei Spalten.
 */
.lm-hint-chips {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.lm-hint-chips legend {
    float: none;
    width: auto;
    margin: 0 0 0.4rem;
    padding: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--lm-muted);
}

.lm-hint-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.lm-hint-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--lm-line);
    border-radius: 999px;
    background: #fff;
    color: var(--lm-ink);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.lm-hint-chip .mdi {
    font-size: 1.05rem;
    color: var(--lm-muted);
}

/* Checkbox unsichtbar, aber fokussier- und per Leertaste schaltbar */
.lm-hint-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.lm-hint-chip:hover {
    border-color: color-mix(in srgb, var(--lm-book-brand, #0b5cad) 45%, var(--lm-line));
    background: color-mix(in srgb, var(--lm-book-brand, #0b5cad) 5%, #fff);
}

.lm-hint-chip:has(input:checked) {
    border-color: var(--lm-book-brand, #0b5cad);
    background: color-mix(in srgb, var(--lm-book-brand, #0b5cad) 12%, #fff);
    color: var(--lm-book-brand, #0b5cad);
    font-weight: 600;
}

.lm-hint-chip:has(input:checked) .mdi {
    color: inherit;
}

.lm-hint-chip:has(input:checked)::after {
    content: "\2713";
    font-weight: 700;
}

.lm-hint-chip:has(input:focus-visible) {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lm-book-brand, #0b5cad) 30%, transparent);
}

/* Terminart: Auswahlliste wie die Textfelder daneben statt Browser-Standard */
.lm-book-field select {
    width: 100%;
    padding: 0.62rem 2.2rem 0.62rem 0.8rem;
    border: 1px solid var(--lm-line);
    border-radius: 9px;
    font: inherit;
    color: var(--lm-ink);
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235d6b7a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.8rem center / 12px 10px;
    appearance: none;
    cursor: pointer;
}

.lm-book-field select:focus {
    outline: none;
    border-color: var(--lm-book-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lm-book-brand) 25%, transparent);
}
