/* Download After Email – EMS-Styling (Bootstrap 5.3)
   ":not(#dae)" gibt jedem Selektor ID-Gewicht (1-0-0), ohne dass eine ID im Markup nötig ist.
   Zusätzlich überall !important. */

.dae-shortcode-download-wrapper-wide {
    all: unset !important;
}

/* Raster: links Kicker + Titel, rechts Button, darunter Aufklappbereich */
.dae-shortcode-download-content-wrapper:not(#dae) {
    --dae-accent: var(--bs-primary) !important;
    --dae-accent-rgb: var(--bs-primary-rgb) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "kicker button" "title button" "register register" !important;
    align-items: center !important;
    column-gap: 1.5rem !important;
    row-gap: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1.75rem 2rem !important;
    background: var(--bs-body-bg) !important;
    border: var(--bs-border-width) solid var(--bs-border-color-translucent) !important;
    border-radius: var(--bs-border-radius) !important;
    font-family: var(--bs-body-font-family) !important;
    color: var(--bs-body-color) !important;
    text-align: left !important;
}

/* Kicker „Zertifikat · PDF“ (aus dem Beschreibungsfeld) */
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-text {
    grid-area: kicker !important;
    align-self: end !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: .875rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    color: var(--dae-accent) !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-text br {
    display: none !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-text div,
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-text p {
    margin: 0 !important;
    padding: 0 !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-title {
    grid-area: title !important;
    align-self: start !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: var(--bs-emphasis-color) !important;
    text-wrap: pretty !important;
}

/* Download-Button (Toggle) */
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-button {
    grid-area: button !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: .5rem !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 1.25rem !important;
    background: var(--bs-primary) !important;
    border: none !important;
    border-radius: var(--bs-border-radius) !important;
    color: #fff !important;
    font-size: .9375rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background-color .2s, color .2s !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-button:hover,
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-button.dae-open {
    background: var(--bs-secondary) !important;
    color: #fff !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-button-icon,
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-button-text {
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: inherit !important;
}

/* Aufklappbereich – display wird vom Plugin gesetzt */
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-wrapper {
    grid-area: register !important;
    margin: 1.5rem -2rem -1.75rem !important;
    padding: 1.75rem 2rem 2rem !important;
    background: var(--bs-tertiary-bg) !important;
    border-top: var(--bs-border-width) solid var(--bs-border-color) !important;
    border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius) !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-wrapper p {
    margin: 0.5rem 0 !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-label {
    margin: 0 0 1rem !important;
    font-size: .9375rem !important;
    font-weight: 700 !important;
    color: var(--bs-emphasis-color) !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    margin: 0 !important;
}

/* E-Mail-Feld */
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-field-wrap {
    display: flex !important;
    align-items: center !important;
    gap: .75rem !important;
    height: 50px !important;
    padding: 0 1rem !important;
    background: var(--bs-body-bg) !important;
    border: var(--bs-border-width) solid #272727 !important;
    border-radius: var(--bs-border-radius) !important;
    transition: border-color .15s !important;
    margin: 0 !important;
    max-width: 400px;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-field-wrap:focus-within {
    border-color: var(--dae-accent) !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-icon {
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    color: var(--bs-secondary-color) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-input-wrap {
    flex: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

.dae-shortcode-download-wrapper .dae-shortcode-register-checkbox-text {
    max-width: 100% !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) input.dae-shortcode-register-field {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    font: 400 .9375rem/1.5 var(--bs-body-font-family) !important;
    color: var(--bs-body-color) !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) input.dae-shortcode-register-field::placeholder {
    color: var(--bs-secondary-color) !important;
    opacity: 1 !important;
}

/* Checkbox */
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-form p:has(.dae-shortcode-register-checkbox) {
    display: flex !important;
    align-items: flex-start !important;
    gap: .75rem !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) input.dae-shortcode-register-checkbox {
    flex: none !important;
    width: 1.125rem !important;
    height: 1.125rem !important;
    margin: .15rem 0 0 !important;
    accent-color: var(--dae-accent) !important;
    cursor: pointer !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-checkbox-text {
    font-size: .875rem !important;
    line-height: 1.5 !important;
    color: var(--bs-body-color) !important;
}

/* Absenden */
.dae-shortcode-download-content-wrapper:not(#dae) input.dae-shortcode-register-submit {
    display: inline-flex !important;
    align-items: center !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 1.375rem !important;
    background: var(--dae-accent) !important;
    border: 0 !important;
    border-radius: var(--bs-border-radius) !important;
    color: #fff !important;
    font: 700 .9375rem/1 var(--bs-body-font-family) !important;
    cursor: pointer !important;
    transition: filter .15s !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) input.dae-shortcode-register-submit:focus-visible,
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-button:focus-visible {
    outline: 2px solid var(--dae-accent) !important;
    outline-offset: 2px !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-form:has(.dae-shortcode-register-checkbox:not(:checked)) .dae-shortcode-register-submit,
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-form:has(.dae-shortcode-register-field:invalid) .dae-shortcode-register-submit,
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-form:has(.dae-shortcode-register-field:placeholder-shown) .dae-shortcode-register-submit {
    opacity: .45 !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-loading {
    color: var(--dae-accent) !important;
    font-size: 1.25rem !important;
}

/* Erfolgsmeldung */
.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-message {
    margin: 0 !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-success {
    display: flex !important;
    align-items: center !important;
    gap: .875rem !important;
    margin-top: 1.25rem !important;
    font-size: .9375rem !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    color: var(--bs-emphasis-color) !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-success::before {
    content: "\f00c" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    flex: none !important;
    display: grid !important;
    place-items: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: var(--bs-success) !important;
    color: #fff !important;
    font-size: 1rem !important;
}

.dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-success:empty {
    display: none !important;
}

/* Mobil: Button unter den Titel */
@media (max-width: 575.98px) {
    .dae-shortcode-download-content-wrapper:not(#dae) {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas: "kicker" "title" "button" "register" !important;
        padding: 1.5rem !important;
    }

    .dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-download-button {
        justify-self: start !important;
        margin-top: 1rem !important;
    }

    .dae-shortcode-download-content-wrapper:not(#dae) .dae-shortcode-register-wrapper {
        margin: 1.5rem -1.5rem -1.5rem !important;
        padding: 1.5rem !important;
    }
}

.dae-shortcode-download-wrapper .dae-shortcode-register-message {
    max-width: 100% !important;
}