/* HR-Buchung – Erstgespräch-Popup (nach Figma 4231:10407) */
.hrb-modal {
    --hrb-bg: #faf7f4;
    --hrb-aside-bg: #f2eeea;
    --hrb-black: #1a1715;
    --hrb-grey-700: #3d3836;
    --hrb-grey-400: #a39b92;
    --hrb-grey-200: #e5dfd9;
    --hrb-white: #fff;
    --hrb-primary-dark: #595959;
    --hrb-green: #2d6a6a;
    --hrb-green-hover: #245757;
    --hrb-deco: #d8b89c;
    --hrb-radius: 8px;
    --hrb-serif: "DM Serif Display", Georgia, serif;
    --hrb-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    font-family: var(--hrb-sans);
    color: var(--hrb-black);
}
.hrb-modal[hidden] { display: none; }
.hrb-modal *,
.hrb-modal *::before,
.hrb-modal *::after { box-sizing: border-box; }

.hrb-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 23, 21, 0.45);
    backdrop-filter: blur(2px);
    animation: hrb-fade 0.18s ease-out;
}
.hrb-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 1000px;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    background: var(--hrb-bg);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(26, 23, 21, 0.28);
    animation: hrb-pop 0.2s ease-out;
}
@keyframes hrb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hrb-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

.hrb-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    border: 1px solid var(--hrb-grey-200);
    background: rgba(255, 255, 255, 0.85);
    color: var(--hrb-black);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.hrb-modal__close:hover { background: #fff; transform: scale(1.04); }
.hrb-modal__close svg { width: 22px; height: 22px; }

.hrb-modal__grid {
    display: grid;
    grid-template-columns: 440px 1fr;
    max-height: calc(100vh - 48px);
}

/* ---------- Linke Spalte: Info ---------- */
.hrb-aside {
    position: relative;
    overflow: hidden;
    background: var(--hrb-aside-bg);
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}
/* Überschriften gegen Theme-/Elementor-Kit-Heading-Skalen abkapseln */
.hrb-modal .hrb-aside__title { font-size: 32px !important; line-height: 1.2 !important; }
.hrb-modal .hrb-form__title { font-size: 18px !important; line-height: 1.4 !important; font-family: var(--hrb-sans) !important; }
.hrb-modal .hrb-success__title { font-size: 26px !important; line-height: 1.25 !important; }

.hrb-aside__title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: var(--hrb-serif);
    font-weight: 400;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.32px;
    color: var(--hrb-black);
}
.hrb-aside__lead {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 344px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--hrb-grey-700);
}
.hrb-aside__list {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0;
    padding: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hrb-aside__item { display: flex; gap: 14px; align-items: flex-start; }
.hrb-aside__icon {
    flex: 0 0 24px;
    color: #876a57;
    margin-top: 2px;
}
.hrb-aside__icon svg { width: 24px; height: 24px; display: block; }
.hrb-aside__text { display: flex; flex-direction: column; }
.hrb-aside__text strong { font-weight: 500; font-size: 16px; color: var(--hrb-black); }
.hrb-aside__text span { font-size: 14px; line-height: 1.55; color: var(--hrb-grey-700); }

/* ---------- Rechte Spalte ---------- */
.hrb-main {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.hrb-card {
    background: var(--hrb-white);
    border: 1px solid var(--hrb-grey-200);
    border-radius: var(--hrb-radius);
    padding: 21px;
}

/* Kalender */
.hrb-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.hrb-cal__title { font-size: 18px; color: var(--hrb-black); }
.hrb-cal__nav {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hrb-grey-200);
    background: var(--hrb-white);
    border-radius: 18px;
    cursor: pointer;
    color: var(--hrb-black);
    transition: background 0.15s, border-color 0.15s;
}
.hrb-cal__nav:hover:not(:disabled) { background: var(--hrb-aside-bg); }
.hrb-cal__nav:disabled { opacity: 0.35; cursor: default; }
.hrb-cal__nav svg { width: 20px; height: 20px; }

.hrb-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.hrb-cal__dow {
    text-align: center;
    font-size: 14px;
    color: var(--hrb-grey-400);
    padding: 6px 0;
}
.hrb-cal__day {
    aspect-ratio: 1 / 1;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 50%;
    background: none;
    font-family: var(--hrb-sans);
    font-size: 14px;
    color: var(--hrb-black);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.hrb-cal__day:hover:not(:disabled):not(.is-selected) { background: var(--hrb-aside-bg); }
.hrb-cal__day:disabled { color: var(--hrb-grey-400); opacity: 0.5; cursor: default; }
.hrb-cal__day.is-empty { cursor: default; }
.hrb-cal__day.is-selected {
    background: var(--hrb-primary-dark);
    border-color: var(--hrb-primary-dark);
    color: var(--hrb-white);
}

/* Zeitfenster */
.hrb-slots__label { font-size: 16px; color: var(--hrb-grey-700); margin-bottom: 14px; }
.hrb-slots__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.hrb-slot {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hrb-grey-200);
    background: var(--hrb-white);
    border-radius: 4px;
    font-family: var(--hrb-sans);
    font-size: 12px;
    letter-spacing: 0.48px;
    color: var(--hrb-black);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hrb-slot:hover:not(.is-selected) { border-color: var(--hrb-primary-dark); }
.hrb-slot.is-selected {
    background: var(--hrb-primary-dark);
    border-color: var(--hrb-primary-dark);
    color: var(--hrb-white);
}
.hrb-empty { font-size: 14px; color: var(--hrb-grey-700); padding: 8px 0; }
.hrb-loading { font-size: 14px; color: var(--hrb-grey-400); padding: 8px 0; }

/* Footer mit Auswahl + Bestätigen */
.hrb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--hrb-grey-200);
    padding-top: 17px;
}
.hrb-footer__summary { font-size: 14px; line-height: 1.55; color: var(--hrb-grey-700); }
.hrb-footer__summary strong { color: var(--hrb-black); font-weight: 500; }
.hrb-footer__summary--empty { color: var(--hrb-grey-400); }

.hrb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hrb-green);
    background: var(--hrb-green);
    color: var(--hrb-white);
    font-family: var(--hrb-sans);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    padding: 13px 25px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.hrb-btn:hover:not(:disabled) { background: var(--hrb-green-hover); }
.hrb-btn:disabled { opacity: 0.45; cursor: default; }
.hrb-btn--ghost {
    background: transparent;
    color: var(--hrb-grey-700);
    border-color: var(--hrb-grey-200);
}
.hrb-btn--ghost:hover:not(:disabled) { background: var(--hrb-aside-bg); }

/* Kontaktformular */
.hrb-form { display: flex; flex-direction: column; gap: 14px; }
.hrb-form__title { font-size: 18px; font-weight: 500; margin: 0; color: var(--hrb-black); }
.hrb-field { display: flex; flex-direction: column; gap: 6px; }
.hrb-field label { font-size: 14px; color: var(--hrb-grey-700); }
.hrb-field input,
.hrb-field textarea {
    width: 100%;
    border: 1px solid var(--hrb-grey-200);
    border-radius: 4px;
    padding: 11px 12px;
    font-family: var(--hrb-sans);
    font-size: 15px;
    color: var(--hrb-black);
    background: var(--hrb-white);
}
.hrb-field input:focus,
.hrb-field textarea:focus { outline: none; border-color: var(--hrb-green); }
.hrb-field textarea { min-height: 70px; resize: vertical; }
.hrb-error {
    background: #fbeae8;
    color: #9b2c20;
    border: 1px solid #f0c4bf;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
}

/* Erfolg */
.hrb-success { text-align: center; padding: 24px 8px; }
.hrb-success__check {
    width: 64px; height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #e7f0ec;
    color: var(--hrb-green);
    display: flex; align-items: center; justify-content: center;
}
.hrb-success__check svg { width: 32px; height: 32px; }
.hrb-success__title { font-family: var(--hrb-serif); font-size: 26px; font-weight: 400; margin: 0 0 8px; }
.hrb-success__sub { font-size: 15px; color: var(--hrb-grey-700); margin: 0 0 8px; line-height: 1.6; }
.hrb-success__meta {
    display: inline-block;
    margin: 12px 0 24px;
    padding: 10px 16px;
    border: 1px solid var(--hrb-grey-200);
    border-radius: 8px;
    background: var(--hrb-white);
    font-size: 14px;
}

/* Hintergrund-Scroll zuverlässig sperren (auch iOS Safari): position:fixed +
   gespeicherte Scroll-Position via JS. left/right statt width verhindert Overflow. */
body.hrb-modal-open {
    position: fixed;
    left: 0;
    right: 0;
    overflow: hidden;
}

/* Trigger-Button (Shortcode) */
.hrb-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--hrb-green, #2d6a6a);
    color: #fff;
    font: 500 16px/1.5 "DM Sans", system-ui, sans-serif;
    padding: 13px 28px;
    border-radius: 4px;
    cursor: pointer;
}
.hrb-trigger-btn:hover { background: #245757; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .hrb-modal { padding: 0; }
    /* 100dvh = sichtbare Höhe inkl. Mobile-Browser-Leisten (Fallback 100vh) */
    .hrb-modal__dialog {
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
    }
    /* Der Grid ist auf Mobile der EINZIGE Scroll-Container; overscroll-contain
       verhindert, dass die Geste an die Seite dahinter durchschlägt. */
    .hrb-modal__grid {
        grid-template-columns: 1fr;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .hrb-aside { padding: 48px 24px 32px; gap: 24px; }
    .hrb-aside__deco { display: none; }
    .hrb-main { padding: 24px; overflow: visible; }
    .hrb-slots__grid { grid-template-columns: repeat(2, 1fr); }
    .hrb-footer { flex-direction: column; align-items: stretch; }
    .hrb-btn { width: 100%; }
}

/* Globaler schwebender Buchungs-Button (Sticky-CTA, Desktop + Mobil) */
.hrb-sticky-cta{position:fixed;right:32px;bottom:32px;width:64px;height:64px;border-radius:50%;background:#2d6a6a;color:#fff;border:0;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:9990;box-shadow:0 6px 20px rgba(45,106,106,.35);padding:0;transition:transform .15s,box-shadow .15s}
.hrb-sticky-cta:hover{transform:scale(1.06);box-shadow:0 8px 24px rgba(45,106,106,.45)}
.hrb-sticky-cta svg{width:28px;height:28px}
@media(max-width:767px){.hrb-sticky-cta{right:20px;bottom:24px}}
