/**
 * @package     Frontline WebApp Base
 *
 * @subpackage  <Application CSS file>
 *
 * @author      Andra Ungureanu <andra@frontline.ro>
 * @copyright   2017-2020 Frontline softworks <https://www.frontline.ro>
 * @license     https://opensource.org/licenses/BSD-3-Clause
 *
 * @description The purpose of this file is to instantiate custom CSS styling for this Application.
 *
 * @since       2020.08.05
 *
 */

/* Custom filters */
.custom-filters a {
    background-color: var(--sec-bg);
    color: var(--pry-tab-color);
}

.custom-filters a,
.toolbar button,
.box-custom-select {
    margin-top: 10px;
}

.custom-filters a:first-child {
    margin-left: 25px;
}

.custom-filters .btn:focus,
.custom-filters .btn.focus {
    box-shadow: none;
}

.custom-filters .filter-button-active {
    background-color: var(--pry-bg);
    color: #fff;
}

.box-custom-select {
    display: grid;
    grid-template-areas: "select";
    align-items: center;
    position: relative;
    border: 1px solid #d8dbe0;
    border-radius: .25em;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
    background-color: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / 16%) !important;
}

.box-custom-select.filter-selected {
    border: 2px solid var(--pry-bg);
}

.box-custom-select::after {
    content: "";
    justify-self: end;
    position: relative;
    top: 1px;
    width: 8px;
    height: 6px;
    background-color: #888;
    clip-path: polygon(100% 0, 0 0, 50% 100%);
    clip-path: polygon(100% 0, 0 0, 50% 100%);
    z-index: 2;
}

.box-custom-select select,
.box-custom-select::after {
    grid-area: select;
}

.box-custom-select:focus-within::after {
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.box-custom-select select {
    appearance: none;
    appearance: none;
    appearance: none;
    background-color: #fff;
    border: none;
    padding: 0 1em 0 0;
    margin: 0;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    cursor: inherit;
    line-height: inherit;
    z-index: 1;
    outline: none;
    height: 100%;
    color: #999;
}

.box-custom-select.filter-selected select {
    color: #333;
    font-weight: 600;
}

.box-custom-select select option {
    color: #333;
    font-weight: normal;
}

.box-custom-select select::-ms-expand {
    display: none;
}

.box-custom-select select:focus + .focus {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 2px solid var(--field-focus-bdr);
    border-radius: inherit;
}

/* Custom form group */

.custom-form-group .form-control {
    height: auto;
}

.input-group.date .input-group-prepend:first-child {
    width: 0;
}

.input-group.date .input-group-prepend .kv-date-remove {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    z-index: 2;
    background: transparent;
    border: none;
}

.input-group.date .form-control {
    border-radius: .25rem !important;
}

.input-group.date .krajee-datepicker {
    padding-right: 25px;
}

/* Grid view */

#grid-view .action-column-buttons .btn {
    margin: 3px 0;
}

#grid-view .custom-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

#grid-view .date-filters {
    display: inline-block;
    overflow-x: scroll;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: lightgrey transparent;
}

#grid-view .table-buttons.expired .custom-filters,
#grid-view .table-buttons.expired .toolbar .btn-ajax-add {
    display: none !important;
}

#grid-view .table-buttons.expired .toolbar {
    width: 100%;
    text-align: right;
}

#grid-view .table-buttons.expired .toolbar .export-wrapper,
#grid-view .table-buttons.future-exams .toolbar .export-wrapper {
    text-align: right;
}

.certificate-index .table-buttons .toolbar > .btn-group {
    margin-right: 0 !important;
}

#action-column-filter-cell {
    text-align: right;
}
