/**
 * This CSS file is used by the AdminBundle, for admin screens.
 * It is NOT the world map view (where all projects are shown)
 */

html {
    --header-background-color: #42424B;
    --header-color: white;
    --background-color: #878787;
    --primary-color: #4177C1;
    --highlight-background-color: #5791E1;
    --highlight-color: white;
    --main-background-color: #E0E0E0;
    --content-background-color: white;
    --primary-button-hover-color: #3F86E6;
    --header-light-background-color: #4F4E54;
    --header-light-color: white;
    --gutter-size: 15px;
    --dark-background-color: #424348;
    --darker-background-color: #424242;
    --darker-color: var(--dark-color);
    --dark-color: white;
    --status-height: 30px;


    box-sizing: border-box;
    width: 100%;
}

body {
    background-color: var(--main-background-color);
    font-family: "Source Sans Pro";
    min-height: 100%;
    margin: 0;
    overflow: auto !important;
    width: 100%;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: max-content minmax(400px, auto);
    grid-template-areas: "header" "main";
}

header.admin-header {
    margin: 0;
    padding: 0 15px;
    background-color: var(--header-background-color);
    grid-area: header;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: max-content;
    grid-template-areas: "user" "title";
    /*grid-template-columns: auto minmax(auto, 880px) 400px auto;*/
    /*grid-template-areas: ". title user .";*/
}

section {
    overflow: auto;
    padding: 1px;
}


.title {
    grid-area: title;
}

.page-title {
    color: white;
    font-size: 26px;
    line-height: 26px;
    border-bottom: 5px solid #5690DF;
    padding-bottom: 5px;
    display: block;
    width: max-content;
}

.main {
    grid-area: main;
    display: grid;
    width: 100%;
    max-width: var(--max-site-width);
    margin: 0 auto;
    margin-top: 30px;
    margin-bottom: 70px;
    padding: 0 15px;
    grid-template-columns: auto;
    grid-template-rows: max-content;
    grid-template-areas: "tabs" "content";
}

.tabs {
    grid-area: tabs;
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

tabbed-content::part(content) {
    border-radius: 0 15px 15px 15px;
    background-color: white;
    padding: 20px;
}

.content {
    grid-area: content;
    display: block;
    width: 100%;
    max-width: var(--max-site-width);
    padding: 20px;
    margin: 0 auto;
    background-color: white;
    border-radius: 15px;
}

.content > *:not(section) {
    position: relative;

}
.content > *:not(section):before {
    position: absolute;
    display: block;
    left: 0;
    right: 0;
    height: 100%;
    background-color: rgba(255, 0, 0, 0.5);
    text-align: center;
    z-index: 10000;
    content: "This content should be in a SECTION";
}

.tabs + .content {
    border-top-left-radius: 0;

}

.action-group:empty {
    display: none;
}
.action-group {
    margin-bottom: 10px;
    display: flex;
    width: max-content;
    margin-left: auto;
    align-items: center;
    justify-content: flex-end;
}

.action-group .btn {
    margin-right: 10px;
}

.action-group .btn:last-child {
    margin-right: 0px;
}

.table {
    background-color: white;
    padding: 1em;
    overflow: auto;
}

.table h1 {
    margin-top: 0;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--header-background-color);
}

.buttons {
    display: flex;
    flex-direction: row-reverse;
    color: var(--background-color);
}

.buttons button {
    color: inherit;
    height: var(--height);
    border: none;
    background: none;
}

.FavoriteButton {
    display: block;
    margin: auto;
    text-decoration: none;
    border: none;
    background-color: transparent;
}

.table button.FavoriteButton:not(.favorite) svg {
    fill: transparent;
    stroke-width: 2px;
}

/***************/

/* pagination */

/***************/

.pagination {
    display: inline-block;
    padding-left: 0;
    margin: 20px 0;
    border-radius: 4px;
}

.pagination>li {
    display: inline;
}

.pagination>li:first-child>a, .pagination>li:first-child>span {
    margin-left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.pagination>.disabled>a, .pagination>.disabled>a:focus, .pagination>.disabled>a:hover, .pagination>.disabled>span, .pagination>.disabled>span:focus, .pagination>.disabled>span:hover {
    color: #777;
    cursor: not-allowed;
    background-color: #FFF;
    border-color: #DDD;
}

.pagination>li>a, .pagination>li>span {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #337AB7;
    text-decoration: none;
    background-color: #FFF;
    border: 1px solid #DDD;
}

.pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span, .pagination>.active>span:focus, .pagination>.active>span:hover {
    z-index: 3;
    color: #FFF;
    cursor: default;
    background-color: #337AB7;
    border-color: #337AB7;
}

/**/

.form-content {
    display: inline-block;
    padding: 0;
    width: 100%;
    height: min-content;
    grid-row: auto;
    grid-column: span 2;
    margin-bottom: 10px;
}

/*.form-content.full-width {*/
/*    max-width: 100%;*/
/*    grid-column: span 4;*/
/*}*/

.form-element, .form-element.table {
    grid-column: span 2;
    grid-row: auto;
    min-height: 300px;
    width: auto;
    overflow: auto;
}

.form-element.table iframe {
    min-height: 300px;
}

.form-element.chart {
    grid-row: span 1;
    height: 200px;
    min-height: unset;
}

.form-element.map {
    grid-row: span 2;
    height: 400px;
    min-height: unset;
    border: none;
}

.form-content h3 {
    margin: 0 0 30px 0;
}

.workspaces #w3-pjax {
    clear: both;
}

/* Tables markup */

table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    border-radius: 10px;
}

th {
    background-color: #E0E0E0;
    border-bottom: 2px solid var(--background-color);
    padding-top: 15px;
}

td {
    border: 1px solid #DEE2E6;
    font-size: 0.9em;
    padding-left: 10px;
    padding-right: 20px;
}

td input {
    margin: 10px 0;
}

table caption, .kv-table-caption {
    margin: 0px;
    padding: 0;
}

table thead tr th, .table thead tr th {
    background: #F6F6F6;
    color: #9D9D9D;
    font-family: "Source Sans Pro";
    font-weight: 400;
    text-transform: uppercase;
    font-size: 11px;
    padding: 10px;
}

table thead tr th:first-child {
    border-top-left-radius: 10px;
}

table thead tr th:last-child {
    border-top-right-radius: 10px;
}

table thead tr th a {
    width: 100%;
    position: relative;
    display: block;
    color: var(--link-color);
    text-decoration: none;
}

table thead tr th a:hover {
    color: var(--primary-button-background-color);
}

table thead tr th a.asc, table thead tr th a.desc {
    color: #4177C1;
    display: flex;
    align-items: center;
}

table thead tr th a::after {
    width: 11px;
    height: 7px;
    background-size: contain;
    margin-left: 5px;
}

table thead tr th a.asc::after {
    content: url('/img/arrow-up.svg');
}

table thead tr th a.desc::after {
    content: url('/img/arrow-down.svg');
}

.table tbody tr td {
    padding: 10px 5px 10px 10px;
    font-family: "Source Sans Pro";
    color: #222;
    vertical-align: middle;
}

.table tbody tr td a {
    display: inline-block;
}

a>svg {
    pointer-events: none;
}

.NestedSelect input::after {
    color: var(--highlight-background-color);
}

.NestedSelect.inline {
    display: block;
}

.NestedSelect.inline .options {
    position: inherit;
}

.NestedSelect.inline span.current {
    display: none;
}

/*
 MODAL
 */

body[data-modal] {
    overflow: hidden;
    user-select: none;
}

.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    max-width: 500px;
    max-height: 100vh;
    padding: 15px;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1200;
    background-color: rgba(198, 198, 198, 1);
}

.close {
    border: none;
    float: right;
    width: 20px;
    height: 20px;
    /*top: 15px;*/
    /*right: 15px;*/
    background-color: rgba(1, 1, 1, 0);
}

.close::after {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f00d";
    font-size: 1.2rem;
}

.close+* {
    margin-top: 30px;
}

.filter-modal label {
    display: block;
}

body[data-modal] .filter-modal {
    display: block;
}

body[data-modal]:after {
    display: block;
    z-index: 1100;
    content: " ";
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: white;
    opacity: 0.7;
}

.hidden {
    display: none !important;
    background-color: red;
}

.filter-modal .filter {
    display: block;
}

.grid-view .summary {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 12px;
    letter-spacing: 0.15px;
    font-weight: 300;
    color: #222;
}

@media (min-width: 600px) {
    .filter-modal {
        top: 100px;
        bottom: 100px;
        border: 2px solid var(--highlight-background-color);
    }
}

@media (min-width: 768px) {
    header.admin-header {
        grid-template-columns: auto minmax(auto, 980px) 400px auto;
        grid-template-areas: ". title user .";
    }
}

@media (min-width: 800px) {
    .main {
        padding: 0 30px;
    }
    header.admin-header {
        padding: 0 30px;
    }
}

@media(min-width: 1280px) {}

@media(min-width: 1460px) {
    .main {
        padding: 0;
    }
    header.admin-header {
        padding: 0;
        grid-template-columns: auto minmax(auto, 1040px) 400px auto;
    }
}
