/* Fira Sans - main font */
@import url('https://fonts.googleapis.com/css?family=Fira+Sans:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i');
/* Work Sans - used in ASTRA logo/navbar brand */
@import url('https://fonts.googleapis.com/css?family=Work+Sans:400,500,600,700,800');
/* Merriweather - used in page header .page-header-title */
@import url('https://fonts.googleapis.com/css?family=Merriweather:700');
/*
@import url('https://fonts.googleapis.com/css?family=Merriweather+Sans:300,300i,400,400i,700,700i,800,800i');
*/

html, body {
    font-family: "Fira Sans", sans-serif;
    font-weight: normal;
    font-size: 14px;
    color: #1D1D1B;
}
a {
    color: #013AA7;
}
a.btn:hover, a.btn:focus,
.btn:hover:not(:disabled), .btn:focus:not(:disabled) {
    text-decoration: underline;
}
.btn-astra {
    background-color: #013AA7;
    color: #FFFFFF;
}
.btn-astra:hover:not(:disabled), .btn-astra:focus:not(:disabled) {
    color: #FFFFFF;
    background-color: #012D7F;
    text-decoration: underline;
}
/* Lighter background color and no text color change on hover when button is disabled */
.btn-astra:disabled, .btn-astra-disabled {
    background-color: #1B6AFE;
    color: #FFFFFF;
}
.btn-astra:disabled:hover, .btn-astra:disabled:active,
.btn-astra-disabled:hover, .btn-astra-disabled:active, .btn-astra-disabled:link {
    color: #FFFFFF !important;
    text-decoration: none !important;
}
.btn-astra-link {
    color: #013AA7;
    background-color: transparent;
    border: none;
    box-shadow: none;
}
.btn-astra-link:active, .btn-astra-link:focus, .btn-astra-link.active, .btn-astra-link:focus:active {
    outline: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
}
/* Disable Bootstrap 3 Collapse animations */
.collapsing {
    -webkit-transition: none !important;
    transition: none !important;
    display: none !important;
}
/* Add better margins to alerts */
.alert {
    margin-top: 2rem !important;
    margin-bottom: 0 !important;
}
/* Proper colors for Yii2 pagination */
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus,
.pagination > .active > span, .pagination > .active > span:hover, .pagination > .active > span:focus {
    color: #FFFFFF;
    background-color: #013AA7;
    border-color: #013AA7;
}

.body-wrap { /* TODO rename? */
    min-height: calc(100vh - 88px); /* Body wrap envelops navbar + body, footer is 60px + 2rem padding = 88px */
    height: auto;
}

/* Navbar */
/* Mobile customization first, then for larger screens */
.navbar-astra {
    width: 100%;
    margin-bottom: 2rem;
    border: none;
}
.navbar-toggle {
    border: 1px solid #013AA7;
    margin: 2rem 0 0 0 ; /* Align the button with RA logo */
}
.icon-bar {
    height: 3px;
    width: 0.5rem;
    background-color: #013AA7;
}
.navbar-header-flex {
    align-items: center;
    display: flex;
    flex-direction: row;
}
.navbar-header .ra-logo {
    margin-top: 1rem;
    margin-right: 1rem;
}
.navbar-home-link-container {
    background-color: #013AA7 !important;
    height: 6rem;
    margin: 0 0.5rem 0 0.5rem;
}
.navbar-home-link-container li > a {
    height: 100%;
    padding: 3rem 0.5rem 1rem 0.5rem;
}
.navbar-astra-logo {
    background-color: #013AA7 !important;
    color: #FFFFFF !important;
    font-family: "Work Sans", sans-serif;
    font-size: 1.75rem;
    font-weight: bold;
}
.navbar-astra .navbar-nav > li > a {
    color: #000000;
}
/* Add horizontal padding to the navbar for smaller screens */
@media (max-width: 768px) {
    .navbar-astra {
        padding-left: 15px;
        padding-right: 15px;
    }
}
@media (min-width: 768px) {
    .navbar-astra-logo {
        font-size: 1.75rem;
        font-weight: bold;
        text-align: center;
        height: 1rem;
        width: 100%;
    }
    /* No text effects for ASTRA nav */
    .navbar-astra-logo:hover, .navbar-astra-logo:focus, .navbar-astra-logo:link,
    .navbar-astra-logo:active, .navbar-astra-logo:visited {
        text-decoration: none !important;
    }
    .navbar-astra .navbar-nav {
        height: 6rem;
        margin: 0 0.5rem 0 0.5rem;
    }
    .navbar-astra .navbar-nav > li {
        height: 100%;
        width: 100%;
        margin: 0;
        text-align: center;
    }
    .navbar-astra .navbar-nav > li > a {
        height: 100%;
        padding: 3rem 0.5rem 1rem 0.5rem;
    }
    .navbar-astra .navbar-nav > li > a:hover, .navbar-astra .navbar-nav > li > a:active,
    .navbar-astra .navbar-nav > li > a:visited, .navbar-astra .navbar-nav > li > a:focus {
        background-color: transparent;
        text-decoration: underline;
    }
    .astra-nav-active > li > a {
        border-top: 0.25rem solid #013AA7;
        padding-top: 2.75rem !important; /* substitute 0.25rem padding for border when active */
    }
    .navbar-astra .collapse {
        padding: 0;
    }
    .navbar-astra .navbar-right:last-child { /* Logout button looks better without the 0.5 rem margin-right */
        margin-right: 0;
    }
}
/*
Using .no-section-margin to identify section headings that should have 0 margin-top,
due to them being located below .navigation-button-container, which has its own margins set in place.
The margins won't collapse to one due to them being in separate rows, so we need to remove one element's margin manually.
*/
@media (max-width: 1199px) {
    .no-section-margin > .col-sm-12.col-lg-6:first-child .section-heading-container {
        margin-top: 0 !important;
    }
}
@media (min-width: 1200px) {
    .no-section-margin > .col-sm-12.col-lg-6 .section-heading-container {
        margin-top: 0 !important;
    }
}

/* RA logo, height and width respect the aspect ratio */
.ra-logo {
    height: 5rem;
    width: 12.5rem;
}

/* Section heading styling, used throughout the application */
.section-heading-container {
    background-color: #E8E3D3;
    height: 5rem;
    margin: 2rem 0 2rem 0;
    padding: 0 1.5rem 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-heading-container.clickable:hover {
    background-color: #DBD7C9;
}
.section-heading-container > .section-heading {
    color: #1D1D1B;
    font-size: 1.3rem;
    font-weight: 600;
    background: transparent;
}

/* Login page */
.landing-logo-container {
}
.landing-logo-container > .ra-logo {
    margin-top: 4rem;
}
.landing-astra-logo {
    color: #013AA7;
    font-family: "Work Sans", sans-serif;
    font-size: 4rem;
    font-weight: bold;
    margin-top: 4rem;
}
.landing-introduction {
    color: #1D1D1B;
    font-size: 1.3rem;
    margin-top: 4rem;
}
.landing-button-container {
    font-size: 1.6rem;
    text-align: center;
    height: 11rem;
    margin-top: 4rem;
}
.landing-button {
    height: 11rem;
    background-color: #E8E3D3;
    margin: 0 0 0 0;
    padding: 0 0 0 0;
}
.landing-button:hover {
    background-color: #dbd3bd;
    text-decoration: none;
}
.landing-button-text {
    color: #013AA7;
    height: 7rem;
    line-height: 7rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
/* Responsive registration and login buttons */
@media only screen and (max-width: 768px) {
    .landing-button:first-child {
        border-bottom: 0.1rem solid #B9AE92;
    }
}
@media only screen and (min-width: 768px) {
    .landing-button:first-child > .landing-button-text {
        border-right: 0.1rem solid #B9AE92;
    }
}

/* Breadcrumbs */
.breadcrumb {
    border: none;
    background: transparent;
    padding: 1.5rem 1rem 0 1rem;
    margin: 0 1rem 0 1rem;
}
.breadcrumb > li {
    color: #5C5C5A;
    opacity: 0.8;
}
.breadcrumb > li > a {
    opacity: 0.9;
}
.breadcrumb > li + li:before {
    color: #5C5C5A;
    content: "> ";
    padding: 0 5px;
    opacity: 0.9;
}

/* Page header */
.page-header-container {
    background-color: #E8E3D3;
}
.page-header-container > .row {
    margin: 0 1rem 0 1rem;
}
.page-header-title {
    font-family: "Merriweather", serif;
    font-weight: 700;
    font-size: 24px;
    margin: 1.5rem 0 1.5rem 0;
}
.header-nav-tabs {
    color: #1D1D1B;
}
.header-nav-tabs > li > a {
    color: #1D1D1B;
}
.header-nav-tabs > li > a:hover { /* TODO this color vs default white/gray */
    background-color: #DBD3BD;
    border-top: none;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid #DBD3BD;
    text-decoration: underline;
}

/* Navigation/functionality buttons below the page header */
.navigation-button-container {
    margin: 2rem 0 2rem 1rem;
}
.navigation-button-container a:hover {
    text-decoration: underline;
}

/* Border for separating fields where there is a table inside the field, for example 'person/view' 1..n models */
.table-separator {
    border-color: #E0DCD1;
    border-width: 1px 0 1px 0;
    border-style: solid;
}
.table-separator:last-child {
    border-bottom: 0;
}
.table-separator:first-child {
    border-top: 0;
}

/* Tables without search/filter functionality should use this styling */
.astra-table > thead a {
    color: #1D1D1B;
}
.astra-table > thead > tr > th, .astra-table > tbody > tr > td, .astra-table > tbody > tr > th,td {
    border: none;
}

/* \yii\grid\GridView table styling */
.grid-table {

}
.grid-table > thead > tr {
    background-color: #F3F3F3;
}
.grid-table > thead a {
    color: #1D1D1B;
}
.grid-table > thead > tr > th, .grid-table > thead > tr > td, .grid-table > tbody > tr > td {
    /* Remove all borders, align elements vertically */
    border: none;
    vertical-align: middle;
}
.grid-table td a, .grid-table td input, .grid-table th a {
    vertical-align: middle;
    display: inline-block;
}
.grid-table > tbody > tr:nth-of-type(even) {
    /* Even rows should have the same background-colour as the header */
    background-color: #F3F3F3;
}
.grid-table > tbody > tr:hover {
    background-color: #D9D9D9;
}

/* Sort styling */
a.asc:after, a.desc:after {
    position: relative;
    display: inline-block;
    content: '';
    border: 2px solid #013AA7;
    height: 0.5rem;
    width: 0.3rem;
    border-right: none;
    border-bottom: none;
    margin-left: 0.5rem;
}
a.asc:after {
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}
a.desc:after {
    -webkit-transform: rotate(-135deg);
    -moz-transform: rotate(-135deg);
    -o-transform: rotate(-135deg);
    -ms-transform: rotate(-135deg);
    transform: rotate(-135deg);
}

/* Styling for navigation buttons in GridView */
.grid-button {
    border: 1px solid #013AA7;
}
.grid-button.text-warning {
    border-color: #8A6D3B;
}
.grid-button.text-danger {
    border-color: #A94442;
}
.grid-button.text-success {
    border-color: #3C763D;
}
.grid-button.text-info {
    border-color: #31708F;
}


/* Checkbox styling */
.astra-checkbox input[type="checkbox"] {
    position: relative;
    opacity: 0;
    z-index: -1;
}
.astra-checkbox {
    width: 1.5rem;
    position: relative;
}
.astra-checkbox label {
    cursor: pointer;
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    top: 0;
    left: 0;
    border: 1px solid #CCCCCC;
}
.astra-checkbox label[disabled] {
    background-color: #EEEEEE;
}
.astra-checkbox label:after {
    opacity: 0;
    content: '';
    position: absolute;
    width: 1rem;
    height: 0.5rem;
    background: transparent;
    top: 0.3rem;
    left: 0.2rem;
    border: 3px solid #333;
    border-top: none;
    border-right: none;

    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}
.astra-checkbox label:hover::after {
    opacity: 0.2;
}
.astra-checkbox input[type="checkbox"]:checked + label:after {
    opacity: 1;
}
.astra-checkbox input:disabled + label:hover::after {
    opacity: 0;
}
.astra-checkbox input:disabled + label:hover {
    cursor: not-allowed;
}
.list-inline label {
    font-weight: normal;
}
.list-inline label:hover {
    cursor: default;
}

/* Radio input styling */
.astra-radio {
    margin: 0.5rem !important;
}
.astra-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    z-index: -1;
}
.astra-radio-label {
    padding-left: 0 !important;
    font-weight: normal;
}
.astra-radio input[type="radio"] + .astra-radio-label:before {
    content: '';
    background: #f4f4f4;
    border-radius: 100%;
    border: 1px solid #b4b4b4;
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
    position: relative;
    top: -0.2rem;
    margin-right: 1rem;
    margin-left: -2rem;
    vertical-align: top;
    cursor: pointer;
    text-align: center;
    transition: all 250ms ease;
}
.astra-radio input[type="radio"]:checked + .astra-radio-label:before {
    background-color: #606060;
    box-shadow: inset 0 0 0 4px #f4f4f4;
}
.astra-radio input[type="radio"]:focus + .astra-radio-label:before {
    outline: none;
    border-color: #606060;
}
.astra-radio input[type="radio"] + .astra-radio-label:empty:before {
    margin-right: 0;
}

/* Form styling */
/* Container for a form element */
.form-element-container {
    margin: 0;
}
.form-element-container > label {
    padding-left: 1.5rem;
    text-align: left !important;
    overflow-wrap:  break-word;
}
.form-element-container > p {
    padding-left: 1.5rem !important;
}
.form-element-container .help-block {
    margin: 0;
}
/* Styling for elements with tabular rows */
.form-tabular-row {
    margin-bottom: 1rem;
}
.form-tabular-label { /* Label for the form element/section, e.g. 'Nimevormid', 'Asukoht' */
    padding-top: 0 !important;
}
.form-tabular-label-row label { /* Labels for the tabular input fields */
    font-weight: normal;
}
.form-element-separator {
    border-bottom: 1px solid #E0DCD1;
    margin: 2rem 0 2rem 0;
}
/* Adding margin between elements for 'database/update' and 'database/create' */
#database-form .form-element-container .help-block {
    margin-bottom: 0.7rem;
}
#database-form .form-tabular-row .help-block {
    margin-bottom: 0 !important;
}
.form-add-margin .help-block {
    margin-bottom: 0.7rem;
}

/* Collapse section styling */
.section-collapse-toggle {
    color: #1D1D1B;
    font-size: 1.3rem;
    font-weight: 600;
    background: transparent;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.section-collapse-toggle:link, .section-collapse-toggle:visited,
.section-collapse-toggle:hover, .section-collapse-toggle:active {
    color: #1D1D1B;
}
.section-collapse-toggle:visited, .section-collapse-toggle:active {
    text-decoration: none;
}
.section-collapse {}
/* Margins for the first and last elements of the section */
.section-collapse > .row-fluid:first-child > .col-sm-12 {
    margin-top: 0;
}
.section-collapse > .row-fluid:last-child > .col-sm-12 {
    margin-bottom: 1rem;
}
/* Arrows for indicating whether the section is open or closed */
.section-arrow-up {
    position: relative;
    display: flex;
    align-self: baseline;
    content: '';
    border: 2px solid #013AA7;
    height: 0.5rem;
    width: 0.5rem;
    border-left: none;
    border-top: none;
    margin-top: 2.3rem;
    margin-left: 0.5rem;

    -webkit-transform: rotate(-135deg);
    -moz-transform: rotate(-135deg);
    -o-transform: rotate(-135deg);
    -ms-transform: rotate(-135deg);
    transform: rotate(-135deg);
}
.section-arrow-down {
    position: relative;
    display: flex;
    align-self: baseline;
    content: '';
    border: 2px solid #013AA7;
    height: 0.5rem;
    width: 0.5rem;
    border-right: none;
    border-bottom: none;
    margin-left: 0.5rem;
    margin-top: 2.3rem;

    -webkit-transform: rotate(-135deg);
    -moz-transform: rotate(-135deg);
    -o-transform: rotate(-135deg);
    -ms-transform: rotate(-135deg);
    transform: rotate(-135deg);
}

/* Classification schema simple view */
.simple-function-heading {
    margin: 4rem 0 0 0;
    padding: 0 1.5rem 0 1.5rem;
    border-bottom: 1px solid #DBD3BD;
}
.simple-function-heading a {
    font-size: 1.3rem;
    font-weight: 600;
    height: 5rem;
    line-height: 5rem;
}
.simple-function-heading a:link, .simple-function-heading a:visited,
.simple-function-heading a:hover, .simple-function-heading a:active {
    color: #013AA7;
}
.tex-black, .text-black a:link, .text-black a:visited, .text-black a:hover, .text-black a:active {
    color: #000000;
}

/* Classification schema tree/update view */
.kv-detail-container {
    border: none;
    overflow: hidden;
}
/*.kv-detail-container label {
    overflow-wrap: break-word;
    hyphens:auto;
}*/
.tree-container {
    margin-top: 2rem;
}
.tree-section-heading {
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 1px solid #DBD3BD;
    padding: 0;
    margin-bottom: 2rem;
}
.tree-section-container:first-child {
    padding-left: 0;
}
.tree-section-container:last-child {
    padding-right: 0;
}
.tree-form-field {

}
.tree-form-field label {
    overflow-wrap: break-word;
}
/* Vertically centers labels with input fields, looks nice in some parts and horrible in others */
/*.tree-form-field > .form-group {
    display:flex;
    align-items: center;
}*/
/* Label wraps to 2 rows and acts as a margin for the input field < 1502px, add margin when it is displayed on a single row */
@media only screen and (min-width: 1502px) {
    .kartik-select-container {
        margin-bottom: 0.7rem;
    }
}

/* Classifier views */
.nav-astra {

}
.nav-astra > ul > li > a {
    padding: 0.7rem 1.5rem 0.7rem 1.5rem;
    color: #000000;
}
.nav-astra > ul > li.active > a {
    background-color: #E8E3D3;
    color: #000000;
}
.nav-astra > ul > li.active > a:hover {
    background-color: #DBD3BD;
    color: #000000;
}

/* Appraisal form */
.multiselect-heading {
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 1px solid #DBD3BD;
    padding: 0;
    margin: 2rem 0 2rem 0;
}
.multiselect-container {
    margin: 0 0 2rem 0;
    padding: 0 1.5rem 0 1.5rem;
}
.multiselect-container input, .multiselect-container button {
    margin-bottom: 0.7rem;
}
/* Section heading already has 2rem margin-bottom, remove top margin from the first multiselect-heading that is positioned under it */
.multiselect-container > .row-fluid:first-child .multiselect-heading {
    margin-top: 0;
}

.appraisal-form-comment {

}
.appraisal-form-comment textarea {
    color: #8A6D3B;
    background-color: #FCF8E3;
}

.footer {
    background-color: #F3F3F3;
}
.loader {
    border: 4px solid #F3F3F3;
    border-top: 4px solid #013AA7;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bootstrap 4-like responsiveness to tables < 992 px */
@media (min-width: 768px) and (max-width: 992px) {
    .table-responsive-md {
        table-layout: fixed;
        max-width: 100%;
    }
    .table-responsive-md td {
        width: 70%;
        overflow-x: auto;
    }
}

.kv-toolbar-btn {
    margin-bottom: 5px;
}

.background-beige {
    background-color: #E8E3D3;
}
