/*
 * Copyright (C) Pootle contributors.
 *
 * This file is a part of the Pootle project. It is distributed under the GPL3
 * or later license. See the LICENSE file for a copy of the license and the
 * AUTHORS file for copyright and authorship information.
 */

/*
    Pootle customizations for Select2 styles.
*/


/* Customizations for breadcrumbs selects */

.select2-container
{
    top: -2px; /* needed because of the border */
}

.unit-sort .select2-container
{
    top: 0;
}

.select2-container .select2-choice
{
    border: 1px solid #d9d9d9;
    border-radius: 2px;

    background-color: #fcfcfc;
    background-image: linear-gradient(to bottom, #fcfcfc 0%, #eeeeee 50%);
}

.breadcrumb .select2-container .select2-choice,
.unit-sort .select2-container .select2-choice
{
    border: 1px solid transparent;
    background-color: transparent;
    background-image: none;
    filter: none;
}

html[dir="rtl"] .select2-container .select2-choice span {
    margin-right: auto;
    margin-left: 26px;
}

html[dir="rtl"] .select2-container.select2-allowclear .select2-choice span {
    margin-right: auto;
    margin-left: 42px;
}

.select2-container:hover .select2-choice
{
    border: 1px solid #d9d9d9;
}

.select2-container.select2-drop-above .select2-choice
{
    border-bottom-color: #d9d9d9;
    border-radius:0 0 2px 2px;
}

.select2-drop
{
    border: 1px solid #d9d9d9;
    border-top: 0;
}

.select2-drop.select2-drop-above
{
    border-top: 1px solid #d9d9d9;
}

.select2-container .select2-choice div
{
    border-left: 1px solid #d9d9d9;
    border-radius: 0 2px 2px 0;

    background-color: #ddd;
    background-image: linear-gradient(to top, #dddddd 0%, #eeeeee 60%);
}

html[dir="rtl"] .select2-container .select2-choice div
{
    right: auto;
    left: 0;
}

.breadcrumb .select2-container .select2-choice div,
.unit-sort .select2-container .select2-choice div
{
    border-left: 1px solid transparent;
    background-color: transparent;
    background-image: none;
    filter: none;
}

.select2-search input
{
    border: 1px solid #d9d9d9;
}

.select2-container-active .select2-choice,
.select2-container-active .select2-choices
{
    border: 1px solid #0489b7;
}

.breadcrumb .select2-dropdown-open .select2-choice,
.unit-sort .select2-dropdown-open .select2-choice,
.select2-dropdown-open .select2-choice
{
    border: 1px solid #d9d9d9;
    border-bottom-color: transparent;
}

.breadcrumb .select2-dropdown-open .select2-choice,
.unit-sort .select2-dropdown-open .select2-choice
{
    background-color: #eee;
    background-image: linear-gradient(to bottom, #ffffff 0%,#eeeeee 50%);
}

.select2-results .select2-highlighted
{
    background: #0489b7;
}

.select2-container-multi .select2-choices
{
    border: 1px solid #d9d9d9;
}

.select2-container-multi.select2-container-active .select2-choices
{
    border: 1px solid #0489b7;
}

.select2-container-multi .select2-choices .select2-search-field input
{
    height: 15px;
}

.select2-container-multi .select2-choices .select2-search-choice
{
    border: 1px solid #d9d9d9;
}

html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice
{
    padding: 3px 18px 3px 5px;
}

html[dir="rtl"] .select2-search-choice-close
{
    right: auto;
    left: 3px;
}



/* Width specification for several selects */

/* Styles for "multiple" selects */
.select2-multiple
{
    width: 30em;
    min-width: 30em;
    max-width: 30em;
}

/* Styles for other selects */
.select2-nplurals
{
    width: 8em;
    min-width: 8em;
    max-width: 12em;
}

.select2-checkstyle
{
    width: 14em;
    min-width: 14em;
    max-width: 20em;
}

.select2-localfiletype
{
    width: 16em;
    min-width: 16em;
    max-width: 20em;
}

.select2-treestyle
{
    width: 26em;
    min-width: 26em;
    max-width: 30em;
}

.select2-language
{
    width: 21em;
    min-width: 21em;
    max-width: 30em;
}

.select2-username
{
    width: 20em;
    min-width: 20em;
    max-width: 20em;
}
