/*
 * FIL CleverReach Newsletter – Fildorado Frontend
 * Version 1.0.1
 *
 * Die Selektoren sind bewusst auf .filcr-wrap begrenzt, damit Elementor/
 * Hello Theme und andere Formulare auf der Seite nicht beeinflusst werden.
 */

.filcr-wrap {
    --filcr-card: #22a5dc;
    --filcr-card-text: #07151d;
    --filcr-input: #f3f3f3;
    --filcr-input-border: rgba(0, 0, 0, 0.12);
    --filcr-muted: #5a6670;
    --filcr-error: #a5261f;
    --filcr-success: #147a3d;
    --filcr-button: #003b5c;
    --filcr-button-text: #ffffff;

    width: 100%;
    max-width: 650px;
    box-sizing: border-box;
    padding: 34px 40px 22px;
    background: var(--filcr-card);
    color: var(--filcr-card-text);
    border-radius: 0 58px 0 58px;
}

.filcr-wrap,
.filcr-wrap * {
    box-sizing: border-box;
}

.filcr-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
}

.filcr-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.filcr-fieldset > legend,
.filcr-field > label,
.filcr-birthday-field > label {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    color: var(--filcr-card-text);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

.filcr-fieldset > legend {
    width: 100%;
}

/* Themenbereiche */
.filcr-topics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 11px;
}

.filcr-check,
.filcr-consent {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    padding: 0;
    color: var(--filcr-card-text);
    cursor: pointer;
}

.filcr-check {
    font-size: 15px;
    line-height: 1.35;
    white-space: nowrap;
}

.filcr-check input,
.filcr-consent input {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    margin: 3px 0 0;
    padding: 0;
    accent-color: #087fb2;
}

/* Eingabefelder */
.filcr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.filcr-field input[type="text"],
.filcr-field input[type="email"],
.filcr-birthday input {
    display: block;
    width: 100%;
    height: 38px;
    min-height: 38px;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid var(--filcr-input-border);
    border-radius: 2px;
    outline: 0;
    background: var(--filcr-input);
    color: #111;
    box-shadow: none;
    font: inherit;
    font-size: 16px;
    line-height: 1.2;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.filcr-field input[type="text"]:focus,
.filcr-field input[type="email"]:focus,
.filcr-birthday input:focus {
    border-color: #003b5c;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0, 59, 92, .16);
}

.filcr-birthday {
    display: grid;
    grid-template-columns: 48px 48px 74px;
    gap: 10px;
    justify-content: start;
}

.filcr-birthday input {
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
    appearance: textfield;
    -moz-appearance: textfield;
}

.filcr-birthday input::-webkit-inner-spin-button,
.filcr-birthday input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

/* Einwilligung */
.filcr-consent-fieldset {
    margin-top: -1px;
}

.filcr-consent {
    display: flex;
    font-size: 15px;
    line-height: 1.55;
}

.filcr-consent > span {
    flex: 1 1 auto;
    min-width: 0;
}

.filcr-consent a {
    color: #005f91;
    font-weight: 500;
    text-decoration: none;
}

.filcr-consent a:hover,
.filcr-consent a:focus-visible {
    text-decoration: underline;
}

/* Honeypot bleibt für Besucher unsichtbar */
.filcr-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Lokaler Bot-Schutz – bewusst neutral, ohne Google-Branding */
.filcr-captcha {
    display: flex;
    align-items: flex-start;
    margin-top: 13px;
}

.filcr-captcha-box {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 302px;
    max-width: 100%;
    min-height: 76px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #d6d6d6;
    border-radius: 2px;
    background: #f9f9f9;
    color: #202124;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.filcr-captcha-check {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    accent-color: #1683bb;
}

.filcr-captcha-label {
    font-size: 14px;
    line-height: 1.3;
}

.filcr-captcha-box.is-solving {
    cursor: wait;
}

.filcr-captcha-box.is-verified {
    border-color: #70b88b;
    background: #f5fbf7;
}

.filcr-captcha-box.is-error {
    border-color: #d79b96;
    background: #fff7f6;
}

.filcr-captcha-spinner {
    display: none;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 2px solid #bbb;
    border-top-color: #222;
    border-radius: 50%;
    animation: filcr-spin .7s linear infinite;
}

.filcr-captcha-box.is-solving .filcr-captcha-spinner {
    display: inline-block;
}

.filcr-captcha-state {
    margin-left: auto;
    font-size: 13px;
    line-height: 1.25;
    color: var(--filcr-muted);
}

.filcr-captcha-box.is-verified .filcr-captcha-state {
    color: var(--filcr-success);
}

.filcr-captcha-box.is-error .filcr-captcha-state {
    color: var(--filcr-error);
}

/* Button wie beim bisherigen Fildorado-Formular */
.filcr-submit {
    align-self: center;
    appearance: none;
    min-width: 152px;
    min-height: 70px;
    margin: 16px 0 0;
    padding: 15px 24px;
    border: 0;
    border-radius: 30px 30px 0 30px;
    background: var(--filcr-button);
    color: var(--filcr-button-text);
    box-shadow: none;
    font: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease, filter .15s ease;
}

.filcr-submit:hover {
    opacity: 1;
    filter: brightness(.94);
    transform: translateY(-1px);
}

.filcr-submit:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.filcr-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* Rückmeldungen */
.filcr-message {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: 14px;
    line-height: 1.45;
}

.filcr-message.is-success {
    border-color: #76b88e;
    background: #f3faf5;
    color: var(--filcr-success);
}

.filcr-message.is-error {
    border-color: #d79b96;
    background: #fff6f5;
    color: var(--filcr-error);
}

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

/* Tablet / schmalere Elementor-Spalten */
@media (max-width: 720px) {
    .filcr-wrap {
        padding: 30px 30px 22px;
        border-radius: 0 46px 0 46px;
    }

    .filcr-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* Smartphone */
@media (max-width: 480px) {
    .filcr-wrap {
        padding: 26px 20px 20px;
        border-radius: 0 38px 0 38px;
    }

    .filcr-form {
        gap: 17px;
    }

    .filcr-fieldset > legend,
    .filcr-field > label,
    .filcr-birthday-field > label {
        font-size: 16px;
    }

    .filcr-topics {
        gap: 8px 12px;
    }

    .filcr-check,
    .filcr-consent {
        font-size: 14px;
    }

    .filcr-birthday {
        grid-template-columns: 52px 52px 78px;
    }

    .filcr-captcha-box {
        width: 100%;
    }

    .filcr-submit {
        width: auto;
        min-width: 150px;
    }
}
