/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

/* themes for about:* pages */

@-moz-document 
url-prefix("about:newtab"),
url-prefix("about:privatebrowsing"),
url-prefix("about:home") {
    @media (-moz-bool-pref: "browser.tabs.allow_transparent_browser") 
    and (-moz-bool-pref: "uc.tweak.translucency") {
        body {
            background-color: transparent !important;
        }
        .customize-menu .close-button-wrapper {
            background-color: transparent !important;
        }
    }
    .customize-menu {
        height: auto !important;
        border-radius: var(--uc-content-radius) !important;
        box-shadow: none !important;
    }
    .personalize-button {
        border-radius: var(--uc-radius) !important;
        transition: opacity var(--uc-transition) !important;
        &:not(:hover) { 
            opacity: 0.2 !important;
        }
    }
}

/* common theming */
@-moz-document 
url-prefix("about:preferences"),
url-prefix("about:support"),
url-prefix("about:config"),
url-prefix("about:newtab"),
url-prefix("about:privatebrowsing"),
url-prefix("about:home"),
url-prefix("about:support"),
url-prefix("about:profiles"),
url-prefix("about:addons") {
    @media (-moz-bool-pref: "browser.tabs.allow_transparent_browser")
    and (-moz-bool-pref: "uc.tweak.translucency")  {
        :root {
            --in-content-page-background: transparent !important;
            --in-content-table-background: transparent !important;
/*             --in-content-table-header-background: 
                color-mix(in srgb, var(--in-content-primary-button-background), transparent 80%) !important;  */
            --in-content-box-background: 
                color-mix(in srgb, var(--background-color-box), transparent 80%) !important; 
        }
        .card {
            box-shadow: none !important;
        }
    }
}

@-moz-document url-prefix("about:config") {
    @media (-moz-bool-pref: "browser.tabs.allow_transparent_browser")
    and (-moz-bool-pref: "uc.tweak.translucency")  {
        #about-config-search {
            backdrop-filter: blur(33px) !important;
            background-color: color-mix(in srgb, var(--background-color-box), transparent 20%) !important;
        }
    }
}

@-moz-document url-prefix("about:addons") {
    @media (-moz-bool-pref: "browser.tabs.allow_transparent_browser")
    and (-moz-bool-pref: "uc.tweak.translucency")  {
        :root {
            --in-content-box-background: 
                color-mix(in srgb, var(--background-color-box), transparent 60%) !important; 
        }
        .main-heading {
            display: none !important;
        }
    }
}

@-moz-document 
url-prefix("about:preferences"),
url-prefix("about:support") {
    @media (-moz-bool-pref: "browser.tabs.allow_transparent_browser")
    and (-moz-bool-pref: "uc.tweak.translucency")  {
        #searchInput {
            backdrop-filter: blur(33px) !important;
            background-color: color-mix(in srgb, var(--background-color-box), transparent 10%) !important; 
        }
    }
}
    