/* 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 http://mozilla.org/MPL/2.0/. */

@import url("chrome://dot/skin/browser-shared.css");
@import url("chrome://dot/skin/gtk.css");

@namespace html url("http://www.w3.org/1999/xhtml");

/* Apply GTK rounded top corners */
@media (-moz-gtk-csd-available) {
    :root:not([chromemargin=""])[chromemargin][sizemode="normal"]:not([gtktiledwindow="true"]) {
        -moz-default-appearance: -moz-window-decorations;
        appearance: auto;
    }

    :root:not([chromemargin])[sizemode="normal"]:not([gtktiledwindow="true"]) {
        background-color: -moz-headerbar;
    }

    :root:not([chromemargin=""])[chromemargin][sizemode="normal"]:not([gtktiledwindow="true"]) {
        @media (-moz-bool-pref: "widget.gtk.rounded-bottom-corners.enabled") {

            body,
            dialog::backdrop {
                border-radius: env(-moz-gtk-csd-titlebar-radius) !important;
            }
        }

        body,
        dialog::backdrop {
            border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
            border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
        }
    }
}