/* RE FAQ Popup
 * Aggressive resets + !important on theme-targeted props (font-size, color, background)
 * because respectenergy.de theme overrides h2/a/button heavily.
 */

.re-faq-popup,
.re-faq-popup *,
.re-faq-popup *::before,
.re-faq-popup *::after {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.re-faq-popup {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 2147483000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.re-faq-popup.is-open {
    display: flex !important;
}

.re-faq-popup__overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(8, 36, 22, 0.55) !important;
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.re-faq-popup__dialog {
    position: relative !important;
    width: 100% !important;
    max-width: 1100px !important;
    max-height: calc(100vh - 40px) !important;
    background: #005537 !important;
    color: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45) !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
}

.re-faq-popup__close {
    position: absolute !important;
    top: 12px !important;
    right: 16px !important;
    z-index: 2 !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 50% !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: background 0.15s ease;
}

.re-faq-popup__close:hover,
.re-faq-popup__close:focus {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    outline: none !important;
}

.re-faq-popup__grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.re-faq-popup__content {
    padding: 40px 44px !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 40px) !important;
    background: transparent !important;
}

.re-faq-popup__logo {
    display: block !important;
    width: 200px !important;
    height: 64px !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    border: 0 !important;
    background-color: transparent !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: contain !important;
    overflow: visible !important;
    box-shadow: none !important;
}

html body .re-faq-popup .re-faq-popup__intro,
html body .re-faq-popup p.re-faq-popup__intro {
    color: #95fe00 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    border: 0 !important;
    background: transparent !important;
    text-shadow: none !important;
}

.re-faq-popup__content p {
    color: #d6e3d8 !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    text-align: left !important;
    background: transparent !important;
}

.re-faq-popup__actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    align-items: end !important;
    gap: 24px !important;
    margin: 24px 0 0 !important;
    padding: 0 !important;
}

.re-faq-popup__action {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
}

.re-faq-popup__action p {
    margin: 0 0 8px !important;
    color: #d6e3d8 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    flex: 0 0 auto !important;
}

.re-faq-popup__action .re-faq-popup__btn {
    margin-top: auto !important;
}

.re-faq-popup__btn,
a.re-faq-popup__btn,
.re-faq-popup .re-faq-popup__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 12px 18px !important;
    background: #96ff00 !important;
    background-image: none !important;
    color: #005537 !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.05s ease;
}

.re-faq-popup__btn:hover,
.re-faq-popup__btn:focus,
a.re-faq-popup__btn:hover,
a.re-faq-popup__btn:focus {
    background: #aaff33 !important;
    color: #005537 !important;
    text-decoration: none !important;
    outline: none !important;
}

.re-faq-popup__btn:active {
    transform: translateY(1px);
}

.re-faq-popup__media {
    background-color: #005537 !important;
    background-size: contain !important;
    background-position: top right !important;
    background-repeat: no-repeat !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Tablet — single column, photo on top */
@media (max-width: 860px) {
    html body .re-faq-popup__grid {
        grid-template-columns: 1fr !important;
    }

    html body .re-faq-popup__media {
        order: -1 !important;
        min-height: 260px !important;
        background-size: contain !important;
        background-position: top right !important;
    }

    html body .re-faq-popup__content {
        padding: 28px 28px !important;
        max-height: none !important;
    }

    html body .re-faq-popup__actions {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }

    html body .re-faq-popup .re-faq-popup__intro,
    html body .re-faq-popup p.re-faq-popup__intro {
        font-size: 15px !important;
        line-height: 1.5 !important;
    }

    html body .re-faq-popup__content p {
        font-size: 13px !important;
    }
}

/* Mobile — full screen, stacked actions */
@media (max-width: 600px) {
    html body .re-faq-popup {
        padding: 0 !important;
    }

    html body .re-faq-popup__dialog {
        max-height: 100vh !important;
        height: 100vh !important;
        border-radius: 0 !important;
    }

    html body .re-faq-popup__content {
        padding: 24px 20px !important;
    }

    html body .re-faq-popup__media {
        min-height: 200px !important;
    }

    html body .re-faq-popup__logo {
        width: 170px !important;
        height: 56px !important;
        margin-bottom: 20px !important;
    }

    html body .re-faq-popup__actions {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    html body .re-faq-popup__action {
        height: auto !important;
    }

    html body .re-faq-popup .re-faq-popup__intro,
    html body .re-faq-popup p.re-faq-popup__intro {
        font-size: 14.5px !important;
        line-height: 1.45 !important;
        margin-bottom: 14px !important;
    }

    html body .re-faq-popup__content p {
        font-size: 12.5px !important;
        line-height: 1.55 !important;
        margin-bottom: 12px !important;
    }

    html body .re-faq-popup__close {
        top: 8px !important;
        right: 10px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 24px !important;
    }
}

/* Small phones */
@media (max-width: 380px) {
    html body .re-faq-popup__content {
        padding: 20px 16px !important;
    }

    html body .re-faq-popup__media {
        min-height: 160px !important;
    }

    html body .re-faq-popup__logo {
        width: 150px !important;
        height: 50px !important;
    }
}

/* Short viewports — keep popup scrollable, prevent dialog clipping */
@media (max-height: 700px) and (min-width: 861px) {
    html body .re-faq-popup__content {
        padding: 28px 36px !important;
    }

    html body .re-faq-popup .re-faq-popup__intro,
    html body .re-faq-popup p.re-faq-popup__intro {
        font-size: 15px !important;
        margin-bottom: 14px !important;
    }

    html body .re-faq-popup__content p {
        font-size: 13px !important;
        margin-bottom: 10px !important;
    }
}

body.re-faq-popup-open {
    overflow: hidden !important;
}
