/*
 * 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.
 */

/*
 * ADMIN DASHBOARD
 */

/* DEPENDENCY CHECKS */

div#depchecks ul
{
    margin-bottom: 1em;
}

div#depchecks ul#optional,
div#depchecks ul#optimal
{
    font-style: italic;
    background-color: inherit;
    color: #4B4740;
}

div#depchecks ul li
{
    margin: 0.5em 0;
}

div#depchecks ul li.error
{
    font-weight: bold;
    color: #d54e21;
}

/* ADMIN GENERAL SETTINGS */

textarea#id_DESCRIPTION
{
    width: 100%;
}

/* STATIC PAGES */

.staticpages-form textarea
{
    width: 100%;
    height: 30em;
}

.staticpages td {
    width: 1%;
}

.staticpages .action
{
    display: inline-block;
    position: relative;
    top: -0.1em;
    padding: 0 0.6em 0.1em;
    margin: 0 0.3em;
    font-size: 85%;
    background-color: #0489b7;
    color: #fff;
    border-radius: 1em;
}

.control-group
{
    clear: both;
    margin-bottom: 1.5em;
    line-height: 1.5;
}

.control-group label
{
    float: left;
    width: 140px;
}

html[dir="rtl"] .control-group label
{
    float: right;
}

.control-group .controls
{
    position: relative;
    margin-left: 180px;
}

html[dir="rtl"] .controls
{
    margin-left: auto;
    margin-right: 180px;
}

.control-group .controls .radio-pre
{
    left: -2em;
}

html[dir="rtl"] .control-group .controls .radio-pre
{
    left: auto;
    right: -2em;
}

.control-group .controls input
{
    display: inline-block;
}

.control-group-separator
{
    margin-left: 2em;
    margin-top: -1.5em;
}

html[dir="rtl"] .control-group-separator
{
    margin-left: auto;
    margin-right: 2em;
}

/* ADMIN LANGUAGES, FILES */

td.code input
{
   width: 5em;
}

td.fullname {
    width: 20%;
}

td.pluralequation
{
    width: 50%;
}

td.fullname input
{
    min-width: 10em;
}

td.specialchars input
{
    min-width: 5em;
}

td.fullname input,
td.pluralequation input,
td.specialchars input
{
    width: 90%;
}

td.fullname input,
td.pluralequation input,
td.pootle_path
{
    direction: ltr;
}

html[dir="rtl"] td.pootle_path
{
    text-align: right;
}

/* ADMIN BUTTONS */

.admin-buttons-block input
{
    display: inline;
    margin-bottom: 1em;
    margin-left: .25em;
    margin-right: .25em;
}


/* Revamped admin */

.admin-content h2
{
    display: inline-block;
    width: 100%;
}

.admin-content h2 + .btn
{
    position: absolute;
    right: 2em;
}

html[dir="rtl"] .admin-content h2 + .btn
{
    right: auto;
    left: 2em;
}


/* Add/Edit form */

/* FIXME: #item-form styles copied from user.css, the styles should be
 * shared and `#user-edit` should become `#item-form` */

#item-form
{
    width: 500px;
}

#item-form label
{
    width: 30%;
}

#item-form .fields label,
#item-form .fields input,
#item-form .fields textarea,
#item-form .fields .helptext
{
    display: inline-block;
    box-sizing: border-box;
    vertical-align: top;
}

#item-form .field-wrapper
{
    margin-bottom: 1em;
}

#item-form .fields input,
#item-form .fields textarea,
#item-form .fields .Select
{
    width: 70%;
    padding: 0.3em;
    line-height: 1.2;
    box-sizing: border-box;
    display: inline-block;
}

#item-form .fields .Select
{
    padding: 0;
}

#item-form .fields .Select-control
{
    border-radius: 0;
}

#item-form .fields .Select-input input
{
    padding: inherit;
    line-height: inherit;
    display: inherit;
}

#item-form .fields input[type="checkbox"]
{
    width: auto;
}

#item-form #id_twitter
{
    width: 35%;
}

#item-form #id_bio
{
    height: 5em;
}

#item-form .helptext,
#item-form .errorlist,
#item-form .buttons
{
    margin-left: 30%;
}

html[dir="rtl"] #item-form .helptext,
html[dir="rtl"] #item-form .errorlist,
html[dir="rtl"] #item-form .buttons
{
    margin-left: auto;
    margin-right: 30%;
}

#item-form .buttons
{
    margin-top: 0;
    margin-bottom: 0;
}

#item-form .buttons input
{
    margin-bottom: 1em;
}

#item-form .action-links li
{
    margin-bottom: 0.5em;
    font-style: italic;
}

#item-form .helptext
{
    position: absolute;
    margin-top: -0.2em;
    left: 80px;
    width: 40%;
}

html[dir="rtl"] #item-form .helptext
{
    left: auto;
    right: 80px;
}

.admin-content #item-form
{
    width: 100%;
}

.admin-content #item-form .divider
{
    height: 1px;
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    clear: both;
    margin: 1em 0;
}

.admin-content #item-form .helptext
{
    position: relative;
    width: auto;
    margin-top: 0;
    left: auto;
}

.admin-content #item-form #id_bio
{
    resize: vertical;
}


/* Delete */

.admin-content .item-delete
{
    margin-top: 1em;
}

html[dir="rtl"] .admin-content .item-delete
{
    margin-left: auto;
}

.admin-content .item-delete input,
.admin-content .item-delete button
{
    display: inline-block;
    box-sizing: border-box;
}

.admin-content .item-delete input
{
    margin-right: 1em;
    margin-left: -2em;
}

html[dir="rtl"] .admin-content .item-delete input
{
    margin-right: -2em;
    margin-left: 1em;
}

.admin-content .item-delete .helptext
{
    display: block;
    margin-top: 1em !important;
    margin-left: auto !important;
}


/* Search */

.search-box input
{
    box-sizing: border-box;
    width: 100%;
    padding: 0.5em;
    margin: 2em 0;
}

.search-results.loading
{
    opacity: 0.5;
    pointer-events: none;
}

.search-results caption
{
    padding: 0 0 1em 0;
}

.search-results tr
{
    cursor: pointer;
}

.search-results tr:nth-child(2n+1)
{
    background-color: #F5FBFD;
    color: #000;
}

.search-results tr:hover
{
    background-color: #E2F4F8;
}

.search-results tr.is-disabled
{
    font-style: italic;
}

.search-results tr.is-selected
{
    background-color: #222;
    color: #fff;
}

.search-results tr.row-divider
{
    border-top: 1px solid #ccc;
}

.search-results td
{
    padding: 0.5em;
}
