/* root {{{*/
:root {
    --transition1: all 0.3s ease-in-out;
    --transition2: all 0.1s ease-in-out;
    /* text, header bg, footer bg, button bg */
    --color0: #042f4b;
    /* a hover, */
    --color1: rgb(59, 184, 59);
    /* a, button text, autocomplete match */
    --color2: #df186f;
    /* body bg, header text, footer txt */
    --color3: #ffffff;
    /* body box shadow */
    --color4: #f9f9f9;
    /* autocomplete selected */
    --color5: #f42f4b;
    /* modal bg */
    --color6: rgba(0, 0, 0, 0.7);
    /* submit button */
    --colorok: rgb(59, 184, 59); 
    /* error msg, error border */
    --colornok: #df1818; 

    --colorbonus: #df18ff;

    --boxshadow1: 0px 0px 6px 2px var(--color4); 
}
/*}}}*/
/* fonts {{{1 */

@font-face {
    font-family: "base-font";
    src: url("fonts/Raleway-Medium.ttf");
}

html * {
    font-size: .9rem;
    font-family: "base-font", sans-serif; 
}

/* mass init{{{1 */

body,
header,
main,
menu,
ul,
hr
{
    padding: 0;
    margin: 0;
    border: 0;
}

input,
select,
textarea,
fieldset
{
    background-color: var(--color4);
    border: 1px solid var(--color4);
    box-shadow: var(--boxshadow1);
    box-sizing: border-box;
    margin: 0;
    padding: 10px 25px;
}

/*}}} */
/* layout position and colors {{{1 */

html,
body {
    height: 100%;
    width: 100%;
}

body {
    color: var(--color0);
    background-color: var(--color3);
    display: flex;
    flex-direction: column;
}

header {
    color: var(--color4);
    background-color: var(--color0);
}

#content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

menu {
    color: var(--color0);
    background-color: var(--color4);
}

main {
    flex: 1;
}

footer {
    color: var(--color3);
    background-color: var(--color0);
}

/* basic {{{1 */

ul {
    list-style-type: none;
}

button {
    background-color: var(--color0);
    color: var(--color3);
    border: none;
    margin: 4px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition1);
    border: 1px solid transparent;
}

button:hover {
    background-color: var(--color4);
    color: var(--color0);
}

h1 {
    font-size: 140%;
    margin: 25px 0;
}

h2 {
    font-size: 130%;
    margin: 23px 0;
}

h3 {
    font-size: 120%;
    margin: 20px 0;
}

h4 {
    font-size: 115%;
    margin: 15px 0;
}

h5 {
    font-size: 110%;
    margin: 12px 0;
}

h6 {
    font-size: 100%;
    margin: 10px 0;
}

p {
    color: inherit;
}

a {
    text-decoration: none;
    color: var(--color2);
}

a:hover {
    color: var(--color1);
}

hr {
    margin: 35px 0;
    border-top:1px solid var(--color4);
}

/* form {{{1*/

form {
    display: flex;
    flex-direction: column;
}

form>label {
    margin: 25px 0 12px 0;
}

textarea {
    resize: none;
    height: 90px;
}

fieldset {
    margin: 15px 0px;
}

fieldset>label:first-child {
    font-size: 120%;
}

fieldset>label>span {
    width: 50%;
    margin: 8px 5px;
    opacity: .8;
    flex-shrink: 0;
}

fieldset input[type=text] {
    background-color: var(--color3);
    width: 100%;
}

label[for*="fs-"] {
    margin-bottom: 25px;
    display: block;
}

form>button[type=submit] {
    margin: 15px auto 0 0;
}

.color-select>div {
    display: flex;
}

.color-select .preview {
    width: 50px;
    margin: 4px 1px;
}

.color-select ul {
    display: flex;
}

.color-select li {
    padding: 10px;
    margin: 15px 1px;
}

/*}}}*/
/* header content{{{1 */
header {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

header .logo {
    flex: 1;
    text-align:left;
}

header .nav-left {
    order: 1;
}

header #autoComplete_cmdbar {
    order: 2;
    margin: 0;
}

header .nav-right {
    order: 3;
}

header button {
    background: inherit;
    color: var(--color2);
    height: 100%;
    margin: 0 8px;
    padding: 0;
}

header button:hover {
    background: inherit;
    color: var(--color1);
}

/* menu content {{{1 */

menu {
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5em;
}

menu div {
    margin: 0 15px;
}

menu h1 {
    color: var(--color0);
    margin: 0 0 10px 0;
    font-size: 120%;
}

menu li {
    margin-bottom: 5px;
}

menu i {
    width: 22px;
}

/* main content {{{1 */
main {
    padding: 1.5em;
}

main h1:first-child {
    margin-top: 0;
}

/* footer {{{1 */

footer {
    font-size: 80%;
    color: var(--color3);
    padding: 6px;
    text-align: right;
}

/* special {{{1 */

h1 p {
    font-size: 70%;
    margin: 4px 10px;
    opacity: .4;
}

.flex-col {
    display:flex;
    flex-direction: column;
}

.flex-row {
    display:flex;
    align-items: center;
}

.muted {
    opacity: .35;
}

.tpl,
.hidden {
    display: none;
}

.invisible {
    visibility: hidden;
}



.box-shadow {
    box-shadow: 0px 0px 3px 1px var(--color0);
}

.text-shadow {
    text-shadow: var(--color4) 1px 1px 1px;
}

.disabled {
    cursor: not-allowed;
}

.disabled:hover {
    background-color: var(--color2);
    color: var(--color3);
}

.error-border {
    border-left: 1px var(--colornok) solid;
    animation: blink 1s;
    animation-iteration-count: 2;
}

@keyframes blink {
    50% { 
        border-color: var(--color3);
    }  
}

.is-on,  
a.current-link {
    color: var(--color1);
}

.is-off {
    color: var(--color0);
}

.is-off:hover,
.is-on:hover {
    color: var(--color2);
}

hr.vertical-space {
    border-color: var(--color3);
}

button.btn-validate,
button[type=submit],
input[type=submit] {
    background-color: var(--colorok);
    color: var(--color3);
}

button.btn-validate:hover,
button[type=submit]:hover,
input[type=submit]:hover {
    background-color: var(--color3);
    color: var(--colorok);
    border-color: var(--colorok);
}

button.btn-cancel {
    background-color: var(--color2);
    color: var(--color3);
}

button.btn-cancel:hover {
    background-color: var(--color3);
    color: var(--color2);
}

label.validate-error {
    color: var(--colornok);
}

input.validate-error {
    border-color: var(--colornok);
}

p.validate-error {
    color: var(--colornok);
    margin: 12px 0px;
    padding-left: 12px;
    font-size: 90%;
}

input.validate-ok {
    box-shadow: 0px 0px 5px 0px var(--color1);
}

label.validate-ok {
    color: var(--color1);
}

/* autocomplete {{{1 */

.autoComplete_root {
    position: relative;
    width: 100%;
}

.autoComplete_root.validate-error input,
.autoComplete_root.validate-error .autoComplete_list {
    border-color: var(--colornok);
}

.autoComplete_root input {
    position: relative;
    width: 100%;
}

.autoComplete_root button{
    visibility: hidden;
    opacity: 0;  
    background: inherit;
    position: absolute;
    right: 5px;
    margin: 0;
    transition: var(--transition1); 
}

.autoComplete_root button.show-reset {
    visibility: visible;
    color: var(--color0);
    right: 15px;
    opacity: 1;
}

.autoComplete_list {
    z-index: 1000;
    position: absolute;
    box-sizing: border-box;
    width: inherit;
}

.autoComplete_result {
    background-color: var(--color3);
    color: var(--color0);
    padding: 7px 11px;
    text-transform: capitalize;
    display: flex;
    cursor: pointer;
}

.autoComplete_result:hover {
    background-color: var(--color0);
    color: var(--color3);
}

.autoComplete_selected {
    background-color: var(--color2);
    color: var(--color3);
}

.autoComplete_highlighted {
    color: var(--color2);
}

.autoComplete_selected .autoComplete_highlighted {
    color: var(--color0);
}

/*}}}*/
/* autoC global search {{{*/

#autoComplete_cmdbar {
    font-size: 90%;
}

#autoComplete_cmdbar .show-reset {
    color: var(--color3);
}
#autoComplete_cmdbar input  {
    opacity: .90;
    background-color: var(--color2);
    color: var(--color3);
    height: 100%;
    padding: 15px 30px;
    box-shadow: none;
    transition: var(--transition1);
}

#autoComplete_cmdbar .autoComplete_list {
    border: none;
}

#autoComplete_cmdbar input:focus, 
#autoComplete_cmdbar input:hover
{
    opacity: 1;
}

#autoComplete_cmdbar .autoComplete_result>div:first-child {
    min-width: 30px
}

#autoComplete_cmdbar .autoComplete_result>div:nth-child(2) {
    min-width: 80px;
}

/*}}}*/
/* table {{{1 */

.list-cont {
    margin: 30px 0;
}

table {
    width: 100%;
}

thead {

}

th,
td{
}

th {
}

th>div {
    display: flex;
}

td {
    padding: 5px 15px;
}

thead>tr>th div {

}

thead>tr>th input {
    background-color: var(--color4);
    color: var(--color0);
    box-sizing: border-box;
    width:  110px;
}

thead>tr>th button {
    background: none;
    color: var(--color0);
    height: auto;
    padding: 0 2px;
}

thead>tr>th button:hover {
    color: var(--color2);
    background: none;
}

tbody>tr {
    box-shadow: 0px 0px 2px 0px var(--color4); 
}

.heading-flex {
    display: flex;
    justify-content: space-between;
    margin: 20px 10px;
    vertical-align: center;
    font-size: 120%;
}

.heading-flex h1 {
    margin-bottom: 0;
    font-size: inherit;
    flex: 1;
}

.heading-flex>a {
    margin: 0 6px;

}

.table-search-match {
    color: inherit;
    font: inherit;
    background-color: yellow;
}

.tile-cont {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.tile-column>div,
.tile-double-column>div {
    background-color: var(--color3);
    box-shadow: 0px 0px 6px 1px var(--color4);
    box-sizing: border-box;
    margin: 2px;
    padding: 16px;
    height: 100%;
}

.tile-cont > div.tile-column:hover {
    box-shadow: 0px 0px 6px 1px var(--color0);
}

.tile-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
}

.tile-column {
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    flex: 1;
}

.tile-double-column {
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    flex: 2;
}

.box-list>li {
    padding-top: 0;
}

ul.icon-list>li {
    margin-left: 5px;
}

.list-row {
    display: flex;
    justify-content: wrap;
    background-color: var(--box-bg-color);
    padding: .8vw;
    margin-bottom: 4px;
}

.box-list .list-row {
    background-color: var(--sides-color);
    border: 1px solid var(--color3);
}

.list-row hr {
    border-top: 1px solid var(--bg-color)
}

.box-list .list-row>div:nth-child(1) {
    width: 40%;
}

.list-row>div {
    margin-left: .5em;
    margin-right: .5em;
    width: 30%;
}

.list-row h1 {
    font-size: 105%;
    margin-bottom: 1em;

}

.list-row h2 {
    font-size: 85%;
    margin-bottom: 0px;
    opacity: .7;

}

.list-row p {
    font-size: 80%;
}

.list-row .info {
    opacity: .3;
}

.list-row .important {
    color: var(--color6);
    font-weight: bold;

}

.cable-col-clr {
    margin: 3px;
    width: 1em;
    height: auto;
}

.cable-col-ref {
    margin-left: 7px;
    margin-right: 7px;
}

.list-fl-1 {
    flex: 1;
}

.list-fl-2 {
    flex: 2;
}

/* modal {{{1 */
.modal {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 99999;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--color6);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.modal > div {
    box-shadow: 0 0px 5px 2px var(--color1);
    background: var(--color3);
    border-radius: 15px;
    padding: 35px;
    width: 640px;
}

.modal-header {
    display: flex;
    align-items: center;
}

.modal-header button {
    background: inherit;
    color: var(--color2);
    font-size: 160%;
}

.modal-header h1 {
    margin: 0;
    flex: 1;
}

.modal:target,
.modal-show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.modal-body {
    flex-basis: 480px;
    overflow-y: auto;
}

.modal-footer {
    margin-top: 25px;
}

.modal input,
.modal select,
.modal textarea {
    margin: 5px;
}
/*
 *
 .demobtn{
 align-items: center;
 justify-content: center;
 }

 .modal-alt {
 width: 300px;
 padding: 40px;
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 }

 .input-alt {
 border: 0;
 background: none;
 display: block;
 margin: 20px auto;
 text-align: center;
 border: 2px solid #DDD;
 outline: none;
 width: 100px;
 border-radius: 20px;
 color: white;
 transition: 0.25s;
 } */

.input-alt:focus {
    width: 150px;
    border: 2px solid red;
}

.input-alt-submit {
    cursor: pointer;
}

.input-alt-submit:hover {
    background: white;
}

/* tooltip {{{1 */
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
    /* If you want dots under the hoverable text */
}

/* Tooltip text */
.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;

    /* Position the tooltip text */
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;

    /* Fade in tooltip */
    opacity: 0;
    transition: opacity 0.3s;
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* a trier {{{1 */
#command-modal ol {
    margin: 15px;
    margin-left: 30px;
    /*
    display: flex;
    flex-direction: column;
    list-style-type: decimal;
     */
}

.hist-row {
    border-left: .4vw solid white;
    min-width: 440px;
}

.hist-add {
    color: green;
    border-color: green;
}

.hist-edit {
    color: blue;
    border-color: blue;
}

.hist-delete {
    color: red;
    border-color: red;
}


.hist-row>div:nth-child(1) {
    margin-right: 2vw;
}

.hist-change {
    display: flex;
    flex-direction: column;
}

.hist-change-row {
    flex-grow: 1;
    display: flex;
}

.hist-change-row>div {
    width: 33%;
    font-size: 85%;
}

.hist-field {}

.hist-old {
    opacity: .3;
    color: red;
}

.hist-new {
    color: var(--color6);
    margin-left: 2vw;
}

#history {
    margin: 0;
    padding: 1em;
}

#history ul {
    margin-bottom: 10px;
    margin-left: 15px;
    padding: 0;
    border-left: 1px solid var(--color6);
}

#history ul>li {
    list-style-type: decimal;
    padding-left: 5px;
}



#id_owner,
label[for="id_owner"] {
    position: absolute;
    display: none;
}

input[type=color] {
    height: 40px;
}

.color-palette {
    margin-top: 10px;
    display: flex;
}

.color-palette li {
    margin: 1px;
    display: block;
    height: 20px;
    width: 20px;
}

.color-palette li:hover {
    cursor: pointer;
}



.btn-list {
    margin-left: 10px;
    margin-top: 10px;
    display: flex;
    justify-content: left;
}

/* dropdown menu {{{2 */

.drop-down {
    position: relative;
}

.drop-down button {
   min-width: 115px;
}

.drop-down >  ul {
    background-color: var(--color0);
    padding: 8px 12px;
    width: 100%;
    position: absolute;
    z-index: 100;
    display: none;
}

.drop-down:hover > ul {
    display: block;
}

.drop-down>ul>li {
    padding: 10px;
    display: block;
}

/* mediaqueries {{{1 */
@media (min-width: 800px) {

    #content-wrapper  {
        flex-direction: row;
    }

    menu {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        width: 160px;
    }

    menu div {
        margin: 0;
    }

    menu > div:not(:first-child) > h1 {
        margin: 20px 0 12px 0;
    }

}
