:root {
    --cgcolor: #be1e2b;
    --inside-purple: #502bd3;
    --italcolor: #002D6E;

    /* SECTORS */
    --sectorColor1: #ff8533;
    /* Rouge vif */
    --sectorColor2: #33ff57;
    /* Vert vif */
    --sectorColor3: #3357ff;
    /* Bleu vif */
    --sectorColor4: #ff33a8;
    /* Rose vif */
    --sectorColor5: #f4d03f;
    /* Jaune doré */
    --sectorColor6: #8e44ad;
    /* Violet profond */
    --sectorColor7: #1abc9c;
    /* Turquoise */
    --sectorColor8: #ee2c1e;
    /* Rouge brique */


    /* BULMA overrides */
    /* --bulma-card-header-background-color: var(--inside-purple) !important;
    --bulma-card-header-color: #000 !important; */
}

path.sector1 {
    fill: var(--sectorColor1);
}

path.sector2 {
    fill: var(--sectorColor2);
}

path.sector3 {
    fill: var(--sectorColor3);
}

path.sector4 {
    fill: var(--sectorColor4);
}

path.sector5 {
    fill: var(--sectorColor5);
}

path.sector6 {
    fill: var(--sectorColor6);
}

path.sector7 {
    fill: var(--sectorColor7);
}

path.sector8 {
    fill: var(--sectorColor8);
}

li.sector1 ul .tag {
    background-color: var(--sectorColor1);
}

li.sector2 ul .tag {
    background-color: var(--sectorColor2);
}

li.sector3 ul .tag {
    background-color: var(--sectorColor3);
}

li.sector4 ul .tag {
    background-color: var(--sectorColor4);
}

li.sector5 ul .tag {
    background-color: var(--sectorColor5);
}

li.sector6 ul .tag {
    background-color: var(--sectorColor6);
}

li.sector7 ul .tag {
    background-color: var(--sectorColor7);
}

li.sector8 ul .tag {
    background-color: var(--sectorColor8);
}

li.tag {
    color: #000;
}

aside:not(:has(p)) {
    display: none;
}

h1.title {
    color: var(--inside-purple);
    padding-top: 20px;
}

.dropdown-content {
    left: auto !important;
    /* Réinitialise le style par défaut */
    right: 0;
    /* Aligne le menu sur le côté gauche */
}

#maincontainer {
    padding-top: 70px;
}

@media (width > 1000px) {
    #maincontainer {
        display: grid;
        grid-template-columns: 100%;
        min-height: 80vh;
    }

    #maincontainer:has(aside .menu-list) {
        grid-template-columns: 150px calc(100% - 150px);
    }

    aside {
        /* flex-basis:200px; */
        border-right: solid 1px rgba(255, 255, 255, .1);
    }

    .navbar {
        border-bottom: solid 1px var(--inside-purple);
    }

    main {
        /* flex-grow: 2; */
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex-basis: calc(100% - 300px);
    }

    main>* {
        flex-grow: 0 !important;
        padding: 0 20px;

    }

    /* main>.container{
        max-width:100%;
    } */
}

.button {
    word-wrap: pre;
    white-space: normal;
}

/* Side menu */
.menu-label {
    color: #000;
    text-align: center;
    /* border-top:solid 1px var(--redcolor); */
    background-color: var(--inside-purple);
}

.expand {
    max-height: 30px;
    overflow: hidden;
}

.expand.expanded {
    max-height: 500px;
    overflow-y: scroll;
}

button.is-inside {
    color: #000;
    background-color: var(--inside-purple);
}

@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(0);
        opacity: 0;
    }
}

#tab-content>div {
    display: none;
}

#tab-content>div.is-active {
    display: block;
}

svg {
    max-width: 100%;
}

.sectors ul {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

#customerFilters td:first-child,
#customerFilters th:first-child,
#customerFilters th:nth-child(2) {
    max-width: 100px;
}

/* .open-customer-orders-modal{
    max-width:200px;
    margin:auto;
} */
#customerFilters,
#customerFilters select,
th .input,
th select {
    max-width: 100px;
}

#customer-list {
    font-size: 12px;
}

#maincontainer aside.menu {
    flex-basis: 200px;
}

#maincontainer>section {
    flex-basis: calc(100% - 200px);
}

/* .navbar-dropdown, .navbar-dropdown .navbar-item:not(.is-active,.is-selected){
    background-color:var(--inside-purple)!important;
    color:#000!important;
  } */
.navbar-dropdown {
    border: solid 1px var(--inside-purple);
    border-top: 0;
}

.navbar-brand .navbar-item {
    color: var(--inside-purple);
    text-transform: uppercase;
    font-weight: bold;
}

#italcustomerstable td,
#italcustomerstable th,
#italquotations td,
#italquotations th {
    text-align: center;
}

.tablesorter .filtered {
    display: none;
}

#italcustomerstable .codeital,
#italcustomerstable .dept {
    width: 100px;
}

.tablesorter thead input {
    max-width: 100px;
}

.tablesorter .select2-container {
    max-width: 120px;
}

.tablesorter-header.tablesorter-headerAsc::after {
    content: '\f15e'
}

.tablesorter-header.tablesorter-headerDesc::after {
    content: "\f882";
}

.tablesorter-header {
    position: relative;
}

.tablesorter-header::after {
    position: absolute;
    right: 10px;
    top: 5px;
    z-index: 999;
    font-size: 1.5em;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.hideme {
    display: none;
}

.hidden-date {
    font-size: 0;
}

.hidden-date::after {
    content: attr(data-displaydate);
    font-size: .75rem !important;
}

.tablesorter-header {
    cursor: pointer;
}

.tablesorter-header::before {
    position: absolute;
    margin-top: 20px;
    background-color: #fff;
    color: #000;
    z-index: 99;
    text-align: center;
    padding: 2px 5px;
    white-space: pre;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    font-weight: 400;
    transform: translateX(-50%);
    border-radius: 3px;

}

.tablesorter-header.tablesorter-headerUnSorted:hover::before {
    content: "click : tri ascendant";
}

.tablesorter-header.tablesorter-headerAsc:hover::before {
    content: "click : tri  descendant \A ctrl + click : annuler tri";
}

.tablesorter-header.tablesorter-headerDesc:hover::before {
    content: "click : tri  ascendant \A ctrl + click : annuler tri";
}

.tablesorter-header:has(i:hover)::before {
    display: none;
}

.select2-result-label {
    font-size: 10px;
}

#italquotations td[data-column="5"] .select2-container,
#italcustomerstable td[data-column="3"] .select2-container {
    max-width: none;
}

tr.shipping {
    border-top: solid 3px var(--bulma-table-cell-border-color);
}

.small-gap {
    gap: 0.25rem;
    /* Adjust the gap size as needed */
}

#customer-info span {
    padding: 5px 10px;
    display: inline-block;
}

#comptable th {
    font-size: 12px;
    text-align: center;
}

#comptable tbody {
    padding-bottom: 20px;
    border-bottom: solid 5px #000;
}

#comptable .miniheader td {
    text-align: left;
}

.btngroup .button {
    border-radius: 0;
}

.btngroup .button:first-child {
    border-radius: 0.25rem 0 0 0.25rem;
}

.btngroup .button:last-child {
    border-radius: 0 0.25rem 0.25rem 0;
}

#dropdown-menu {
    margin-left: -50%;
}

/* tr.customertype-export td.codeital::after{
    content:'(export)';
    display:block;
    color:#1abc9c;
  } */

#customer-addresses {
    padding-top: 0;
}

#customer-addresses .address-item {
    border-bottom: solid 1px rgba(255, 255, 255, .1);
    font-size: 12px;
}

th {
    text-align: center;
}

.table th:not([align]) {
    text-align: center;
}

.tag.has-text-dark {
    color: #000 !important;
}

.tag.has-text-dark::before {
    content: "";
    display: block;
    background-color: #fff;
    width: 100%;
    height: 100%;

}

.html-tooltip .tooltip {
    position: absolute;
    padding: 5px;
    border-radius: 3px;
    background-color: #fff;
    z-index: 9;
    color: #000;
    font-weight: 400;
    font-size: 12px;
    text-align: left;
    display: none;
}

.html-tooltip .tooltip p:not(:last-of-type) {
    border-bottom: solid 1px rgba(0, 0, 0, .2);
    margin-bottom: 5px;
}

.html-tooltip:hover .tooltip {
    display: block;
}

.card:has(.card-header-icon:not(.active)) .card-content {
    max-height: 0px;
    /* height:0; */
    padding: 0;
    overflow: hidden;
    transition: all .5s ease-out;
}

.card:has(.card-header-icon.active) .card-content {
    max-height: 10000px;
    /* height:auto; */
    transition: all .5s ease-out;
}

td hr {
    margin: 5px 0;
}

body.anonymous .anonym {
    filter: blur(3px);
}

.tablesorter-filter {
    margin: auto;
}

td:has(.tablesorter-filter) {
    text-align: center !important;
}

tbody.warranty {
    border: solid 4px #ff8533;
}

.panel-content {
    display: none;
}

.panel-content.is-active {
    display: block;
}

.loading-overlay {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bulma-body-background-color);
    z-index: 9999;
    text-align: center;
    animation-name: fadein;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
}



.loading-overlay>div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;

}

@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.table thead.sticky-thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #fff;
}

@media (prefers-color-scheme: dark) {
    .table thead.sticky-thead {
        background-color: hsl(221, 14%, 9%);
    }
}

/* 
.sticky-thead th {
    padding-top: 100px;
} */
.table-container.yscroll {
    max-height: 80vh;
    overflow-y: auto;
}

.is-nowrap {
    white-space: nowrap;
}

td.limitw {
    max-width: 250px;
    word-break: break-word;
    min-width: 100px;
}

body#articles td:first-child {
    min-width: 75px;
}

body#articles td {
    vertical-align: middle;
}

.popover {
    display: none;
    position: absolute;
    z-index: 9999;
    background-color: #fff;
    border: solid 1px rgba(0, 0, 0, .1);
    padding: 10px;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 15px;
    border-radius: 5px;
    transform: translate(-105%, -50%);
    color: #000;
    margin: 0;
    max-width: 300px;
}

*:has(>.popover):hover .popover {
    display: block;
    /* position: relative */
}

*:has(>.popover) {
    cursor: pointer;
}

li:has(>.tag) .tag {
    margin-bottom: 2px;
}

.card-header {
    background-color: var(--inside-purple);
    margin: -0.75rem -0.75rem 0 -0.75rem;
}

.card-header-title {
    color: #000;
}

table.valign td {
    vertical-align: middle;
}

/* Vertical menu */
aside.menu {
    width: 200px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    background-color: var(--bulma-body-background-color);
    z-index: 1000;
}

body:has(aside.menu) #maincontainer {
    padding-left: 200px;
    padding-top: 0;
}

.is-consogarage {
    background-color: var(--cgcolor);
    color: #fff;
}

.is-ital {
    background-color: var(--italcolor);
    color: #fff;
}