/**********************************
 * Agri Wave Project
 * Theme Numeric wave
 * @author Nicolas <nicolas.b@numeric-wave.eu>
 * @author Terence <terence@numeric-wave.tech>
 **********************************/

/**********************************
 * Table
 **********************************/

th {
    overflow-x: hidden;
}

.btn-flit-light {
    background: #6A994E;
    border-color: #6A994E;
}

div.dataTables_wrapper {
    position: relative;
}

div.dataTables_wrapper > div.dataTables_info {
    position: absolute;
    bottom: 0;
}

.filters .filter {
    text-align: center;
}

table.dataTable > tbody > tr.selected > * {
    box-shadow: inset 0 0 0 9999px rgb(26 179 148 / 20%) !important;
    color: black !important;
}

/**********************************
 * Spacer
 **********************************/
.spacer-top-1 {
    margin-top: 10px;
}

.spacer-top-2 {
    margin-top: 20px;
}

.spacer-top-3 {
    margin-top: 30px;
}

.spacer-top-4 {
    margin-top: 40px;
}

.spacer-bottom-1 {
    margin-bottom: 10px;
}

.spacer-bottom-2 {
    margin-bottom: 20px;
}

.spacer-bottom-3 {
    margin-bottom: 30px;
}

.spacer-bottom-4 {
    margin-bottom: 40px;
}

.spacer-left-5 {
    margin-left: 5px;
}

/**********************************
 * Select2 & Container : Readonly
 **********************************/
/*
 *  'select' : is one element select
 * '[readonly]' : with attributes readonly
 *   '+'   =  Brother of the element
 */
select[readonly] + .select2-container, select[readonly] + .chosen-container, input[readonly].datepicker {
    pointer-events: none;
    touch-action: none;
}

/*
 *      '+'       = brother
 * '.xxxx .yyyyy' = the child of the brother :D
 */
select[readonly] + .select2-container .select2-selection--single, select[readonly] + .chosen-container .chosen-single {
    background-color: #eee !important;
}

select[readonly] + .select2-container .select2-selection__arrow,
select[readonly] + .select2-container .select2-selection__clear,
select[readonly] + .chosen-container div {
    display: none;
}

/**************************
        Entity Link
**************************/

.entityLinkCursor {
    font-weight: 600;
}

.entityLinkCursor:hover {
    cursor: help;
    text-decoration: underline;
}

/**************************
        Popup Title
**************************/

.popover-title {
    margin-top: 0 !important;
}

/**************************
     Compact DataTable
**************************/

table.css-table-compact:not(.collapsed) td {
    padding: .2em 8px !important;
    vertical-align: middle !important;
}

table.table-hover > tbody > tr:hover {
    background-color: #eef9d2;
    color: #000;
}

table.table-hover > tbody > tr:nth-child(odd):hover {
    background-color: #e5f1c8;
}

table.table-hover > tbody > tr:not(:hover) {
    transition: background-color .1s, color .2s;
}

/* last column containing buttons */
table.css-table-compact td.css-fix-buttons {
    padding: 2px 0 !important;
    white-space: nowrap;
    text-align: right;
}

table.css-table-compact td.css-fix-buttons .btn-group-vertical > .btn,
table.css-table-compact td.css-fix-buttons .btn-group > .btn {
    float: none !important;
}

/* buttons of the last column */
table.css-table-compact > tbody > tr:not(.group) > td:last-child .btn {
    min-width: 25px;
}

table.css-fix-table-responsive {
    width: 100% !important;
}

table.css-fix-table-responsive.collapsed tr.filters {
    display: none;
}

table.css-fix-table-responsive input:not([type="checkbox"]) {
    width: 100%;
}

table.css-table-compact input {
    padding: .05em 2px !important;
}

/**********************************
 * Filters
 **********************************/

@media (max-width: 768px) {
    tr.filters {
        display: none !important;
    }
}

/**************************
       Sticky header
**************************/
.header-sticky{
    position: sticky;
    top: 0;
    background: white;
}

/**************************
       Order number
**************************/

.primaryOrderNumber > a {
    font-weight: bold;
}

/**************************
       Various fixes
**************************/

/* fixes link color inside nav */
.nav-header a {
    color: #ffffff;
}

/**********************************
 * Page - Ban
 **********************************/
.ban-title,
.ban-subtitle {
    color: white;
}

.panel-body-ban {
    background: #333;
}

/**********************************
 * Error pages
 **********************************/
.wrapper-error {
    color: #555555;
    background-image: url('../img/agriwave-background-login.jpg');
    min-height: 100vh;
    background-size: cover;
    text-align: center;
}

.infos-container-error {
    background: #fff;
    border-color: #6a994e;
    margin-top: 30vh;
    border-radius: 15px;
    padding: 10px 15px;
}

.bg-error {
    height: 100vh;
}

.wrapper-error .width-100 {
    width: 100%;
}

/** Loading screen **/
.loading-screen {
    display: none;
    visibility: hidden;
}

.loading-screen > .squarebox {
    display: flex;
    align-content: center;
    justify-content: center;
    justify-items: center;
    align-items: center;
    height: 10rem;
    width: 10rem;
    border-radius: 2rem;
    background-color: rgba(0, 0, 0, .4);
    backdrop-filter: blur(20px) saturate(180%);
}

.loading-screen > .squarebox > i {
    height: 1em;
    width: 1em;
}

.loading-screen.loading {
    visibility: visible;
    display: flex;
    align-content: center;
    justify-content: center;
    justify-items: center;
    align-items: center;
    position: fixed;
    height: 100%;
    width: 100%;
    letter-spacing: .1em;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    color: white;
    cursor: wait;
    z-index: 999999999 !important;
}

.loading-screen.loading::after {
    display: none;
}

.css-js-optimizeLoadingTime {
    visibility: hidden !important;
}

/**********************************
 * Graphic
 **********************************/
#flot-turnover-chart,
#barChart-turnover,
#barChart-countOrder {
    min-height: 200px;
}

.striped > .line:nth-child(even) {
    background-color: #f5f5f6;
}

/**********************************
 * NW Page Footer
 **********************************/
.nw-footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
    box-shadow: 0 -2rem 1rem -2rem rgba(0,0,0,.15);
    background: rgb(243,243,244);
    background: linear-gradient(0deg, rgba(243,243,244,0) 0%, rgba(243,243,244,0.6) 35%, rgba(243,243,244,1) 100%);
}

/**********************************
 * NW Wizard
 **********************************/

.nw-wizard-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
}

.nw-wizard-radio {
    height: 8rem;
    position: relative;
}

.nw-wizard-radio input[type=radio] {
    display: none;
}

.nw-wizard-radio label {
    display: block;
}

.nw-wizard-radio-btn {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    margin: 1.5rem;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.nw-wizard-radio-btn * {
    width: 100%;
    white-space: normal;
    text-overflow: ellipsis;
    overflow: hidden;
}

.nw-wizard-radio-primary-text {
    text-overflow: clip;
    font-weight: 900;
    font-size: large;
    white-space: nowrap;
}

.nw-wizard-radio-secondary-text {
    margin-top: .2rem;
    white-space: nowrap;
}

.nw-wizard-radio label.required::after {
    display: none;
}

.nw-wizard-radio input[type=radio] + label > * {
    transition: box-shadow .2s ease;
}

.nw-wizard-radio input[type=radio]:checked + label > * {
    box-shadow: 0 0 0 6px #1ab394, 0 30px 50px #0004;
    background-color: #3c6159;
    border-color: #3c6159;
}

.setting-icon-size {
    font-size: 1rem;
}

.form-control.surface-form-unit {
    height: inherit!important;
    background-color: transparent;
    border: none;
    padding-top: 0;
    padding-bottom: 0;
}