/* Red Braid Meetings — Zeitraster und Buchungsformular.
 *
 * Nutzt die Design-Tokens von Recruitingbase, wo es sie gibt, IMMER mit Rückfallwert:
 * Auf redbraid.de läuft kein Basics, dort trägt der Rückfall die Oberfläche. Ein var()
 * ohne Rückfall wäre dort eine ungültige Deklaration und risse die ganze Regel mit.
 *
 * ZWEI REGELN, die dieses Stylesheet durchziehen — beide aus Schaden gelernt:
 *
 * 1. JEDE Regel trägt `.rbm` als Vorsatz. Themes und Elementor setzen Regeln wie
 *    `.elementor-kit-7 p{margin-block-end:0}` oder färben pauschal jeden `button`.
 *    Mit (0,1,1) schlagen die jede alleinstehende Einzelklasse. Mit dem Wrapper davor
 *    steht hier (0,2,0) und gewinnt — ohne ein einziges !important.
 *
 * 2. Die Uhrzeiten sind KEINE Buttons, sondern Radiofelder mit Beschriftung. Als Buttons
 *    hat das Theme sie allesamt blau eingefärbt, sodass jede Zeit gewählt aussah. Ein
 *    <span> in einem <label> ist für Button-Regeln unsichtbar — und die Auswahl ist
 *    nebenbei das, was sie ist: eine Gruppe von Optionen, die auch mit der Tastatur und
 *    mit einem Vorleseprogramm bedienbar ist.
 */

.rbm {
    --rbm-line: var(--rbb-line, rgba(31, 42, 63, .14));
    --rbm-line-strong: var(--rbb-field-line, rgba(31, 42, 63, .28));
    --rbm-accent: var(--rbb-accent, #2F6FB5);
    --rbm-soft: var(--rbb-accent-soft, #F0F5FA);
    --rbm-ink: var(--rbb-ink, #1F2A3F);
    --rbm-muted: var(--rbb-muted, rgba(31, 42, 63, .70));
    --rbm-card: var(--rbb-card, #fff);
    --rbm-radius: 12px;

    box-sizing: border-box;
    font-family: var(--rbb-font, 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', sans-serif);
    color: var(--rbm-ink);
    max-width: 640px;
    line-height: 1.5;

    /*
     * KEIN Rahmen, kein Innenabstand, keine Fläche.
     *
     * Der Rahmen einer Karte gehört dem Abschnitt, in dem sie steht — in Elementor also
     * dem Container oder den Reglern des Widgets. Brächte das Stylesheet einen eigenen
     * mit, säße er im Regelfall in einer Elementor-Karte und man hätte zwei ineinander;
     * abstellen ließe sich das nur, indem man dagegen anschreibt. Die inneren Flächen
     * (Kacheln, Eingabefelder) behalten ihren eigenen Hintergrund, sonst verschwänden sie
     * auf farbigem Grund.
     */
    background: none;
    border: 0;
    padding: 0;
}

.rbm *,
.rbm *::before,
.rbm *::after { box-sizing: inherit; }

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

.rbm .rbm__head { margin-bottom: 20px; }

.rbm .rbm__eyebrow {
    margin: 0 0 10px;
    font: 600 11px/1.4 var(--rbb-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--rbm-muted);
}

.rbm .rbm__title {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--rbm-ink);
}

.rbm .rbm__intro,
.rbm .rbm__loading,
.rbm .rbm__empty {
    margin: 0;
    color: var(--rbm-muted);
    font-size: 15px;
}

/* --- Knöpfe: erst neutralisieren, dann gestalten ------------------------- */

.rbm button {
    margin: 0;
    font: inherit;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: normal;
    text-shadow: none;
    background-image: none;
    height: auto;
    width: auto;
    min-height: 0;
    cursor: pointer;
}

/* --- Dauer -------------------------------------------------------------- */

.rbm .rbm__durations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.rbm .rbm__chip {
    padding: 8px 16px;
    border: 1px solid var(--rbm-line-strong);
    border-radius: var(--rbb-radius-pill, 999px);
    background: var(--rbm-card);
    color: var(--rbm-ink);
    font-size: 14px;
}

.rbm .rbm__chip:hover { border-color: var(--rbm-accent); background: var(--rbm-card); }

.rbm .rbm__chip.is-on {
    background: var(--rbm-soft);
    border-color: var(--rbm-accent);
    color: var(--rbb-accent-ink, #1F5288);
    font-weight: 600;
}

/* --- Tage --------------------------------------------------------------- */

/* Leiste und Pfeile liegen nebeneinander; nur die Leiste selbst scrollt. */
.rbm .rbm__daynav {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin: 0 0 18px;
}

.rbm .rbm__days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1 1 auto;
    padding-bottom: 2px;
    scroll-behavior: smooth;
    scrollbar-width: none;      /* die Pfeile sind die Bedienung, nicht der Balken */
}

.rbm .rbm__days::-webkit-scrollbar { display: none; }

/* Feste Breite statt 1 1 0: Ein einzelner freier Tag wurde sonst über die volle
 * Kartenbreite gezogen und sah aus wie eine Schaltfläche, nicht wie ein Datum. */
.rbm .rbm__day {
    flex: 0 0 auto;
    width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 6px;
    background: var(--rbm-card);
    border: 1px solid var(--rbm-line);
    border-radius: 10px;
    color: var(--rbm-ink);
}

.rbm .rbm__day:hover { border-color: var(--rbm-line-strong); background: var(--rbm-card); }

.rbm .rbm__day-wd {
    font: 600 10.5px/1 var(--rbb-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rbm-muted);
}

.rbm .rbm__day-n { font-size: 17px; font-weight: 700; color: var(--rbm-ink); }

.rbm .rbm__day.is-on,
.rbm .rbm__day.is-on:hover {
    background: var(--rbm-accent);
    border-color: var(--rbm-accent);
}

.rbm .rbm__day.is-on .rbm__day-wd,
.rbm .rbm__day.is-on .rbm__day-n { color: #fff; }

.rbm .rbm__day:focus-visible {
    outline: 2px solid var(--rbm-accent);
    outline-offset: 2px;
}

.rbm .rbm__arrow {
    flex: 0 0 auto;
    width: 34px;
    padding: 0;
    border: 1px solid var(--rbm-line);
    border-radius: 10px;
    background: var(--rbm-card);
    color: var(--rbm-ink);
    font-size: 20px;
    line-height: 1;
}

.rbm .rbm__arrow:hover {
    border-color: var(--rbm-accent);
    background: var(--rbm-soft);
    color: var(--rbb-accent-ink, #1F5288);
}

.rbm .rbm__arrow[hidden] { display: none; }

.rbm .rbm__arrow:focus-visible {
    outline: 2px solid var(--rbm-accent);
    outline-offset: 2px;
}

.rbm .rbm__day-long {
    margin: 0 0 4px;
    font-weight: 600;
    font-size: 15px;
    color: var(--rbm-ink);
}

/* --- Zeiten (Radio + Beschriftung, KEIN button) -------------------------- */

.rbm .rbm__tgroup {
    margin: 16px 0 8px;
    font: 600 10.5px/1 var(--rbb-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--rbm-muted);
}

.rbm .rbm__times {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 10px;
    margin: 0;
}

.rbm .rbm__time { position: relative; display: block; }

.rbm .rbm__time input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.rbm .rbm__time span {
    display: block;
    padding: 13px 10px;
    text-align: center;
    background: var(--rbm-card);
    border: 1px solid var(--rbm-line);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.rbm .rbm__time:hover span { border-color: var(--rbm-line-strong); }

.rbm .rbm__time input:checked + span {
    background: var(--rbm-soft);
    border-color: var(--rbm-accent);
    color: var(--rbb-accent-ink, #1F5288);
}

.rbm .rbm__time input:focus-visible + span {
    outline: 2px solid var(--rbm-accent);
    outline-offset: 2px;
}

/* --- Formular ----------------------------------------------------------- */

.rbm .rbm__form {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--rbb-line-soft, rgba(31, 42, 63, .08));
}

.rbm .rbm__chosen {
    margin: 0 0 16px;
    font-weight: 600;
    font-size: 15px;
    color: var(--rbb-accent-ink, #1F5288);
}

.rbm .rbm__chosen--empty {
    font-weight: 400;
    color: var(--rbm-muted);
}

.rbm .rbm__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.rbm .rbm__field { display: block; }
.rbm .rbm__field--wide { display: block; margin-top: 14px; }

.rbm .rbm__label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--rbm-muted);
}

/* :not() hebt auf (0,4,1): Die Kit-Regel von Elementor
 * (.elementor-kit-N input:not([type=button]):not([type=submit]), 0,3,1) gewann sonst bei
 * Eingabefeldern, nicht aber bei Textfeld und Auswahl — ein Formular mit zwei Feldformen.
 * Häkchen und Radio bleiben außen vor; die haben ihre eigenen Regeln. */
.rbm .rbm__field input:not([type=checkbox]):not([type=radio]),
.rbm .rbm__field select,
.rbm .rbm__field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--rbm-line-strong);
    border-radius: 10px;
    background: var(--rbm-card);
    color: var(--rbm-ink);
    font: inherit;
    font-size: 15px;
}

.rbm .rbm__field textarea { resize: vertical; min-height: 88px; }

.rbm .rbm__field input:not([type=checkbox]):not([type=radio]):focus,
.rbm .rbm__field select:focus,
.rbm .rbm__field textarea:focus {
    outline: none;
    border-color: var(--rbm-accent);
    box-shadow: var(--rbb-focus-ring, 0 0 0 3px rgba(47, 111, 181, .15));
}

/* Honigtopf: aus dem Blickfeld, aber nicht display:none — manche Automaten
 * überspringen ausgeblendete Felder ausdrücklich. */
.rbm .rbm__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rbm .rbm__captcha:not(:empty) { margin-top: 16px; }

/* --- Aktionen ----------------------------------------------------------- */

.rbm .rbm__btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--rbm-accent);
    color: #fff;
    font-size: 15.5px;
    font-weight: 700;
    text-align: center;
}

.rbm .rbm__btn:hover {
    background: var(--rbm-accent);
    color: #fff;
    box-shadow: inset 0 0 0 999px rgba(0, 0, 0, .16);
}

.rbm .rbm__btn:disabled {
    background: var(--rbb-grey, #EDEDED);
    color: var(--rbm-muted);
    box-shadow: none;
    cursor: not-allowed;
}

.rbm .rbm__btn:focus-visible {
    outline: 2px solid var(--rbm-accent);
    outline-offset: 2px;
}

/* Nebenwege bleiben ruhig: „Weitere Termine" ist ein Angebot, keine Aufforderung.
 * Zwei gleich laute Knöpfe nebeneinander zwingen zu einer Entscheidung, die es nicht gibt. */
.rbm .rbm__btn--ghost {
    display: inline-block;
    width: auto;
    margin-top: 14px;
    padding: 10px 18px;
    background: var(--rbm-card);
    color: var(--rbb-accent-ink, #1F5288);
    border: 1px solid var(--rbm-line-strong);
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}

.rbm .rbm__btn--ghost:hover {
    background: var(--rbm-soft);
    color: var(--rbb-accent-ink, #1F5288);
    box-shadow: none;
}

/* --- Einwilligung ------------------------------------------------------- */

.rbm .rbm__consent {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--rbb-line-soft, rgba(31, 42, 63, .08));
}

/* Die Texte kommen als HTML aus HubSpot. Kleiner als das Formular, aber nicht kleiner
 * als 12px — darunter liest es niemand, und eine ungelesene Einwilligung ist keine. */
.rbm .rbm__consent-text,
.rbm .rbm__privacy {
    font-size: 12px;
    line-height: 1.5;
    color: var(--rbm-muted);
}

.rbm .rbm__consent-text p,
.rbm .rbm__privacy { margin: 0 0 8px; }

.rbm .rbm__check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 10px 0;
    font-size: 13.5px;
    line-height: 1.45;
    cursor: pointer;
}

.rbm .rbm__check input {
    margin: 2px 0 0;
    flex: 0 0 auto;
    width: auto;
    accent-color: var(--rbm-accent);
}

/* --- Meldungen ---------------------------------------------------------- */

.rbm .rbm__msg,
.rbm .rbm__err {
    margin: 14px 0 0;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 14px;
}

.rbm .rbm__msg--err,
.rbm .rbm__err {
    background: var(--rbb-danger-bg, #FEF3F4);
    color: var(--rbb-danger-ink, #B01F2A);
}

.rbm .rbm__err { margin: 0 0 12px; }

.rbm .rbm__done {
    padding: 24px;
    border-radius: 12px;
    background: var(--rbb-ok-bg, #E8F3EA);
}

.rbm .rbm__done-title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    color: var(--rbb-ok, #1E6B34);
}

.rbm .rbm__done-when { margin: 0 0 10px; font-weight: 600; }
.rbm .rbm__done-text { margin: 0; color: var(--rbm-muted); font-size: 15px; }

.rbm-note {
    padding: 12px 14px;
    border-left: 3px solid var(--rbb-warn, #E5A522);
    background: var(--rbb-warn-bg, #FFFBF3);
    color: var(--rbb-warn-ink, #8A5A00);
}

@media (max-width: 600px) {
    .rbm .rbm__title { font-size: 21px; }
    .rbm .rbm__times { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
    .rbm .rbm__day { width: 60px; }
    .rbm .rbm__arrow { width: 28px; font-size: 17px; }
    .rbm .rbm__grid { grid-template-columns: 1fr; }
}

/* Der Stern hinter einer Pflicht-Einwilligung. Farbig, damit er nicht als Fußnote
 * gelesen wird — er ist die Bedingung, nicht der Hinweis. */
.rbm .rbm__req { color: var(--rbb-danger, #D42030); font-weight: 700; }
.rbm .rbm__check--req { font-weight: 500; }
.rbm .rbm__check a,
.rbm .rbm__privacy a,
.rbm .rbm__consent-text a { color: var(--rbb-accent-ink, #1F5288); }
/* HubSpot liefert Beschriftungen als <p>: ohne Abstand, sonst rutscht der Text unter das Häkchen. */
.rbm .rbm__check p { margin: 0; }

/* --- Kontaktformular (ab 1.6.0) ---------------------------------------------
 * Dieselben Felder, Häkchen und Knöpfe wie das Buchungsformular. Die Zeilen folgen dem
 * Aufbau in HubSpot: Stehen dort Vor- und Nachname in einer Zeile, stehen sie hier auch
 * nebeneinander; auf dem Telefon untereinander. */

.rbm.rbm-form .rbm__form { margin-top: 0; padding-top: 0; border-top: 0; }

.rbm .rbm__row { display: grid; gap: 14px; margin-top: 14px; }
.rbm .rbm__row:first-child { margin-top: 0; }
.rbm .rbm__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rbm .rbm__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rbm .rbm__row .rbm__field--wide { margin-top: 0; }

.rbm .rbm__rich { margin-top: 14px; font-size: 15px; }
.rbm .rbm__rich p { margin: 0 0 8px; }

.rbm .rbm__help {
    display: block;
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--rbm-muted);
}

/* Auswahlgruppen: fieldset ohne Browser-Rahmen, Optionen nebeneinander, umbrechend. */
.rbm .rbm__choice { margin: 0; padding: 0; border: 0; min-width: 0; }
.rbm .rbm__choice legend { padding: 0; }
.rbm .rbm__opts { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.rbm .rbm__opt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    cursor: pointer;
}

/* (0,3,1) statt (0,2,1): Die Feldregel oben gäbe Radio und Häkchen volle Breite und
 * Innenabstand. */
.rbm .rbm__field .rbm__opt input,
.rbm .rbm__field .rbm__check input {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    accent-color: var(--rbm-accent);
}
.rbm .rbm__field .rbm__check { margin: 0; }

/* Fehler am Feld: Rahmen und ein Satz darunter — nicht nur Farbe. */
.rbm .rbm__field--err input:not([type=checkbox]):not([type=radio]),
.rbm .rbm__field--err select,
.rbm .rbm__field--err textarea { border-color: var(--rbb-danger, #D42030); }
.rbm .rbm__fielderr {
    display: block;
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--rbb-danger-ink, #B01F2A);
}

.rbm .rbm__done p { margin: 0 0 8px; }
.rbm .rbm__done p:last-child { margin-bottom: 0; }
.rbm .rbm__done:focus { outline: none; }

@media (max-width: 600px) {
    .rbm .rbm__row--2,
    .rbm .rbm__row--3 { grid-template-columns: 1fr; }
}
