/* LohiBW Newsletter – Frontend Styles */

/* Farben und Maße lassen sich je Formular über diese Variablen anpassen. */
.lbn-form-wrapper {
    --lbn-accent: #1a1a1a;
    --lbn-accent-hover: #000;
    --lbn-accent-text: #fff;
    --lbn-border: #ccc;
    --lbn-radius: 0;
    --lbn-consent-size: 12px;
    width: 100%;
}

.lbn-form {
    width: 100%;
    margin: 0;
}

/* ── Feld und Button ─────────────────────────────────────────────────────── */
.lbn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.lbn-form .lbn-input {
    flex: 1 1 220px;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--lbn-border);
    border-radius: var(--lbn-radius);
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.lbn-form .lbn-input:focus {
    outline: none;
    border-color: var(--lbn-accent);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .12);
}

.lbn-form .lbn-input[aria-invalid="true"] {
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, .15);
}

.lbn-form .lbn-submit-btn {
    flex: 0 0 auto;
    display: inline-block;
    margin: 0;
    padding: 12px 28px;
    border: none;
    border-radius: var(--lbn-radius);
    background: var(--lbn-accent);
    color: var(--lbn-accent-text);
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background .15s;
    -webkit-appearance: none;
    appearance: none;
}

.lbn-form .lbn-submit-btn:hover {
    background: var(--lbn-accent-hover);
}

.lbn-form .lbn-submit-btn:focus-visible {
    outline: 3px solid rgba(0, 0, 0, .35);
    outline-offset: 2px;
}

.lbn-form .lbn-submit-btn:disabled {
    opacity: .6;
    cursor: wait;
}

/* Untereinander statt nebeneinander */
.lbn-layout-stacked .lbn-row {
    flex-direction: column;
}

.lbn-layout-stacked .lbn-input {
    flex: 0 0 auto;
    width: 100%;
}

.lbn-layout-stacked .lbn-submit-btn {
    align-self: flex-start;
}

@media (max-width: 480px) {
    .lbn-row {
        flex-direction: column;
    }

    .lbn-form .lbn-input {
        flex: 0 0 auto;
        width: 100%;
    }

    .lbn-form .lbn-submit-btn {
        width: 100%;
    }
}

/* ── Einwilligung ────────────────────────────────────────────────────────── */
.lbn-consent {
    margin-top: 10px;
    font-size: var(--lbn-consent-size);
    line-height: 1.5;
}

.lbn-consent a {
    text-decoration: underline;
}

.lbn-consent-label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    cursor: pointer;
}

.lbn-consent-check {
    flex: 0 0 auto;
    margin: 2px 0 0;
}

/* ── Meldungen ───────────────────────────────────────────────────────────── */
.lbn-messages:empty {
    display: none;
}

.lbn-messages {
    margin-top: 14px;
    padding: 14px 18px;
    border-radius: var(--lbn-radius);
    font-size: 15px;
    line-height: 1.5;
}

.lbn-messages.lbn-success {
    background: #edfaf0;
    border-left: 4px solid #2e7d32;
    color: #1b5e20;
    font-weight: 600;
}

.lbn-messages.lbn-error {
    background: #fef0f0;
    border-left: 4px solid #c62828;
    color: #b71c1c;
}

/* Nach erfolgreicher Anmeldung bleibt nur die Meldung stehen. */
.lbn-form.lbn-done .lbn-row,
.lbn-form.lbn-done .lbn-consent {
    display: none;
}

.lbn-form.lbn-done .lbn-messages {
    margin-top: 0;
}

.lbn-noscript {
    margin: 10px 0 0;
    font-size: 13px;
}

.lbn-admin-hint {
    padding: 10px 14px;
    border-left: 4px solid #dba617;
    background: #fcf9e8;
    color: #1d2327;
    font-size: 14px;
}

/* ── Hilfsklassen ────────────────────────────────────────────────────────── */
.lbn-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lbn-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}
