/* === plugged Newsletter Signup === */
.plugged-nl-signup {
    --nl-accent: #3b9eff;
    --nl-bg: var(--bg2, #f6f7f9);
    --nl-border: var(--border, #e1e3e6);
    --nl-text: var(--text, #1d2327);
    --nl-text-muted: var(--text-muted, #5d6470);

    background: var(--nl-bg);
    border: 1px solid var(--nl-border);
    border-left: 4px solid var(--nl-accent);
    border-radius: 8px;
    padding: 20px 24px 18px;
    margin: 20px 0;
    color: var(--nl-text);
}

.plugged-nl-signup-head {
    margin-bottom: 14px;
}

.plugged-nl-signup-logo {
    display: block;
    max-height: 36px;
    max-width: 160px;
    width: auto;
    height: auto;
    margin: 0 0 10px;
    object-fit: contain;
}

.plugged-nl-signup-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--nl-accent);
    margin-bottom: 4px;
}

.plugged-nl-signup-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
}

.plugged-nl-signup-lead {
    color: var(--nl-text-muted);
    font-size: 0.92rem;
    margin: 0 0 12px;
    line-height: 1.45;
}

/* Bullets als Value-Props — mit Akzent-Häkchen */
.plugged-nl-signup-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--nl-text);
}

.plugged-nl-signup-bullets li {
    position: relative;
    padding: 4px 0 4px 24px;
}

.plugged-nl-signup-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 14px;
    height: 14px;
    background: var(--nl-accent);
    border-radius: 50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 8.5l3 3 6-6'/></svg>");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Trust-Line: dezent, klein, monospace-feel */
.plugged-nl-trust {
    margin-top: 10px;
    font-size: 0.72rem;
    color: var(--nl-text-muted);
    letter-spacing: 0.3px;
    text-align: center;
    opacity: 0.85;
}

.plugged-nl-signup-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.plugged-nl-signup-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--nl-border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    color: var(--nl-text);
    line-height: 1.4;
    font-family: inherit;
}

.plugged-nl-signup-input:focus {
    outline: none;
    border-color: var(--nl-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nl-accent) 25%, transparent);
}

/* Honeypot — visuell weg, aber Bots füllen es */
.plugged-nl-honey {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}

.plugged-nl-signup-button {
    flex: 0 0 auto;
    background: var(--nl-accent);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    font-family: inherit;
    transition: filter 150ms ease, opacity 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.plugged-nl-signup-button:hover {
    filter: brightness(0.92);
}

.plugged-nl-signup-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.plugged-nl-button-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: plugged-nl-spin 0.7s linear infinite;
}

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

.plugged-nl-signup-form[data-state="sending"] .plugged-nl-button-label { display: none; }
.plugged-nl-signup-form[data-state="sending"] .plugged-nl-button-spinner { display: inline-block; }
.plugged-nl-signup-form[data-state="success"] .plugged-nl-signup-row,
.plugged-nl-signup-form[data-state="success"] .plugged-nl-consent { display: none; }

.plugged-nl-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--nl-text-muted);
    line-height: 1.45;
    margin: 0;
    cursor: pointer;
}

.plugged-nl-consent input[type="checkbox"] {
    margin-top: 3px;
    flex: 0 0 auto;
    accent-color: var(--nl-accent);
}

.plugged-nl-consent a {
    color: var(--nl-accent);
    text-decoration: underline;
}

.plugged-nl-signup-feedback {
    font-size: 0.88rem;
    margin-top: 10px;
    line-height: 1.45;
    min-height: 0;
}

.plugged-nl-signup-feedback.is-success {
    color: #00853c;
    font-weight: 500;
}

.plugged-nl-signup-feedback.is-error {
    color: #c00;
}

/* === Bestätigungs-/Abmelde-Page Styles === */
.plugged-nl-status {
    --nl-accent: #3b9eff;
    border-radius: 8px;
    padding: 22px 26px;
    margin: 24px auto;
    max-width: 560px;
    line-height: 1.55;
}

.plugged-nl-status-success {
    background: color-mix(in srgb, var(--nl-accent) 6%, transparent);
    border: 1px solid var(--nl-accent);
    color: #1d2327;
}

.plugged-nl-status-warn {
    background: #fef8ee;
    border: 1px solid #dba617;
    color: #6f5012;
}

.plugged-nl-status-error {
    background: #fcf0f1;
    border: 1px solid #d63638;
    color: #8a1f21;
}

/* Dark Mode */
[data-theme="dark"] .plugged-nl-signup {
    --nl-bg: rgba(255,255,255,0.03);
}
[data-theme="dark"] .plugged-nl-signup-input {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

@media (max-width: 600px) {
    .plugged-nl-signup-row { flex-direction: column; }
    .plugged-nl-signup-input,
    .plugged-nl-signup-button { width: 100%; }
}

/* === Popup === */
.plugged-nl-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999; /* unter wp-admin-bar (99999), über fast allem anderen */
    max-width: 380px;
    width: calc(100% - 32px);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 280ms ease, transform 280ms ease;
    pointer-events: none;
}

.plugged-nl-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.plugged-nl-popup-card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 22px 22px 18px;
    border: 1px solid var(--border, #e1e3e6);
    border-top: 4px solid var(--nl-accent, #3b9eff);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.06);
    color: #1d2327;
    font-size: 0.92rem;
    line-height: 1.5;
}

.plugged-nl-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #8c8f94;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, color 150ms ease;
}

.plugged-nl-popup-close:hover {
    background: #f3f4f6;
    color: #1d2327;
}

.plugged-nl-popup-head {
    margin-bottom: 12px;
    padding-right: 24px; /* Platz für den X-Button */
}

.plugged-nl-popup-logo {
    display: block;
    max-height: 32px;
    max-width: 140px;
    width: auto;
    height: auto;
    margin: 0 0 10px;
    object-fit: contain;
}

.plugged-nl-popup-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
    color: #1d2327;
}

.plugged-nl-popup-lead {
    font-size: 0.85rem;
    color: #5d6470;
    margin: 0 0 12px;
    line-height: 1.45;
}

/* Im Popup nutzen wir die Standard-Form-Styles, aber kompakter */
.plugged-nl-popup-bullets {
    font-size: 0.82rem;
    margin-bottom: 12px;
}
.plugged-nl-popup-bullets li {
    padding: 3px 0 3px 22px;
}
.plugged-nl-popup-bullets li::before {
    width: 12px;
    height: 12px;
    top: 7px;
    background-size: 10px 10px;
}

.plugged-nl-popup .plugged-nl-signup-row {
    margin-bottom: 8px;
}
.plugged-nl-popup .plugged-nl-signup-input {
    padding: 9px 12px;
    font-size: 0.9rem;
}
.plugged-nl-popup .plugged-nl-signup-button {
    padding: 9px 18px;
    font-size: 0.88rem;
    background: var(--nl-accent, #3b9eff);
}
.plugged-nl-popup .plugged-nl-consent {
    font-size: 0.72rem;
}
.plugged-nl-popup .plugged-nl-consent a {
    color: var(--nl-accent, #3b9eff);
}
.plugged-nl-popup .plugged-nl-signup-input:focus {
    border-color: var(--nl-accent, #3b9eff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nl-accent, #3b9eff) 25%, transparent);
}

/* Mobile: am unteren Rand verankert, volle Breite */
@media (max-width: 600px) {
    .plugged-nl-popup {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
    }
    .plugged-nl-popup-card {
        padding: 18px 18px 14px;
    }
    .plugged-nl-popup-title {
        font-size: 1rem;
    }
}

/* Dark Mode */
[data-theme="dark"] .plugged-nl-popup-card {
    background: #1d2327;
    color: #f6f7f9;
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .plugged-nl-popup-title,
[data-theme="dark"] .plugged-nl-popup-lead {
    color: inherit;
}
[data-theme="dark"] .plugged-nl-popup-close {
    color: #c3c4c7;
}
[data-theme="dark"] .plugged-nl-popup-close:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
[data-theme="dark"] .plugged-nl-popup .plugged-nl-signup-input {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.15);
}

/* Reduced motion respektieren */
@media (prefers-reduced-motion: reduce) {
    .plugged-nl-popup {
        transition: opacity 50ms linear;
        transform: none;
    }
}
