/* ============================================================
   DOSIGNY - Lead Popup (Website-Check)
   Slide-In Desktop unten rechts / Bottom-Sheet Mobile
   ============================================================ */

.lead-popup {
    position: fixed;
    z-index: 9998;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: linear-gradient(180deg, rgba(20, 14, 35, 0.98) 0%, rgba(12, 8, 22, 0.98) 100%);
    border: 1px solid rgba(69, 191, 166, 0.25);
    border-radius: 18px;
    box-shadow:
        0 24px 60px -10px rgba(0, 0, 0, 0.6),
        0 8px 24px -8px rgba(69, 191, 166, 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
    padding: 28px 24px 24px;
    color: #f4f1e8;
    font-family: 'Raleway', system-ui, -apple-system, sans-serif;

    /* Hidden state: nach unten rausgeschoben, transparent */
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);

    /* Backdrop-Blur für glasmorphismus */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

/* Akzent-Glow oben */
.lead-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(69, 191, 166, 0.6), transparent);
    pointer-events: none;
}

/* Close-Button */
.lead-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #f4f1e8;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
    padding: 0;
}
.lead-popup__close:hover,
.lead-popup__close:focus-visible {
    background: rgba(69, 191, 166, 0.15);
    border-color: rgba(69, 191, 166, 0.4);
    transform: scale(1.05);
    outline: none;
}

/* Header */
.lead-popup__head {
    margin-bottom: 18px;
    padding-right: 32px;
}

.lead-popup__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: linear-gradient(135deg, rgba(69, 191, 166, 0.18), rgba(69, 191, 166, 0.08));
    border: 1px solid rgba(69, 191, 166, 0.35);
    border-radius: 999px;
    color: #45bfa6;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 14px;
}

.lead-popup__title {
    margin: 0 0 8px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.lead-popup__lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(244, 241, 232, 0.78);
}
.lead-popup__lead strong {
    color: #f4f1e8;
    font-weight: 600;
}

/* Form */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lead-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lead-form__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lead-form__label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(244, 241, 232, 0.7);
    letter-spacing: 0.2px;
}
.lead-form__hint {
    color: rgba(244, 241, 232, 0.45);
    font-weight: 400;
}

.lead-form__input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #f4f1e8;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.lead-form__input::placeholder {
    color: rgba(244, 241, 232, 0.35);
}
.lead-form__input:focus {
    outline: none;
    border-color: #45bfa6;
    background: rgba(69, 191, 166, 0.06);
    box-shadow: 0 0 0 3px rgba(69, 191, 166, 0.12);
}

/* Consent */
.lead-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 11.5px;
    line-height: 1.5;
    color: rgba(244, 241, 232, 0.65);
    margin: 4px 0 2px;
    cursor: pointer;
}
.lead-form__consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: #45bfa6;
    cursor: pointer;
}
.lead-form__consent a {
    color: #45bfa6;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lead-form__consent a:hover {
    color: #5cd1b8;
}

/* Submit-Button — Brand-Teal, voll-opaker Text (Button-Contrast-Rule) */
.lead-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #45bfa6;
    border: none;
    border-radius: 10px;
    color: #0c0816;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 4px;
}
.lead-form__submit:hover:not(:disabled) {
    background: #5cd1b8;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -6px rgba(69, 191, 166, 0.5);
}
.lead-form__submit:active:not(:disabled) {
    transform: translateY(0);
}
.lead-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.lead-form__submit svg {
    transition: transform 0.2s;
}
.lead-form__submit:hover:not(:disabled) svg {
    transform: translateX(3px);
}

/* Trust-Zeile */
.lead-form__trust {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(244, 241, 232, 0.5);
}
.lead-form__trust svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #45bfa6;
}

/* Status-Messages */
.lead-form__status {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.45;
    min-height: 0;
}
.lead-form__status--error {
    color: #ff8a7a;
}
.lead-form__status--info {
    color: rgba(244, 241, 232, 0.75);
}

/* Success State */
.lead-popup__success {
    text-align: center;
    padding: 12px 4px 4px;
}
.lead-popup__success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    background: rgba(69, 191, 166, 0.12);
    border: 1px solid rgba(69, 191, 166, 0.35);
    border-radius: 50%;
    color: #45bfa6;
}
.lead-popup__success-title {
    margin: 0 0 8px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}
.lead-popup__success-text {
    margin: 0 0 20px;
    font-size: 13.5px;
    line-height: 1.55;
    color: rgba(244, 241, 232, 0.75);
}
.lead-popup__success-text a {
    color: #45bfa6;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lead-popup__success-close {
    padding: 9px 22px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #f4f1e8;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.lead-popup__success-close:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(69, 191, 166, 0.5);
}

/* ============================================================
   Mobile: Bottom-Sheet
   ============================================================ */
@media (max-width: 640px) {
    .lead-popup {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 22px 22px 0 0;
        padding: 22px 20px 20px;
        border-left: none;
        border-right: none;
        border-bottom: none;

        /* Bottom-Sheet Slide-Animation */
        transform: translateY(100%);
    }
    .lead-popup.is-visible {
        transform: translateY(0);
    }

    /* Drag-Handle visuell andeuten */
    .lead-popup::after {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 38px;
        height: 4px;
        background: rgba(255, 255, 255, 0.18);
        border-radius: 999px;
    }
    .lead-popup__close {
        top: 16px;
        right: 16px;
    }
    .lead-popup__head {
        margin-top: 6px;
    }
    .lead-popup__title {
        font-size: 20px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .lead-popup {
        transition: opacity 0.2s ease;
        transform: none !important;
    }
}
