/*
 * RTPL Canonical Header Surface Contract.
 * Reference: approved Homepage and AWS.
 * Applies to native and legacy renderers.
 */

/* Solid Header — preserve intentional hero overlay. */
#rtpl-header:not(.rtpl-header--overlay),
#rtpl-header.rtpl-header--overlay.is-scrolled {
    background: #F7F9FA !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Utility and navigation rows share one surface. */
#rtpl-header .rtpl-utility,
#rtpl-header .rtpl-header__main,
#rtpl-header .rtpl-header__bar {
    background: transparent !important;
}

/* Every dropdown surface uses opaque Paper. */
#rtpl-header .rtpl-panel__surface,
#rtpl-header .rtpl-search {
    background: #F7F9FA !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
}

/* Exact owner-approved dropdown bottom strip. */
#rtpl-header .rtpl-panel__footer {
    background: #F1F2F4 !important;
}

/* Global Components header wrapper. */
.rtplgc-shell[data-rtplgc-shell="header"]:has(
    #rtpl-header:not(.rtpl-header--overlay)
),
.rtplgc-shell[data-rtplgc-shell="header"]:has(
    #rtpl-header.is-scrolled
) {
    background: #F7F9FA !important;
}

/* Only Divi header ancestors containing RTPL Header.
   Never target ordinary Divi page sections. */
.et-l--header:has(
    #rtpl-header:not(.rtpl-header--overlay)
),
.et-l--header :is(
    .et_builder_inner_content,
    .et_pb_section,
    .et_pb_row,
    .et_pb_column,
    .et_pb_code,
    .et_pb_code_inner
):has(#rtpl-header:not(.rtpl-header--overlay)) {
    background: #F7F9FA !important;
}

/* Mobile navigation drawer. */
@media (max-width: 68.75rem) {
    #rtpl-header .rtpl-nav {
        background: #F7F9FA !important;
    }
}

/* Retain readable header when JavaScript is disabled. */
@media (scripting: none) {
    #rtpl-header {
        background: #F7F9FA !important;
    }
}

/* Shared blog canvas: remove unintended pure-white
   surfaces immediately behind the Header dropdown. */
body.rtplgc-blog-page,
body.rtplgc-blog-page .rtplgc-blog-main,
body.rtplgc-blog-page .rtplgc-article,
body.rtplgc-blog-page .rtplgc-article__content {
    background-color: #F7F9FA !important;
}
