/* ============================================================
   Pentest Beauftragungsformular · gescheit.IT GmbH · v1.1
   ============================================================ */

:root {
    --pb-blue:       #2563eb;
    --pb-blue-dark:  #1d4ed8;
    --pb-blue-light: #eff6ff;
    --pb-blue-ring:  rgba(37,99,235,.15);
    --pb-blue-border:#bfdbfe;
    --pb-text:       #1e293b;
    --pb-muted:      #64748b;
    --pb-border:     #e2e8f0;
    --pb-radius:     8px;
}

/* ── Honeypot (für Bots unsichtbar, für Menschen nicht erreichbar) ── */
.pb-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.pb-wrap {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: var(--pb-text);
    font-size: .9rem;
    line-height: 1.5;
}

/* ── Fehlerbox ───────────────────────────────────────────── */
.pb-errors {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 3px solid #ef4444;
    border-radius: var(--pb-radius);
    padding: 12px 14px;
    margin-bottom: 16px;
    color: #991b1b;
    font-size: .85rem;
}
.pb-errors ul { margin: 6px 0 0; padding-left: 18px; }
.pb-errors li { margin-bottom: 2px; }

/* ── Step-Indicator ──────────────────────────────────────── */
.pb-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
    padding: 0 4px;
}
.pb-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.pb-step-bubble {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pb-border);
    color: var(--pb-muted);
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
    position: relative;
    z-index: 1;
}
.pb-step-item.pb-current .pb-step-bubble {
    background: var(--pb-blue);
    color: #fff;
    box-shadow: 0 0 0 3px var(--pb-blue-ring);
}
.pb-step-item.pb-done .pb-step-bubble {
    background: var(--pb-blue);
    color: #fff;
}
.pb-step-item.pb-done .pb-step-bubble::after {
    content: '✓';
    font-size: .75rem;
}
.pb-step-item.pb-done .pb-step-bubble { font-size: 0; }
.pb-step-item.pb-done .pb-step-bubble::after { font-size: .8rem; }

.pb-step-label {
    font-size: .72rem;
    color: var(--pb-muted);
    white-space: nowrap;
    font-weight: 500;
    transition: color .2s;
}
.pb-step-item.pb-current .pb-step-label,
.pb-step-item.pb-done .pb-step-label {
    color: var(--pb-blue);
}
.pb-step-line {
    flex: 1;
    height: 2px;
    background: var(--pb-border);
    margin: 0 6px;
    margin-bottom: 18px;
    transition: background .2s;
    min-width: 20px;
}
.pb-step-line.pb-line-done {
    background: var(--pb-blue);
}

/* ── Step Panels ─────────────────────────────────────────── */
.pb-step-panel {
    display: none;
}
.pb-step-panel.pb-active {
    display: block;
}

/* ── Panel-Titel ─────────────────────────────────────────── */
.pb-panel-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--pb-text);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--pb-blue);
}

.pb-hint {
    font-size: .8rem;
    color: var(--pb-muted);
    margin: -10px 0 12px;
    line-height: 1.45;
}

/* ── Divider ─────────────────────────────────────────────── */
.pb-divider {
    border: none;
    border-top: 1px solid var(--pb-border);
    margin: 18px 0;
}

/* ── Felder ──────────────────────────────────────────────── */
.pb-field {
    margin-bottom: 12px;
}
.pb-field:last-child { margin-bottom: 0; }

.pb-field label {
    display: block;
    font-weight: 600;
    font-size: .82rem;
    margin-bottom: 4px;
    color: #334155;
}

.pb-field input[type="text"],
.pb-field input[type="email"],
.pb-field input[type="tel"],
.pb-field textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--pb-border);
    border-radius: 5px;
    font-size: .875rem;
    box-sizing: border-box;
    background: #fafbfc;
    color: var(--pb-text);
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.pb-field input:focus,
.pb-field textarea:focus {
    border-color: var(--pb-blue);
    outline: none;
    box-shadow: 0 0 0 3px var(--pb-blue-ring);
    background: #fff;
}
.pb-field input.pb-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.pb-field textarea {
    resize: vertical;
    min-height: 64px;
}

/* ── Grid ────────────────────────────────────────────────── */
.pb-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 480px) {
    .pb-grid-2 { grid-template-columns: 1fr; }
}

/* ── Radio ───────────────────────────────────────────────── */
.pb-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.pb-radio {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 400;
}
.pb-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--pb-blue);
    cursor: pointer;
}

/* ── Scope-Kacheln ───────────────────────────────────────── */
.pb-scope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.pb-scope-grid.pb-scope-error {
    outline: 2px solid #ef4444;
    outline-offset: 3px;
    border-radius: 6px;
}
@media (max-width: 480px) {
    .pb-scope-grid { grid-template-columns: 1fr; }
}

.pb-scope-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px 10px 36px;
    border: 1.5px solid var(--pb-border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
    user-select: none;
}
.pb-scope-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.pb-scope-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 11px;
    width: 16px;
    height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 3px;
    background: #fff;
    transition: border-color .15s, background .15s;
}
.pb-scope-item:hover {
    border-color: var(--pb-blue);
    background: var(--pb-blue-light);
}
.pb-scope-item:hover::before { border-color: var(--pb-blue); }

.pb-scope-item.pb-checked {
    border-color: var(--pb-blue);
    background: var(--pb-blue-light);
}
.pb-scope-item.pb-checked::before {
    background: var(--pb-blue);
    border-color: var(--pb-blue);
}
.pb-scope-item.pb-checked::after {
    content: '✓';
    position: absolute;
    left: 12px;
    top: 10px;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
}

.pb-scope-title {
    font-weight: 700;
    font-size: .8rem;
    color: var(--pb-text);
    margin-bottom: 2px;
    line-height: 1.3;
}
.pb-scope-item.pb-checked .pb-scope-title {
    color: var(--pb-blue-dark);
}
.pb-scope-desc {
    font-size: .73rem;
    color: var(--pb-muted);
    line-height: 1.35;
}

/* ── Bestätigungs-Boxen ──────────────────────────────────── */
.pb-confirm-box {
    background: var(--pb-blue-light);
    border: 1px solid var(--pb-blue-border);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: border-color .15s, background .15s;
}
.pb-confirm-box:last-of-type { margin-bottom: 0; }
.pb-confirm-box.pb-confirm-error {
    background: #fef2f2;
    border-color: #fca5a5;
    border-left: 3px solid #ef4444;
}

.pb-chk-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    font-size: .83rem;
    line-height: 1.45;
    font-weight: 400;
}
.pb-chk-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--pb-blue);
    cursor: pointer;
}

/* ── Hinweisbox ──────────────────────────────────────────── */
.pb-notice {
    background: #f0f9ff;
    border-left: 3px solid var(--pb-blue);
    padding: 10px 14px;
    border-radius: 0 5px 5px 0;
    font-size: .8rem;
    color: #334155;
    line-height: 1.5;
    margin-top: 14px;
}

/* ── Navigation ──────────────────────────────────────────── */
.pb-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--pb-border);
}
.pb-nav-right {
    display: flex;
    gap: 8px;
}

.pb-btn-back,
.pb-btn-next,
.pb-btn-submit {
    display: inline-flex;
    align-items: center;
    padding: 9px 22px;
    font-size: .875rem;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    font-family: inherit;
    letter-spacing: .01em;
}
.pb-btn-back {
    background: #f1f5f9;
    color: #475569;
}
.pb-btn-back:hover {
    background: var(--pb-border);
}
.pb-btn-next,
.pb-btn-submit {
    background: var(--pb-blue);
    color: #fff;
    box-shadow: 0 1px 6px rgba(37,99,235,.25);
}
.pb-btn-next:hover,
.pb-btn-submit:hover {
    background: var(--pb-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(37,99,235,.35);
}
.pb-btn-next:active,
.pb-btn-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Erfolgsseite ────────────────────────────────────────── */
.pb-success {
    text-align: center;
    padding: 40px 24px;
}
.pb-success-icon {
    width: 56px;
    height: 56px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 56px;
    margin: 0 auto 18px;
    box-shadow: 0 4px 14px rgba(34,197,94,.3);
}
.pb-success h2 {
    color: var(--pb-text);
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.pb-success p {
    color: var(--pb-muted);
    font-size: .875rem;
    line-height: 1.55;
    margin-bottom: 8px;
}
.pb-success-contact {
    margin-top: 16px !important;
    padding-top: 14px;
    border-top: 1px solid var(--pb-border);
    color: #334155 !important;
}
