/**
 ** CMM360 Lead-Flow –- Frontend
 **/

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700&display=swap');

:root {
    --lf-primary:         #CC0000;
    --lf-color-button:    #990000;
    --lf-color-success:   #16a34a;
    --lf-color-alert:     #b91c1c;
    --lf-color-inactive:  #9ca3af;
    --lf-font-head:       'Inter', Arial, sans-serif;
}


/* ── Reset ───────────────────────────────────────────────────────────────── */
.leadflow-page * { box-sizing: border-box; }

/* Inter als Standard für body → alle Elemente erben.
   Explizite font-family NUR wo nötig (Dashicons, Custom-Font). */
body.leadflow-page {
    font-family: 'Inter', Arial, sans-serif;
    background-color: #efefef;
    margin: 0;
    padding: 0;
    color: #111827;
}


/* ── Typografie ──────────────────────────────────────────────────────────── */
/* h1-h3 und alle Buttons nutzen --lf-font-head (überschreibbar per Event) */
.leadflow-page h1,
.leadflow-page h2,
.leadflow-page h3 {
    font-weight: 700;
    font-family: var(--lf-font-head);
}


/* ── Layout ──────────────────────────────────────────────────────────────── */
.lf-wrap {
    max-width: 540px;
    margin: 0 auto;
    padding: 40px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.lf-wrap--center { text-align: center; }


/* ── Card ────────────────────────────────────────────────────────────────── */
.lf-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}


/* ── Partner Hero ────────────────────────────────────────────────────────── */
.lf-partner-hero {
    text-align: center;
    margin: -24px -24px 24px -24px;
    padding: 40px 24px;
    border-bottom: 1px solid #e5e7eb;
}
.lf-partner-hero-logo {
    max-height: 150px;
    max-width: 240px;
    object-fit: contain;
}
.lf-partner-hero-name {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0;
    font-family: var(--lf-font-head);
}


/* ── Fehlermeldung ───────────────────────────────────────────────────────── */
.lf-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.lf-alert--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}


/* ── Labels ──────────────────────────────────────────────────────────────── */
.lf-field label,
.lf-optin-label {
    font-weight: 600;
    font-size: 15px;
    color: #222;
    display: block;
    margin-bottom: 4px;
}
.lf-required-star {
    color: var(--lf-primary);
    font-weight: 700;
    margin-left: 2px;
}


/* ── Formularfelder ──────────────────────────────────────────────────────── */
.lf-field { margin-bottom: 14px; }
.lf-field input[type="text"],
.lf-field input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 15px;
    transition: border-color .15s;
}
.lf-field input:focus {
    outline: none;
    border-color: var(--lf-primary);
    box-shadow: 0 0 0 3px rgba(204,0,0,.12);
}


/* ── Opt-in Box ──────────────────────────────────────────────────────────── */
.lf-optin-box {
    background: #f6f6f6;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 30px;
    overflow: hidden;
}
.lf-optin-divider {
    height: 1px;
    background: #d1d5db;
    margin: 0;
}
.lf-optin-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    width: 100%;
}
.lf-optin-row input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--lf-primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.lf-optin-text {
    font-size: 15px;
    line-height: 1.5;
}
.lf-optin-text p {
    margin: 4px 0 0;
    color: #374151;
    font-size: 14px;
    font-weight: 400;
}
.lf-badge {
    display: inline-block;
    background: var(--lf-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}
.lf-optional {
    display: inline-block;
    background: #ddd;
    color: #374151;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}


/* ── Alle klickbaren Elemente / Buttons: Custom-Font wenn gesetzt ─────────── */
/* h1-h3, Submit-Button, Widerruf-Button, Badges */
.lf-btn,
.lf-btn-revoke,
button.lf-btn,
.leadflow-page button {
    font-family: var(--lf-font-head);
}


/* ── Submit-Button ───────────────────────────────────────────────────────── */
.lf-btn {
    display: block;
    width: 100%;
    background: var(--lf-color-button);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
    transition: filter .15s;
}
.lf-btn:hover {
    background: var(--lf-color-button);
    filter: brightness(1.18);
    color: #fff;
}


/* ── Widerruf-Button ─────────────────────────────────────────────────────── */
.lf-btn-revoke {
    background: #fff;
    border: 1.5px solid #d1d5db;
    color: #374151;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}
.lf-btn-revoke:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}


/* ── Teilnehmer-Übersicht ────────────────────────────────────────────────── */
.lf-page-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    font-family: var(--lf-font-head);
}
.lf-order-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 10px;
}
.lf-order-card--revoked { opacity: .5; }
.lf-order-info { flex: 1; }
.lf-revoked-label { font-size: 12px; color: var(--lf-color-inactive); }


/* ── Bestätigungsseite ─────────────────────────────────────────────────────────── */

p.lead {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
}
p.muted {
    text-align: center;
    font-weight: 400;
    color: var(--lf-color-inactive);
    font-size: 13px;
}

.lf-success-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 40px 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    text-align: center;
    width: 100%;
}
.lf-success-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.lf-success-box .lf-success-icon,
.lf-success-box .lf-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    font-size: 40px;
    font-weight: 400;
    font-style: normal;
    font-family: dashicons !important;
    line-height: 1;
    text-decoration: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.lf-success-box .lf-success-icon {
    background: var(--lf-color-success);
}

.lf-success-box .lf-success-title {
    color: var(--lf-color-success);
    font-family: var(--lf-font-head);
    font-weight: 700;
    margin: 0; }
.lf-success-box-alert .lf-success-title {
    color: var(--lf-color-alert);
}


/* ── Bestätigungsseite -- Opt-out -- */
.lf-success-box-optout .lf-success-title {
    font-size: 30px;
}
/* Danger-Button (rot ausgefüllt, heller Hover) */
.lf-success-box-optout .lf-btn--danger {
    background: #b91c1c;
}
.lf-success-box-optout .lf-btn--danger:hover {
    background: #b91c1c;
    filter: brightness(1.15);
}


/* ── Fehlerbox ───────────────────────────────────────────────────────────── */
.lf-error-box {
    background: #fef2f2;
    border-radius: 12px;
    padding: 36px 28px;
    margin-bottom: 16px;
    text-align: center;
}
.lf-error-icon { font-size: 48px; }
.lf-error-box h1 { font-family: var(--lf-font-head); font-weight: 700; margin: 8px 0; }


/* ── Footer-Text ─────────────────────────────────────────────────────────── */
.lf-footer-text {
    text-align: center;
    font-size: 11px;
    color: var(--lf-color-inactive);
    margin-top: 14px;
}
.lf-footer-text a { color: var(--lf-color-inactive); }
