/***************
 ! Color chooser
****************/

@include exports("colorchooser") {
    colorswatch {
        &, &:selected {
            border: 1px solid alpha($black, .1);
            border-radius: $roundness - 1px;
            background-color: transparent;
            background-clip: border-box;

            &:hover { border-color: alpha($black, .3); }
        }

        &.color-light:selected:hover, &.color-dark:selected:hover { background-image: none; }

        &.left, &:first-child {
            border-top-left-radius: $roundness;
            border-bottom-left-radius: $roundness;
        }

        &.right, &:last-child {
            border-top-right-radius: $roundness;
            border-bottom-right-radius: $roundness;
        }

        &:only-child { border-radius: $roundness; }

        &.top {
            border-top-left-radius: $roundness;
            border-top-right-radius: $roundness;
        }

        &.bottom {
            border-bottom-left-radius: $roundness;
            border-bottom-right-radius: $roundness;
        }

        coloreditor & {
            border-radius: $roundness;

            &.color-dark:hover, &.color-light:hover {
                background-image: none;
                border-color: alpha($black, .3);
            }
        }
    }

    GtkColorChooserWidget #add-color-button {
        background-clip: padding-box;
        border-color: alpha($black, .1);
        background-color: shade($bg_color, .95);
        color: $fg_color;

        &:hover {
            border-color: alpha($black, .3);
            background-color: shade($bg_color, .9);
            color: $fg_color;
        }
    }

    .color-active-badge {
        &, &:selected {
            border-width: 2px;
            border-style: solid;
            background-color: transparent;
        }

        &.color-light {
            &, &:hover {
                border-color: alpha($black, .3);
                color: alpha($black, .3);
            }
        }

        &.color-dark {
            &, &:hover {
                border-color: alpha($white, .3);
                color: alpha($white, .3);
            }
        }
    }

    GtkColorButton.button { padding: $spacing; }
}


/***********************
! Font and file choosers
************************/

@include exports("miscchoosers") {
    filechooser {
        /* for fallback when header bar not used */
        .dialog-action-box {
            border-top: 1px solid $borders_color;

            &:backdrop { border-top-color: $backdrop_borders_color; }
        }

        #pathbarbox { border-bottom: 1px solid $bg_color; }
    }

    filechooserbutton:drop(active) {
        box-shadow: none;
        border-color: transparent;
    }
}
