/* =========================================================
   renewetzel.de – Schlanke Newsletter-Box in Blogartikeln
   Design nach Vorgabe & Designreferenz
   ========================================================= */

/* --- 1. HAUPT-CONTAINER (KARTE) --- */
.themenwelt-newsletter-box {
    background: #ffffff;
    border: 1.5px solid #dbeafe; /* Zartes Hellblau */
    border-radius: 1.25rem;
    padding: clamp(1.5rem, 3.5vw, 2.25rem);
    margin: 2.75rem auto;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 20px -2px rgba(30, 72, 250, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    text-align: left;
    clear: both;
}

/* Sicherstellen, dass keine Blog-Initialen (Drop-Cap) in der Box greifen */
.themenwelt-newsletter-box p:first-of-type::first-letter,
.themenwelt-newsletter-box p::first-letter {
    float: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    padding: 0 !important;
    font-weight: inherit !important;
    color: inherit !important;
}

/* --- 2. KOPFZEILE MIT ICON & TEXT --- */
.themenwelt-newsletter-box__header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.themenwelt-newsletter-box__icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    background-color: #eff6ff; /* Sanftes Pastellblau */
    color: var(--rw-color-ocean, #1E48FA);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.themenwelt-newsletter-box__icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.themenwelt-newsletter-box__header-text {
    flex: 1;
}

.themenwelt-newsletter-box__title {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: clamp(1.2rem, 2.5vw, 1.4rem) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: var(--rw-color-ocean, #1E48FA) !important;
    margin: 0 0 0.35rem 0 !important;
    padding: 0 !important;
    border: none !important;
}

.themenwelt-newsletter-box__subtitle {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: #475569 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- 3. ACYMAILING-FORMULAR LAYOUT --- */
.themenwelt-newsletter-box .acym_module {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.themenwelt-newsletter-box .acym_module_form,
.themenwelt-newsletter-box .acym_form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

.themenwelt-newsletter-box .onefield {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* E-Mail-Eingabefeld */
.themenwelt-newsletter-box input.acym__user__edit__email {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.975rem !important;
    padding: 0.8rem 1.25rem !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 9999px !important;
    background-color: #ffffff !important;
    color: var(--body-color, #0f172a) !important;
    box-sizing: border-box !important;
    text-align: left !important;
    transition: all 0.2s ease !important;
}

.themenwelt-newsletter-box input.acym__user__edit__email::placeholder {
    color: #94a3b8;
}

.themenwelt-newsletter-box input.acym__user__edit__email:focus {
    border-color: var(--rw-color-ocean, #1E48FA) !important;
    box-shadow: 0 0 0 3.5px rgba(30, 72, 250, 0.16) !important;
    outline: none !important;
}

/* Datenschutz-Checkbox (OBERHALB des Buttons) */
.themenwelt-newsletter-box .fieldacyterms {
    font-size: 0.875rem !important;
    color: #64748b !important;
    line-height: 1.45 !important;
    padding: 0.2rem 0.25rem !important;
    margin: 0 !important;
}

.themenwelt-newsletter-box .fieldacyterms label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    user-select: none !important;
    margin: 0 !important;
}

.themenwelt-newsletter-box .fieldacyterms input[type="checkbox"] {
    margin-top: 0.2rem !important;
    width: 1.15rem !important;
    height: 1.15rem !important;
    accent-color: var(--rw-color-ocean, #1E48FA) !important;
    border-radius: 0.25rem !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
}

.themenwelt-newsletter-box .fieldacyterms a {
    color: var(--rw-color-ocean, #1E48FA) !important;
    text-decoration: underline !important;
    font-weight: 500 !important;
    transition: color 0.15s ease !important;
}

.themenwelt-newsletter-box .fieldacyterms a:hover {
    color: #1538d4 !important;
}

/* Sende-Button Bereich */
.themenwelt-newsletter-box .acysubbuttons {
    margin: 0.25rem 0 0 0 !important;
    width: 100% !important;
}

/* Standardzustand des Buttons: Grau & Inaktiv */
.themenwelt-newsletter-box .subbutton {
    width: 100% !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #94a3b8 !important;
    font-size: 0.975rem !important;
    font-weight: 600 !important;
    padding: 0.85rem 1.5rem !important;
    border-radius: 9999px !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    cursor: not-allowed !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Briefumschlag-Icon im Button */
.themenwelt-newsletter-box .subbutton::before {
    content: "" !important;
    display: inline-block !important;
    width: 1.15em !important;
    height: 1.15em !important;
    background-color: currentColor !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E") no-repeat center / contain !important;
    flex-shrink: 0 !important;
}

/* AKTIVER ZUSTAND: Wenn Checkbox angehakt ist (Pure CSS via :has + JS Fallback-Klasse) */
.themenwelt-newsletter-box form:has(input[name="terms"]:checked) .subbutton,
.themenwelt-newsletter-box .themenwelt-newsletter-box__form:has(input[name="terms"]:checked) .subbutton,
.themenwelt-newsletter-box .subbutton.is-active {
    background-color: var(--rw-color-ocean, #1E48FA) !important;
    border-color: var(--rw-color-ocean, #1E48FA) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(30, 72, 250, 0.35) !important;
    cursor: pointer !important;
}

.themenwelt-newsletter-box form:has(input[name="terms"]:checked) .subbutton:hover,
.themenwelt-newsletter-box .themenwelt-newsletter-box__form:has(input[name="terms"]:checked) .subbutton:hover,
.themenwelt-newsletter-box .subbutton.is-active:hover {
    background-color: #1538d4 !important;
    border-color: #1538d4 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(30, 72, 250, 0.45) !important;
}

/* Validierungshinweise */
.themenwelt-newsletter-box .acym__field__error__block {
    font-size: 0.825rem !important;
    color: #dc2626 !important;
    margin-top: 0.35rem !important;
    text-align: left !important;
}

/* --- 4. RESPONSIVE FEINJUSTIERUNG --- */
@media (max-width: 576px) {
    .themenwelt-newsletter-box {
        padding: 1.25rem 1rem;
        margin: 2rem auto;
        border-radius: 1rem;
    }

    .themenwelt-newsletter-box__header {
        gap: 0.75rem;
    }

    .themenwelt-newsletter-box__icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .themenwelt-newsletter-box__icon svg {
        width: 20px;
        height: 20px;
    }
}
