/* ============================================================
   GBG Login-Diagnose Modal — v2.15.0
   Mobile-first, kein Framework
   ============================================================ */

/* ── Trigger-Link (sitzt direkt ueber "Passwort vergessen?") ── */
.gbg-login-trigger-wrap {
    margin: 6px 0 2px;
}

.gbg-login-trigger {
    display: inline-block;
    padding: 4px 0;
    background: none;
    border: none;
    color: #B74A32;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    text-decoration: underline;
    cursor: pointer;
}

.gbg-login-trigger:hover,
.gbg-login-trigger:focus {
    color: #8f3a27;
    text-decoration: underline;
    outline: none;
}

/* ── Overlay ────────────────────────────────────────────────── */
.gbg-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    /* Maximaler Stapelwert: an der Kasse haben Checkout-Felder/Theme-Layer sonst
       teilweise ueber dem Modal gelegen. */
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}

.gbg-modal-overlay.gbg-modal--open {
    opacity: 1;
    visibility: visible;
}

/* ── Modal Box ──────────────────────────────────────────────── */
.gbg-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,.3);
    transform: translateY(20px) scale(.97);
    transition: transform .25s;
    position: relative;
}

.gbg-modal-overlay.gbg-modal--open .gbg-modal {
    transform: translateY(0) scale(1);
}

/* ── Modal Header ───────────────────────────────────────────── */
.gbg-modal__header {
    background: #1a1a2e;
    color: #fff;
    padding: 18px 20px 14px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.gbg-modal__header h2 {
    margin: 0;
    font-size: 17px;
    color: #fff;
    line-height: 1.3;
}

.gbg-modal__header p {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: #aaa;
}

.gbg-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    margin: -10px -10px 0 0;
}

.gbg-modal__close:hover { color: #fff; }

/* ── Modal Body ─────────────────────────────────────────────── */
.gbg-modal__body {
    padding: 20px;
}

.gbg-modal__form-group {
    margin-bottom: 16px;
}

.gbg-modal__form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.gbg-modal__form-group input,
.gbg-modal__form-group select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 16px; /* >= 16px verhindert iOS-Zoom beim Fokussieren */
    font-family: inherit;
    color: #222;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.gbg-modal__form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.gbg-modal__form-group input:focus,
.gbg-modal__form-group select:focus {
    border-color: #B74A32;
    box-shadow: 0 0 0 3px rgba(183,74,50,.12);
    outline: none;
    background: #fff;
}

.gbg-modal__form-group input[aria-invalid="true"],
.gbg-modal__form-group select[aria-invalid="true"] {
    border-color: #dc3545;
    background: #fff5f5;
}

/* Inline-Validierungsfehler */
.gbg-modal__formerror {
    margin: -6px 0 14px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f8d7da;
    color: #721c24;
    font-size: 13px;
    line-height: 1.4;
}

/* Privacy note */
.gbg-modal__privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f5f9ff;
    border: 1px solid #d0e4ff;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 11.5px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 16px;
}

.gbg-modal__privacy svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #3a7bd5;
}

/* Submit button */
.gbg-modal__submit {
    width: 100%;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gbg-modal__submit:hover:not(:disabled) { background: #2d2d50; }
.gbg-modal__submit:active:not(:disabled) { transform: scale(.98); }
.gbg-modal__submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── Progress ────────────────────────────────────────────────── */
.gbg-modal__progress {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.gbg-modal__progress.gbg--active {
    display: flex;
}

.gbg-progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity .3s, transform .3s, color .3s;
}

.gbg-progress-step.gbg--visible {
    opacity: 1;
    transform: translateX(0);
    color: #333;
}

.gbg-progress-step.gbg--done {
    color: #28a745;
}

.gbg-step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.gbg-progress-step.gbg--visible .gbg-step-icon {
    background: #e8f4fd;
    animation: gbg-pulse 1s ease-in-out infinite;
}

.gbg-progress-step.gbg--done .gbg-step-icon {
    background: #d4edda;
    animation: none;
}

@keyframes gbg-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ── Result states ──────────────────────────────────────────── */
.gbg-modal__result {
    display: none;
    border-radius: 8px;
    padding: 18px 16px;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.55;
}

.gbg-modal__result.gbg--visible { display: block; }

.gbg-modal__result--success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.gbg-modal__result--warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.gbg-modal__result--error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.gbg-modal__result--info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.gbg-result-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Drei Ergebnis-Boxen: Problem / Reaktion / naechster Schritt */
.gbg-result-box {
    background: #ffffff;
    color: #2a2a2a;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 10px;
    border-left: 3px solid rgba(0,0,0,.15);
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.gbg-result-box:first-of-type { margin-top: 2px; }
.gbg-result-box__label {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #555;
    margin-bottom: 3px;
}
.gbg-result-box p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}
.gbg-result-box--problem  { border-left-color: #dc3545; }
.gbg-result-box--action   { border-left-color: #0d6efd; }
.gbg-result-box--customer { border-left-color: #198754; }
.gbg-result-box--customer .gbg-result-box__label { color: #198754; }

/* Wait offer */
.gbg-modal__wait-offer {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,.1);
    font-size: 12.5px;
    color: #555;
}

.gbg-modal__wait-offer.gbg--visible { display: block; }

.gbg-modal__wait-offer p { margin: 0 0 10px; }

.gbg-modal__wait-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gbg-modal__wait-buttons button {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}

.gbg-modal__wait-buttons button:hover { background: #e8e8e8; }
.gbg-modal__wait-buttons button.gbg--primary {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}
.gbg-modal__wait-buttons button.gbg--primary:hover { background: #2d2d50; }

/* ── Duration badge ─────────────────────────────────────────── */
.gbg-duration-badge {
    display: inline-block;
    background: #1a1a2e;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Spinner ────────────────────────────────────────────────── */
.gbg-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gbg-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes gbg-spin {
    to { transform: rotate(360deg); }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .gbg-modal-overlay, .gbg-modal,
    .gbg-progress-step, .gbg-step-icon,
    .gbg-spinner { transition: none; animation: none; }
}

/* ── v2.18.2: Babyverstaendliche Reset-Schritte + Reset-Button ── */
.gbg-steps {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: gbg-step;
}
.gbg-steps li {
    counter-increment: gbg-step;
    position: relative;
    padding: 11px 12px 11px 46px;
    margin: 0 0 8px;
    background: #f3f9f4;
    border: 1px solid #cfe8d4;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.45;
    color: #1d3b26;
}
.gbg-steps li:last-child { margin-bottom: 0; }
.gbg-steps li::before {
    content: counter(gbg-step);
    position: absolute;
    left: 10px;
    top: 9px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #198754;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 26px;
}

/* Grosser Reset-Button (als <a>) -- volle Breite, gruen, prominent */
.gbg-modal__wait-buttons .gbg-reset-btn {
    flex: 1 1 100%;
    display: block;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    padding: 13px 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    background: #198754;
    color: #fff;
    border: 1px solid #198754;
}
.gbg-modal__wait-buttons .gbg-reset-btn:hover { background: #146c43; }
.gbg-modal__wait-buttons button.gbg--secondary {
    background: #f5f5f5;
    color: #555;
}

.gbg-field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
    color: #6c757d;
}

/* ══════════════════════════════════════════════════════════════════════
   v2.39.0 — SCHRITT-ASSISTENT
   Die drei Ergebnis-Boxen standen bisher gleichzeitig da und wurden nicht
   gelesen. Jetzt: ein Fenster nach dem anderen, grosse Schrift, EIN Knopf
   pro Karte, am Ende die Rueckruf-Frage. Trefferflaechen >= 48px (Handy).
   ══════════════════════════════════════════════════════════════════════ */

.gbg-modal__result.gbg--wizard {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
}

.gbg-wizard {
    margin-top: 4px;
}

/* Fortschritts-Punkte */
.gbg-wizard__dots {
    display: flex;
    gap: 7px;
    justify-content: center;
    margin: 0 0 14px;
}
.gbg-wizard__dots .gbg-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .18);
    transition: background .2s, transform .2s;
}
.gbg-wizard__dots .gbg-dot.gbg--done { background: #198754; }
.gbg-wizard__dots .gbg-dot.gbg--on {
    background: #1a1a2e;
    transform: scale(1.45);
}

/* Karte */
.gbg-card {
    background: #ffffff;
    color: #2a2a2a;
    border-radius: 10px;
    padding: 20px 18px 18px;
    border-top: 5px solid #1a1a2e;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .10);
}
.gbg-card[hidden] { display: none; }

.gbg-card--problem  { border-top-color: #dc3545; }
.gbg-card--action   { border-top-color: #0d6efd; }
.gbg-card--customer { border-top-color: #198754; }
.gbg-card--callback { border-top-color: #1a1a2e; }
.gbg-card--done     { border-top-color: #198754; }

.gbg-card__meta {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    color: #8a8a8a;
    margin-bottom: 6px;
}

.gbg-card__title {
    margin: 0 0 12px;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #1a1a2e;
}
.gbg-card--problem  .gbg-card__title { color: #b02a37; }
.gbg-card--action   .gbg-card__title { color: #0a58ca; }
.gbg-card--customer .gbg-card__title { color: #146c43; }
.gbg-card--done     .gbg-card__title { color: #146c43; }

.gbg-card__lead {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.55;
    color: #2a2a2a;
}

.gbg-card__body .gbg-steps { margin-top: 14px; }

/* Navigation */
.gbg-card__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.gbg-card__next {
    flex: 1 1 100%;
    order: 1;
    min-height: 52px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff;
    background: #1a1a2e;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}
.gbg-card__next:hover { background: #2d2d50; }
.gbg-card__next[disabled] { opacity: .6; cursor: default; }

.gbg-card__back,
.gbg-card__skip {
    order: 2;
    flex: 1 1 45%;
    min-height: 44px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13.5px;
    color: #555;
    background: #f3f3f5;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    cursor: pointer;
}
.gbg-card__back:hover,
.gbg-card__skip:hover { background: #e8e8ea; }

/* Der Reset-Button liegt IN der Karte (nicht mehr in der Fussleiste) */
.gbg-card .gbg-reset-btn {
    display: block;
    box-sizing: border-box;
    margin-top: 14px;
    padding: 14px;
    text-align: center;
    text-decoration: none;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .02em;
    border-radius: 8px;
    background: #198754;
    color: #fff;
    border: 1px solid #198754;
}
.gbg-card .gbg-reset-btn:hover { background: #146c43; }

/* Rueckruf-Karte */
.gbg-cb__label {
    display: block;
    margin: 14px 0 5px;
    font-size: 13.5px;
    font-weight: 600;
    color: #333;
}
.gbg-cb__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 17px;
    letter-spacing: .02em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #222;
}
.gbg-cb__input:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26, 26, 46, .12);
}
.gbg-cb__error {
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f1aeb5;
    border-radius: 6px;
}
.gbg-cb__error[hidden] { display: none; }
.gbg-cb__privacy {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #6c757d;
}
.gbg-cb__send { background: #198754; border-color: #198754; }
.gbg-cb__send:hover { background: #146c43; }
.gbg-cb__send .gbg-spinner { display: inline-block; vertical-align: middle; margin-right: 8px; }

@media (max-width: 480px) {
    .gbg-card { padding: 18px 14px 16px; }
    .gbg-card__title { font-size: 17.5px; }
    .gbg-card__lead  { font-size: 16px; }
    .gbg-card__back,
    .gbg-card__skip { flex: 1 1 100%; }
}
