//
// List styles
//

list
{
    background-color: $base_color;
    border-color:     $borders_color;
    color:            $text_color;
    
    &:backdrop
    {
        background-color: $backdrop_base_color;
        border-color:     $backdrop_borders_color;
        color:            $backdrop_text_color;
    }
    
    row
    {
        padding: 2px;
    }
}

row
{
    transition: all 150ms $ease-out-quad;
    
    &:hover
    {
        transition: none;
    }
    
    &:backdrop
    {
        transition: $backdrop_transition;
    }
    
    &.activatable
    {
        &.has-open-popup, // This is for indicating which row generated a popover see https://bugzilla.gnome.org/show_bug.cgi?id=754411        
        &:hover
        {
            background-color: if($variant == light, transparentize($fg_color, 0.9), transparentize($fg_color, 0.95));
        }
        
        &:active
        {
            box-shadow: inset 0 2px 2px -2px transparentize(black, 0.8);
        }
        
        &:backdrop:hover
        {
            background-color: transparent;
        }
        
        &:selected
        {
            &:active
            {
                box-shadow: inset 0 2px 3px -1px transparentize(black, 0.5);
            }

            &.has-open-popup,
            &:hover
            {
                background-color: mix($fg_color, $selected_bg_color, 10%);
            }
            
            &:backdrop
            {
                background-color: $selected_bg_color;
            }
        }
    }
    
    &:selected
    {
        @extend %selected_items;
    }
}
