/**
 * EHNES Meeting-Booking Widget — Frontend-CSS
 *
 * Layout: 2-Spalten Desktop (Person links, Form rechts), 1-Spalten Mobile.
 * Tokens: #29BD98 Primary, #0C1E21 Dark, #15293A Text, Fraunces+Ubuntu.
 */

.ehnes-mb {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 0;
    background: #FFFFFF;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(12, 30, 33, .10);
    color: #15293A;
    font-family: 'Ubuntu', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif;
}
@media (max-width: 900px) {
    .ehnes-mb { grid-template-columns: 1fr; }
}

/* ============================================================
   Person-Card (links / oben)
   ============================================================ */
.ehnes-mb-person {
    background: #0C1E21;
    color: #FFFFFF;
    padding: 36px 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@media (max-width: 900px) {
    .ehnes-mb-person { padding: 28px 24px 30px; }
}

/* Foto-Stack: alle Personen-Fotos uebereinander, nur .is-active sichtbar */
.ehnes-mb-person__photo-stack {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 320px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,.05);
}
.ehnes-mb-person.is-multi .ehnes-mb-person__photo-stack {
    /* Bei multi-person-Modus: Initial-Foto schwach erscheinen (User soll erst auswaehlen) */
}
.ehnes-mb-person__photo {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease;
}
.ehnes-mb-person__photo.is-active {
    opacity: 1;
    visibility: visible;
}
.ehnes-mb-person__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card-Stack: CSS-Grid mit allen Cards im selben Cell - so wird die
   Stack-Hoehe auf die laengste Card ausgelegt und das Container-Padding
   bleibt erhalten (kein Ueberlauf). */
.ehnes-mb-person__card-stack {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 18px;
}
.ehnes-mb-person__card {
    grid-row: 1;
    grid-column: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease;
}
.ehnes-mb-person__card.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ehnes-mb-eyebrow {
    margin: 0 0 6px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #29BD98;
}

.ehnes-mb-headline {
    margin: 0 0 12px;
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: 2.2rem;
    line-height: 1.15;
    color: #FFFFFF;
}
@media (max-width: 900px) {
    .ehnes-mb-headline { font-size: 1.7rem; }
}

.ehnes-mb-lead {
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.6;
    color: #C8D2D0;
}

.ehnes-mb-person__name {
    margin: 0 0 2px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.2rem;
    color: #FFFFFF;
}
.ehnes-mb-person__role {
    margin: 0 0 10px;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #29BD98;
}
.ehnes-mb-person__bio {
    margin: 0;
    font-size: .92rem;
    line-height: 1.6;
    color: #A9B8B8;
}

/* ============================================================
   Form-Bereich (rechts / unten)
   ============================================================ */
.ehnes-mb-form {
    padding: 36px 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
@media (max-width: 900px) {
    .ehnes-mb-form { padding: 24px 22px 28px; }
}

/* Progress - flex-based mit Connector-Line als pseudo nach jedem Step */
.ehnes-mb-progress {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}
.ehnes-mb-progress__step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    color: #8A949C;
    font-size: .82rem;
    font-weight: 600;
    min-width: 0;
}
.ehnes-mb-progress__step:last-child {
    flex: 0 0 auto;
}
/* Connector als ::after - flex-fill zwischen diesem Step und naechstem Bullet */
.ehnes-mb-progress__step::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    background: #ECEFEC;
    margin: 0 12px;
    border-radius: 1px;
    transition: background 220ms ease;
    min-width: 16px;
}
.ehnes-mb-progress__step:last-child::after { display: none; }
.ehnes-mb-progress__step.is-done::after { background: #29BD98; }

.ehnes-mb-progress__bullet {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #8A949C;
    border: 2px solid #ECEFEC;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 700;
    flex: 0 0 28px;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.ehnes-mb-progress__step.is-active .ehnes-mb-progress__bullet { background: #29BD98; border-color: #29BD98; color: #FFFFFF; }
.ehnes-mb-progress__step.is-done   .ehnes-mb-progress__bullet { background: #29BD98; border-color: #29BD98; color: #FFFFFF; }
.ehnes-mb-progress__step.is-active { color: #15293A; }

/* Klickbar nur fuer abgeschlossene Steps (Rueckwaerts-Navigation). */
.ehnes-mb-progress__step.is-done {
    cursor: pointer;
}
.ehnes-mb-progress__step.is-done:hover .ehnes-mb-progress__bullet {
    background: #0C1E21;
    border-color: #0C1E21;
    transform: scale(1.05);
}
.ehnes-mb-progress__step.is-done:hover .ehnes-mb-progress__label {
    color: #0C1E21;
}
.ehnes-mb-progress__step.is-active,
.ehnes-mb-progress__step:not(.is-done):not(.is-active) {
    cursor: default;
}
.ehnes-mb-progress__label { white-space: nowrap; }
@media (max-width: 600px) {
    .ehnes-mb-progress__label { display: none; }
    .ehnes-mb-progress__step::after { margin: 0 6px; }
}

/* DSGVO + Newsletter Checkboxes */
.ehnes-mb-row--check {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}
.ehnes-mb-row--check label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .9rem;
    font-weight: 400;
    line-height: 1.5;
    color: #5C6873;
    cursor: pointer;
}
.ehnes-mb-row--check input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: #29BD98;
    cursor: pointer;
}
.ehnes-mb-row--check a {
    color: #29BD98;
    text-decoration: underline;
}
.ehnes-mb-row--check a:hover { color: #0C1E21; }

/* ============================================================
   Person-Picker (Step 1)
   ============================================================ */
.ehnes-mb-people {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: stretch;
    grid-auto-rows: 1fr;     /* alle Reihen gleich hoch */
}
.ehnes-mb-people__pick,
button.ehnes-mb-people__pick {
    background: #FFFFFF !important;
    border: 2px solid #ECEFEC !important;
    border-radius: 12px;
    padding: 14px 12px 16px !important;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 6px;
    /* Hoehen-Sync: alle Picker-Cards in der Reihe identisch hoch */
    height: 100% !important;
    width: 100% !important;
    min-height: 100%;
    align-self: stretch;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit !important;
    font-size: inherit;
    color: #15293A !important;
    line-height: 1.3;
    margin: 0;
}
.ehnes-mb-people__pick:hover,
button.ehnes-mb-people__pick:hover {
    background: #FFFFFF !important;
    border-color: #29BD98 !important;
    transform: translateY(-2px);
}
.ehnes-mb-people__pick.is-selected,
button.ehnes-mb-people__pick.is-selected {
    background: #F0F7F4 !important;
    border-color: #29BD98 !important;
    box-shadow: 0 6px 16px rgba(41, 189, 152, .18);
}
.ehnes-mb-people__photo {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    background: #F0F7F4;
    margin-bottom: 6px;
}
.ehnes-mb-people__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ehnes-mb-people__name {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.2;
    color: #15293A;
}
.ehnes-mb-people__role {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #29BD98;
}

/* Steps */
.ehnes-mb-steps { display: contents; }

.ehnes-mb-step {
    display: none;
    border: 0;
    padding: 0;
    margin: 0;
    flex-direction: column;
    gap: 14px;
}
.ehnes-mb-step.is-active { display: flex; }

.ehnes-mb-step__title {
    margin: 0 0 4px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1.25;
    color: #15293A;
    padding: 0;
}

.ehnes-mb-hint {
    margin: 0 0 4px;
    font-size: .9rem;
    color: #5C6873;
    line-height: 1.5;
}

.ehnes-mb-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ehnes-mb-row label {
    font-size: .85rem;
    font-weight: 600;
    color: #15293A;
}

.ehnes-mb-input {
    border: 1.5px solid #DDE5E1;
    border-radius: 10px;
    background: #FFFFFF;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    color: #15293A;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.ehnes-mb-input:focus {
    outline: none;
    border-color: #29BD98;
    box-shadow: 0 0 0 3px rgba(41,189,152,.18);
}
textarea.ehnes-mb-input {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.ehnes-mb-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ehnes-mb-error {
    margin: 4px 0 0;
    color: #b91c1c;
    background: #fee2e2;
    padding: .5rem .75rem;
    border-radius: .35rem;
    font-size: .9rem;
}
.ehnes-mb-success {
    margin: 4px 0 0;
    color: #15803d;
    background: #dcfce7;
    padding: .5rem .75rem;
    border-radius: .35rem;
    font-size: .9rem;
}

/* Actions */
.ehnes-mb-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
    justify-content: flex-end;
}
/* Buttons - alle Detail-Werte ueber das unified pattern in widgets.css.
   Hier nur noch Variant-Farben + Disabled-State + !important gegen
   Bexon/Elementor-globale-Button-Overrides. */
button.ehnes-mb-btn,
.ehnes-mb-btn { box-sizing: border-box; }
.ehnes-mb-btn:hover { transform: translateY(-1px); }
.ehnes-mb-btn:disabled { opacity: .5; cursor: default; transform: none !important; }
.ehnes-mb-btn:disabled:hover { transform: none; }

.ehnes-mb-btn--primary,
button.ehnes-mb-btn--primary {
    background: #29BD98 !important;
    color: #FFFFFF !important;
    border-color: #29BD98 !important;
}
/* Bexon-Pattern: Hintergrund bleibt gruen auf Hover - nur Text rollt
   nach oben + Icon rotiert. Kein Background-Wechsel. */

.ehnes-mb-btn--ghost,
button.ehnes-mb-btn--ghost {
    background: transparent !important;
    color: #15293A !important;
    border-color: #C9D2CD !important;
}
.ehnes-mb-btn--ghost:hover,
button.ehnes-mb-btn--ghost:hover {
    background: #F4F5F7 !important;
    border-color: #0C1E21 !important;
    color: #15293A !important;
}

/* ============================================================
   Calendar
   ============================================================ */
.ehnes-mb-cal {
    background: #FFFFFF;
    border: 1.5px solid #ECEFEC;
    border-radius: 12px;
    padding: 16px;
}
.ehnes-mb-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ehnes-mb-cal__title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: #15293A;
}
.ehnes-mb-cal__nav {
    width: 32px;
    height: 32px;
    background: transparent;
    color: #15293A;
    border: 1.5px solid #DDE5E1;
    border-radius: 50%;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1;
}
.ehnes-mb-cal__nav:hover { background: #29BD98; color: #FFFFFF; border-color: #29BD98; }

.ehnes-mb-cal__weekdays,
.ehnes-mb-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.ehnes-mb-cal__weekdays {
    margin-bottom: 6px;
}
.ehnes-mb-cal__weekdays span {
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8A949C;
    padding: 4px 0;
}
.ehnes-mb-cal__weekdays span.is-weekend { color: #C9D2CD; }

.ehnes-mb-cal__day,
.ehnes-mb-cal__blank {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1.5px solid transparent;
    color: #15293A;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
    line-height: 1;
}
.ehnes-mb-cal__day:hover:not(.is-disabled) {
    background: #F0F7F4;
    border-color: #29BD98;
}
.ehnes-mb-cal__day.is-disabled {
    color: #C9D2CD;
    cursor: not-allowed;
    background: transparent;
}
.ehnes-mb-cal__day.is-weekend { color: #DDE5E1; }
.ehnes-mb-cal__day.is-selected {
    background: #29BD98;
    border-color: #29BD98;
    color: #FFFFFF;
}

/* ============================================================
   Time-Slots
   ============================================================ */
.ehnes-mb-slots {
    background: #F0F7F4;
    border: 1px solid #DDE5E1;
    border-radius: 12px;
    padding: 16px 18px 18px;
}
.ehnes-mb-slots__title {
    margin: 0 0 12px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #15293A;
}
.ehnes-mb-slots__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 8px;
}
.ehnes-mb-slot {
    background: #FFFFFF;
    color: #15293A;
    border: 1.5px solid #DDE5E1;
    border-radius: 8px;
    padding: 10px 6px 12px;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
    -webkit-appearance: none;
    appearance: none;
}
.ehnes-mb-slot:hover { border-color: #29BD98; transform: translateY(-1px); }
.ehnes-mb-slot.is-selected {
    background: #29BD98;
    color: #FFFFFF;
    border-color: #29BD98;
}
.ehnes-mb-slot.is-disabled { opacity: .35; cursor: not-allowed; }

/* ============================================================
   Summary (Step 4)
   ============================================================ */
.ehnes-mb-summary {
    background: #F4F5F7;
    border: 1px solid #ECEFEC;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 4px;
}
.ehnes-mb-sum {
    margin: 0;
    display: grid;
    gap: 8px;
}
.ehnes-mb-sum__row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    font-size: .92rem;
}
.ehnes-mb-sum__row dt {
    color: #5C6873;
    font-weight: 600;
}
.ehnes-mb-sum__row dd {
    margin: 0;
    color: #15293A;
}

/* ============================================================
   Done (Erfolgs-Screen)
   ============================================================ */
.ehnes-mb-step--done {
    text-align: center;
    align-items: center;
    padding: 24px 8px;
}
.ehnes-mb-done__title {
    margin: 0 0 8px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 400;
    font-size: 1.8rem;
    color: #29BD98;
}
.ehnes-mb-done__text {
    margin: 0 auto;
    max-width: 480px;
    color: #5C6873;
    font-size: .98rem;
    line-height: 1.6;
}
