/* Meldestelle Pro - Public (Frontend / Vollbild)  v0.7.0 */

/* --- Mesmerize-Interferenz neutralisieren (gezielt, kein Wildcard) --- */
.msp-pub div::before, .msp-pub div::after,
.msp-pub span::before, .msp-pub span::after,
.msp-pub p::before, .msp-pub p::after,
.msp-pub a::before, .msp-pub a::after,
.msp-pub li::before, .msp-pub li::after,
.msp-pub ul::before, .msp-pub ul::after,
.msp-pub h2::before, .msp-pub h2::after,
.msp-pub label::before, .msp-pub label::after,
.msp-pub legend::before, .msp-pub legend::after,
.msp-pub fieldset::before, .msp-pub fieldset::after,
.msp-pub form::before, .msp-pub form::after,
.msp-pub button::before, .msp-pub button::after,
.msp-pub input::before, .msp-pub input::after,
.msp-pub select::before, .msp-pub select::after,
.msp-pub textarea::before, .msp-pub textarea::after {
    content: none !important;
}
.msp-pub fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.msp-pub * { box-sizing: border-box; }

/* --- Vollbild-Rahmen --- */
.msp-pub-body {
    margin: 0; padding: 0; min-height: 100vh;
    background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 45%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #0f172a;
}
.msp-pub-shell {
    max-width: 760px; margin: 0 auto; padding: 48px 20px 32px;
    min-height: 100vh; display: flex; flex-direction: column;
}
.msp-pub-footer {
    margin-top: auto; padding-top: 28px; text-align: center;
    color: #64748b; font-size: 13.5px;
}
.msp-pub-footer-nav { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.msp-pub-footer-nav a { color: #475569; text-decoration: none; }
.msp-pub-footer-nav a:hover { color: var(--msp-accent, #1d4ed8); text-decoration: underline; }
.msp-pub-footer-org { margin-top: 8px; color: #94a3b8; font-size: 12.5px; }

/* --- Karte --- */
.msp-pub {
    --msp-accent: #1d4ed8;
    max-width: 760px; margin: 0 auto;
    font-size: 16px; line-height: 1.6; color: #0f172a;
}
.msp-pub-card {
    background: #fff;
    border: 1px solid #e7ebf3;
    border-radius: 20px;
    box-shadow: 0 18px 50px -24px rgba(15, 23, 42, 0.35);
    padding: 34px 34px 30px;
}
.msp-pub-narrow { max-width: 560px; }

/* --- Header --- */
.msp-pub-header { margin-bottom: 22px; }
.msp-pub-logo { max-height: 56px; margin-bottom: 14px; display: block; }
.msp-pub-h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; }
.msp-pub-intro { color: #52607a; margin: 0; }

/* --- Formular --- */
.msp-pub-form { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.msp-pub-field { display: flex; flex-direction: column; gap: 7px; }
.msp-pub-lbl, .msp-pub-fieldset > legend { font-weight: 600; font-size: 14px; color: #1e293b; }
.msp-pub-field input[type=text],
.msp-pub-field input[type=email],
.msp-pub-field input[type=password],
.msp-pub-field input[type=url],
.msp-pub-field select,
.msp-pub-field textarea {
    width: 100%; padding: 13px 15px;
    border: 1.5px solid #d7deea; border-radius: 12px;
    font-size: 15px; font-family: inherit; color: #0f172a; background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.msp-pub-field input:focus,
.msp-pub-field select:focus,
.msp-pub-field textarea:focus {
    outline: none;
    border-color: var(--msp-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--msp-accent) 18%, transparent);
}
.msp-pub-field textarea { resize: vertical; min-height: 120px; }
.msp-pub-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Auswahl anonym/nicht anonym als Kacheln */
.msp-pub-fieldset { display: flex; flex-direction: column; gap: 10px; }
.msp-pub-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.msp-pub-choice {
    display: flex; align-items: flex-start; gap: 11px;
    border: 1.5px solid #d7deea; border-radius: 12px; padding: 14px 16px;
    cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s;
}
.msp-pub-choice span { display: flex; flex-direction: column; gap: 3px; }
.msp-pub-choice strong { font-weight: 700; font-size: 15px; }
.msp-pub-choice small { color: #64748b; font-size: 12.5px; line-height: 1.4; font-weight: 400; }
.msp-pub-choice input { margin-top: 2px; }
.msp-pub-choice:has(input:checked) { border-color: var(--msp-accent); background: color-mix(in srgb, var(--msp-accent) 6%, #fff); }
.msp-pub-choice:hover { border-color: var(--msp-accent); }
.msp-pub-choice input { accent-color: var(--msp-accent); width: 18px; height: 18px; }

.msp-pub-kontakt, .msp-pub-anonback { display: flex; flex-direction: column; gap: 14px; }
.msp-pub-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; }
.msp-pub-check input { margin-top: 3px; accent-color: var(--msp-accent); width: 18px; height: 18px; flex: 0 0 auto; }

.msp-pub-datenschutz {
    background: #f6f8fc; border: 1px solid #e7ebf3; border-radius: 12px;
    padding: 14px 16px; font-size: 14px; color: #52607a;
}
.msp-pub-datenschutz p { margin: 0 0 6px; }
.msp-pub-datenschutz p:last-child { margin-bottom: 0; }
.msp-pub-dslink { color: var(--msp-accent); font-weight: 600; text-decoration: none; }
.msp-pub-dslink:hover { text-decoration: underline; }

.msp-pub-btn {
    align-self: flex-start;
    background: var(--msp-accent); color: #fff; border: none; border-radius: 12px;
    padding: 14px 26px; font-size: 16px; font-weight: 600; cursor: pointer;
    box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--msp-accent) 80%, transparent);
    transition: transform .05s ease, filter .15s ease;
}
.msp-pub-btn:hover { filter: brightness(1.05); }
.msp-pub-btn:active { transform: translateY(1px); }

.msp-pub-error {
    background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
    border-radius: 12px; padding: 12px 16px; margin-bottom: 6px;
}

/* --- Erfolg --- */
.msp-pub-success { text-align: center; }
.msp-pub-check-icon {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
    background: #dcfce7; color: #16a34a; font-size: 34px; line-height: 64px; font-weight: 700;
}
.msp-pub-cred {
    display: flex; gap: 24px; flex-wrap: wrap; justify-content: center;
    background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 14px;
    padding: 18px 22px; margin: 18px 0;
}
.msp-pub-cred > div { display: flex; flex-direction: column; gap: 4px; }
.msp-pub-cred span { font-size: 13px; color: #52607a; }
.msp-pub-cred code { font-size: 22px; font-weight: 700; letter-spacing: 1px; color: #0f172a; }
.msp-pub-warn { color: #b45309; font-size: 14px; }

/* --- Sicherheits-Footer --- */
.msp-pub-secure {
    margin-top: 24px; padding-top: 20px; border-top: 1px solid #eef1f7;
}
.msp-pub-secure-head {
    display: inline-flex; align-items: center; gap: 7px;
    font-weight: 700; font-size: 13px; color: #0f766e; text-transform: uppercase; letter-spacing: .04em;
}
.msp-pub-secure-head::before { content: "\1F512"; }
.msp-pub-secure-intro { color: #52607a; font-size: 14px; margin: 8px 0 10px; }
.msp-pub-secure-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.msp-pub-secure-list li { position: relative; padding-left: 24px; font-size: 13.5px; color: #334155; }
.msp-pub-secure-list li::before {
    content: "\2713"; position: absolute; left: 0; top: 0;
    color: #16a34a; font-weight: 700;
}

/* --- Postfach --- */
.msp-pub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.msp-pub-inline { margin: 0; }
.msp-pub-link { background: none; border: none; color: var(--msp-accent); cursor: pointer; text-decoration: underline; font-size: 14px; }
.msp-pub-status { background: #f6f8fc; border: 1px solid #e7ebf3; border-radius: 12px; padding: 11px 15px; }
.msp-pub-thread { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.msp-pub-msg { border-radius: 14px; padding: 11px 15px; max-width: 86%; }
.msp-pub-msg-out { align-self: flex-end; background: color-mix(in srgb, var(--msp-accent) 12%, #fff); border: 1px solid color-mix(in srgb, var(--msp-accent) 30%, #fff); }
.msp-pub-msg-in { align-self: flex-start; background: #f1f5f9; border: 1px solid #e2e8f0; }
.msp-pub-msg-meta { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.msp-pub-muted { color: #64748b; }

/* Hinweis-Boxen (v0.8.0) */
.msp-pub-notice {
    display: flex; gap: 12px; align-items: flex-start;
    background: color-mix(in srgb, var(--msp-accent) 7%, #fff);
    border: 1px solid color-mix(in srgb, var(--msp-accent) 22%, #fff);
    border-radius: 14px; padding: 15px 17px; margin-bottom: 20px;
}
.msp-pub-notice-icon { font-size: 20px; line-height: 1.3; flex: 0 0 auto; }
.msp-pub-notice p { margin: 0; font-size: 14px; color: #334155; line-height: 1.55; }
.msp-pub-optnote {
    font-size: 13px; color: #64748b; background: #f6f8fc;
    border-left: 3px solid #cbd5e1; border-radius: 6px; padding: 8px 12px;
}
.msp-pub-note {
    margin-top: 14px; font-size: 13.5px; color: #475569; line-height: 1.55;
    background: #f6f8fc; border: 1px solid #e7ebf3; border-radius: 12px; padding: 12px 15px;
    text-align: left;
}

/* Kunden-/Anwendungsbereich-Hinweis (v0.9.0) */
.msp-pub-kundenhinweis {
    border: 2px solid #f59e0b; background: #fffbeb; border-radius: 14px;
    padding: 16px 18px; color: #7c2d12;
    animation: msp-pop .25s ease;
}
.msp-pub-kundenhinweis[hidden] { display: none; }
.msp-pub-kundenhinweis-head {
    display: flex; align-items: center; gap: 8px;
    font-weight: 800; font-size: 15px; color: #b45309; margin-bottom: 6px;
}
.msp-pub-kundenhinweis-icon { font-size: 18px; }
.msp-pub-kundenhinweis p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.55; }
.msp-pub-kundenhinweis-links { font-weight: 600; }
.msp-pub-kundenhinweis-links a { color: #b45309; }
@keyframes msp-pop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pflichtdokumente (v0.9.0) */
.msp-pub-docs {
    display: flex; flex-direction: column; gap: 10px;
    background: #f6f8fc; border: 1px solid #e7ebf3; border-radius: 12px; padding: 14px 16px;
}
.msp-pub-docs .msp-pub-lbl { margin-bottom: 2px; }
.msp-pub-docs a { color: var(--msp-accent, #1d4ed8); font-weight: 600; }

/* CTA zum Postfach (v0.9.2) */
.msp-pub-cta { margin-top: 18px; }
.msp-pub-cta .msp-pub-btn { display: inline-block; text-decoration: none; align-self: center; }

/* Aufklaerung Rechte & Pflichten (v0.10.0) */
.msp-pub-rechte {
    border: 1px solid #e7ebf3; border-radius: 14px; background: #fbfcfe;
    padding: 0; overflow: hidden;
}
.msp-pub-rechte > summary {
    cursor: pointer; list-style: none; padding: 14px 18px;
    font-weight: 700; font-size: 14.5px; color: #1e293b;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.msp-pub-rechte > summary::-webkit-details-marker { display: none; }
.msp-pub-rechte > summary::after {
    content: "\25BC"; font-size: 11px; color: #64748b; transition: transform .2s ease;
}
.msp-pub-rechte[open] > summary::after { transform: rotate(180deg); }
.msp-pub-rechte > summary:hover { background: #f3f6fb; }
.msp-pub-rechte-body { padding: 4px 18px 16px; }
.msp-pub-rechte-item { margin-top: 14px; }
.msp-pub-rechte-item:first-child { margin-top: 4px; }
.msp-pub-rechte-item strong { display: block; color: #0f172a; font-size: 14px; margin-bottom: 3px; }
.msp-pub-rechte-item p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #475569; }

/* Selbstloeschung / Kein-HinSchG-Hinweis (v0.11.0) */
.msp-pub-destruct { text-align: center; border: 2px solid #dc2626; }
.msp-pub-destruct-badge {
    width: 66px; height: 66px; margin: 4px auto 10px; border-radius: 50%;
    background: #fee2e2; color: #dc2626; font-size: 34px; line-height: 66px;
}
.msp-pub-destruct-done { background: #dcfce7; color: #16a34a; }
.msp-pub-destruct-h { font-size: 21px; font-weight: 800; color: #7f1d1d; margin: 0 0 12px; line-height: 1.3; }
.msp-pub-destruct-lead { font-size: 15px; font-weight: 700; color: #b91c1c; margin: 0 0 10px; }
.msp-pub-destruct-text { font-size: 14.5px; color: #334155; margin: 0 0 14px; line-height: 1.6; }
.msp-pub-destruct-timerbox {
    margin: 18px auto; padding: 18px; max-width: 340px;
    background: #7f1d1d; border-radius: 16px; color: #fff;
}
.msp-pub-destruct-count {
    font-size: 64px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}
.msp-pub-destruct-timerlbl { font-size: 12.5px; color: #fecaca; margin-top: 8px; line-height: 1.4; }
.msp-pub-destruct-note {
    font-size: 13px; color: #7f1d1d; background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 10px; padding: 11px 14px; margin: 4px 0 16px;
}
.msp-pub-btn-danger { background: #dc2626; align-self: center; }
.msp-pub-btn-danger:hover { background: #b91c1c; }

.msp-pub-logo-sm { max-height: 44px; margin: 0 auto 10px; }

@media (max-width: 640px) {
    .msp-pub-card { padding: 24px 20px; border-radius: 16px; }
    .msp-pub-grid2, .msp-pub-choices, .msp-pub-secure-list { grid-template-columns: 1fr; }
    .msp-pub-shell { padding: 24px 14px 48px; }
    .msp-pub-h2 { font-size: 22px; }
}
