/* Colors */
:root {
    --color-main-front: #adff2f;
    --color-dark-front: #568019;
    --color-darker-front: #22320A;
    --color-error: #ff2f45;
    --color-warning: #ffa42f;
    --color-ok: #2fadff;
    --color-darkgrey: rgb(173,255,47, 0.2);
    --color-main-background: rgb(0, 0, 0);
    --white: #ffffff;
    --width: calc(min(500px, 100vw - 2rem));
  }

  
* {
    box-sizing: border-box;
}

html:not(.admin) .admin {
    display:none !important;
}

html:not(.user):not(.admin) .user {
    display:none !important;
}


body {
    background: var(--color-main-background);
    color: var(--color-main-front);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.4em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 100vw;
    margin-left: 0px;
    margin-right: 0px;
}

body.noscript div, body.noscript headerm body.noscript section, body.noscript footer {
    display: none !important
}

h1 {
    font-size: 1.5em;
}

.wp, .status, .box  {
    border: 1px solid var(--color-main-front);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 1rem;
    row-gap: 1rem;
    /* margin: 1rem; */
    padding: 1rem;
    /* min-width: 50vw; */
    width: calc(min(500px, 100vw - 2rem));
}

.wp-title {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0rem;
    font-weight: 700;
    column-gap: 0.5rem;
    width: 100%;
}

.wp-status {
    line-height: 1em;
}

.wp-title div:first-child {
    flex-grow: 1;
}

.wp-toggle {
    border:1px solid var(--color-main-front);
    border-radius: 2rem;
    background-color: var(--color-darker-front);
    padding: 0;
    margin: 0;
    min-height: 1em;
    max-height: 1em;
    min-width: 2em;
    max-width: 2em;
    transition: all 0.1s ease-in-out;
    user-select: none;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.wp-toggle:not(.disabled) {
    cursor: pointer;
}

.wp-toggle.active,
.wp.active #wp-toggle-active,
.wp.cron-active.cron-ok #wp-toggle-schedule,
.wp.setpoint-active.temp-sensor-ok #wp-toggle-moisture {
    background-color: var(--color-dark-front);
}

.wp-toggle.disabled,
.wp:not(.cron-ok) #wp-toggle-schedule,
.wp:not(.temp-sensor-ok.setpoint-ok) #wp-toggle-moisture {
    border:1px solid var(--color-dark-front);
    cursor: unset;
}

.wp-toggle span {
    display: block;
    background-color:grey;
    border-radius: 0.75rem;
    width: 0.6em;
    height: 0.6em;
    margin: calc(0.2em - 1px) 0 0 calc(0.2em - 1px);
}

.wp-toggle.active span,
.wp.active #wp-toggle-active span,
.wp.cron-active.cron-ok #wp-toggle-schedule span,
.wp.setpoint-active.temp-sensor-ok #wp-toggle-moisture span {
    background-color: var(--color-ok);
    margin-left: calc(1.2em - 1px);
}

.wp-toggle.disabled span {
    background-color: var(--color-dark-front);
}

.wp-control-items {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 2;
    row-gap: 0.5em;
}

.toggle-container {
    display:flex;
    flex-direction: row;
    align-items: center;
}

.toggle-container .wp-toggle {
    margin-right: 0.75em;
}

svg.icon {
    height: 1em;
    margin: 0 0.25em;
}

.clickable {
    cursor: pointer;
}

.pl-s {
    padding-left: 1rem;
}



svg {
    fill: var(--color-main-front);
}

.wp-controls fieldset {
    border-color: var(--color-ok);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}

#snackbar, #confirmation-form, #cron-selector, #watering-selector, #test-temp-sensor {
    width: calc(min(500px, 100vw - 2rem));
}

.flex-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    max-width: calc(min(500px, 100vw - 2rem));
}

.flex-col {
    max-width: calc(min(500px, 100vw - 2rem));
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

.flex-dots {
    flex-grow: 1;
    border-bottom: 1px dashed var(--color-main-front);
    line-height: 0.6em;
    margin: 0 7px;
}

#test-setpoint, #test-temp-sensor {
    width: calc(min(500px, 100vw - 2rem));
    display: flex;
    flex-direction: column;
    border-radius: 0.75rem;
    column-gap: 1rem;
    row-gap: 0.5rem;
    padding: 0.5rem;
    min-width: 0;
}

p {
    margin-bottom: 0;
}

ol {
    margin: 0;
    padding: 0 1rem 0 1rem;
}

table {
    font-size: 0.9em;
    border-collapse: collapse;
    word-wrap: break-word;
}

td.max-value {
    color: black;
    background-color: var(--color-error);

}

td.min-value {
    color: black;
    background-color: var(--color-main-front);

}

label.in-use {
    color: var(--color-warning);
}

#status {
    width: calc(min(500px, 100vw - 2rem));
    display: flex;
    border: 1px solid var(--color-main-front);
    flex-wrap: wrap;
    border-radius: 0.75rem;
    column-gap: 1rem;
    row-gap: 1rem;
    padding: 1rem;
    min-width: 0;
}

#wp_wrapper {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
}

.selectable > div {
    border: 1px solid var(--color-main-front);
    padding: 0.5em;
    border-radius: 10px;
    line-height: 1em;
    cursor: pointer;
}

.selectable .selected {
    background-color:  var(--color-main-front);
    color: var(--color-main-background);
}

.input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    row-gap:0.9rem;
    font-size: 0.9em;
    column-gap: 1rem;
    flex-wrap: wrap;
}

.space-between {
    justify-content: space-between;
}

.input-wrapper.days {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.input-wrapper.days > div {
    width: 7em;
}


.input-wrapper.hours {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.input-wrapper.hours > div {
    width: 5em;
}

.input-wrapper > div > input {
    margin: 0;
    padding: 0;

}

legend {
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
}

legend:before, legend:after {
    content: '\00A0';
}

fieldset {
    border: 1px solid var(--color-main-front);
    margin-top: 1rem;
}

/* Base for label styling */
[type="checkbox"]:not(:checked), [type="radio"]:not(:checked),
[type="checkbox"]:checked, [type="radio"]:checked {
  position: absolute;
  visibility: hidden;
}
[type="checkbox"]:not(:checked) + label, [type="radio"]:not(:checked) + label,
[type="checkbox"]:checked + label, [type="radio"]:checked + label {
  position: relative;
  padding-left: 2em;
  font-size: 1em;
  line-height: 1em;
}

[type="checkbox"]:not(:disabled) + label, [type="radio"]:not(:disabled) + label {
  cursor: pointer;
}


#sessions table td:first-child {
    padding-left: 0.4em; 
}

#sessions table [type="checkbox"] + label {
    padding-left: 1em; 
}

#sessions thead tr:first-child [type="checkbox"] + label:before {
    border: 1px solid darkgray;
    background-color: black;
}

/* checkbox aspect */
[type="checkbox"] + label:before, [type="radio"] + label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.0em;
    width: 1em;
    height: 1em;
    border: 1px solid var(--color-main-front);
}

[type="radio"] + label.in-use:before {
    border-color: var(--color-warning);
}

[type="checkbox"]:not(:checked) + label:before, [type="checkbox"]:checked + label:before {
  border-radius: 5px;
}

[type="radio"]:not(:checked) + label:before, [type="radio"]:checked + label:before {
    border-radius: 50%;
}

[type="radio"]:not(:checked) + label:before {
    background: var(--color-main-background);
}
[type="radio"]:checked + label:before {
    background: radial-gradient(circle, var(--color-ok) 0%, var(--color-ok) 55%, var(--color-main-background) 60%, var(--color-main-background) 100%);
}

[type="radio"].ok:checked + label:before {
    background: radial-gradient(circle, var(--color-main-front) 0%, var(--color-main-front) 55%, var(--color-main-background) 60%, var(--color-main-background) 100%);
}

[type="radio"].ko:checked + label:before {
    background: radial-gradient(circle, var(--color-error) 0%, var(--color-error) 55%, var(--color-main-background) 60%, var(--color-main-background) 100%);
}

/* checked mark aspect */
[type="checkbox"]:checked + label:after {
  content: '\2713';
  position: absolute;
  top: .6em;
  left: .15em;
  font-size: 1em;
  color: var(--color-ok);
  font-weight: 700;
  line-height: 0;
}

.wp-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items:flex-start;
    width: 100%;
    column-gap: 1em;
}

.wp-controls svg {
    width: 1em;
    cursor: pointer;
}

.wp.inactive .wp-controls {
    display: none;
}

.week, .wp-control-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0em;
}

.week {
    text-align: center;
}
.wp-control-item {
    column-gap: 0.5em;

}

.flex-right {
    display: flex;
    justify-content: flex-end;
    flex-grow: 2
}

.week div {
    border: 1px solid var(--color-main-front);
    border-right: 0;
    padding: 1px;
    line-height: 1em;
    width: 1.2em;
    height: 1.2em;
}

.week svg {
    height: 1em;
    width: 1em;
    margin-right: 1em;
    cursor: pointer;
}
.wp-control-item svg {
    min-height: 1em;
    max-height: 1em;
    min-width: 1em;
    max-width: 1em;
    cursor: pointer;
}

.week div:last-of-type {
    border-right: 1px solid var(--color-main-front);
}

.week div.active {
    background-color: var(--color-main-front);
    color: var(--color-main-background);
}

.wp-control-item {
    line-height: 1em;
}

.wp-name {
    padding: 0 0.2rem;
    font-weight: 700;
    flex-grow: 2;
}

svg#garage {
    width: 90vw;
    max-width:300px;
    cursor: pointer;
}

/* @starting-style {
    .modal {
        opacity: 0;
    }
    section {
        opacity: 0;
        height: 0;
        margin-top: -100%;
    }   
} */

.no-show {
    opacity: 0;
    height: 0;
    display: none !important;
}

.modal, section, .wp {
    transition: opacity 1.5s, height 1.5s ease-in-out;
    /* transition-behavior: allow-discrete; */
    overflow: hidden;
}

.modal, section {
    /* transition: opacity 1.5s; */
    /* transition: height 1.5s ease-in-out; */
}

.modal {
    /* transition: opacity 1.5s, height 1.5s ease-in-out; */
}

/* @keyframes fade-out {
    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes fade-out {
    100% {
        opacity: 0;
        display: none;
    }
} */

input.check-collapse {
    display: none;
}

.collapsible {
    padding-bottom: 0;
}

.collapsible-content {
    max-height: 0px;
    overflow: hidden;
    overflow-wrap: anywhere;
    transition: max-height .25s ease-in-out;
}

.check-collapse:checked ~ .collapsible-content {
    max-height: 10000vh;
}

.check-collapse ~ label:before {
    content: '\25BA  show';
}

.check-collapse:checked ~ label:before {
    content: '\25B2  hide';
}

label.collapse-toogle {
    color: var(--color-main-background);
    background-color: var(--color-main-front);
    width: calc(100% + 2em);
    position: relative;
    text-align: center;
    cursor: pointer;
    /* left:-0.5em; */
}

.error {
    color: var(--color-error) !important;
    /* stroke: none;
    fill: var(--color-error); */
}

.warning {
    color: var(--color-warning) !important;
    /* stroke: none;
    fill: var(--color-error); */
}

button {
    background-color: rgb(164, 164, 164);
    height: 30px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8em;
    color: var(--color-main-background);
    border: 1px solid rgb(176, 176, 176);
    border-radius: 5px;
    margin: 1rem 0 0 0;
    padding: 0 2rem;
    cursor: pointer;
    min-width: 8rem;
}

h1 {
    text-align: center;
}

td, th {
    border-bottom: 1px solid rgb(164, 164, 164);
    text-align: center;
    line-height: 1em;
    padding: 0.5em 0.4em;
}

td:first-child /*, th:first-child*/ {
    padding-left: 0;
}

td:last-child /*, th:last-child*/ {
    padding-right: 0;
}

.input-wrapper > div {
    text-align: center;
    min-width: 2.5em;
}
thead, tfoot {
    background-color: rgb(164, 164, 164);
}

input[type="email"],
input[type="number"],
input[type="password"],
input[type="text"],
select:focus,
textarea {
  font-size: 1em;
}

thead th, tfoot td {
    color: var(--color-main-background);
    border: none;
}

tfoot {
    font-weight: 700;
}

thead tr th { 
    border-left: 1px solid var(--color-main-background);
    border-right: 1px solid var(--color-main-background);
}

thead tr th:first-child {
    border-radius: 5px 0 0 5px;
}

thead tr th:last-child {
    border-radius: 0 5px 5px 0;
}

table tbody tr:last-child td {
    border: none;
}

#events-pagesize, #statuses-pagesize {
    padding-top: 0.5em;
    font-size: 0.9em;
}

.pagesize-item.active {
    cursor: pointer;
}

.pagesize-item.inactive {
    opacity: 0.5;
    font-weight: 700;
}

.flex-table-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
}

td.table-footer-count {
    word-wrap: break-word;
    border-radius: 5px;
    line-height: 1em;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

td.token {
    word-break: break-word;
}

#statuses-count, #events-count {
    text-align: left;
}

#statuses-page-number, #events-page-number {
    text-align: right;
}

#arrows {
    padding-left: 0;
    padding-right: 0;
    font-size: 0.8em;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: nowrap;
    align-items: center;
    width:100%;
    margin:auto;
    max-width: 10rem;
}

svg.arrows {
    stroke: none;
    fill: var(--color-main-background);
    height: 1em;
    margin: 0;
    cursor: pointer;
}

svg.arrows.inactive {
    fill:rgb(100, 100, 100);
    cursor: inherit;
}

svg.arrows.simple {
    padding: 0 0.5em;
}

.cls-front {
    fill: var(--color-main-front);
    stroke: var(--color-main-front);
    stroke-width: 4;
    stroke-linecap: round;
}

.cls-front .heart {
    stroke-width: 1;
}

.cls-background{
    fill: var(--color-main-background);
}

.cls-svg-icon, .interrogation {
    fill: var(--color-main-front);
    stroke: var(--color-main-front);
    stroke-width: 1;
}

.cls-svg-icon {
    width: 1em;
}

.flash, .testing .test-flash {
    animation-name: flash;
    animation-duration: 0.5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.wp:not(.active) .wp-controls {    
    display: none;
}

@keyframes flash {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }

}

#events, #house, #statuses, #settings, #users, #sessions {
    position: relative;
    max-width: calc(100vw - 2rem);
}

div#events-spinner, div#statuses-spinner, div#house-spinner, div#login-spinner, div#users-spinner, div#sessions-spinner, div#settings-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
}

#spinner, #modals-spinner {
    overflow: hidden;
    position: fixed;
    width: 300px;
    height: 300px;
    border: none;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    top: 50%;
    right: 50%;
    transform: translate(50%,-50%);
    z-index: 50;
}

div#house-spinner {
    top: 70%;
}

.hide {
    visibility: hidden;
}

.spinner {
    animation: rotate 2s linear infinite;
    z-index: 30;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -35px 0 0 -35px;
    width: 70px;
    height: 70px;
}

.path {
    stroke:rgb(174, 174, 174);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

.no-scrolling {
    height: 100%;
    overflow: hidden;
}

svg.fill-black {
    fill: var(--color-main-background);
}

#backdrop, #backdrop-modals {
    position: fixed;
    z-index: 5;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background:rgba(0, 0, 0, 0.5);
    display: none;
}

#backdrop-modals {
    z-index: 15;
}

.modal:not(.no-show) ~ #backdrop {
    display: block;
}

#modals-spinner:not(.no-show) ~ #backdrop-modals {
    display: block;
}

div.blur {
    width: 100%;
    height: 100%;
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.lines { stroke: var(--color-ok); stroke-width: 1; fill: none}
.markers { stroke: red; fill: transparent; stroke-width: 2 }
.area { stroke: none; fill: var(--color-ok) }
.axis { stroke: var(--color-main-front); stroke-width: 1}
.values { stroke: black; stroke-width: 1; fill: black; font-size: small; }
#graph { max-width: 400px }
#chart svg { width: 50%; }

#snackbar {
    z-index: 20;
    position: fixed;
    background-color: var(--color-darker-front); /*--color-main-background);*/
    border-radius: 30px;
    padding: 2rem;
    text-align: center;
    margin: 3rem 2rem;
    font-weight: 700;
}

#snackbar.error {
    border: 2px solid var(--color-error);
    color: var(--color-error) !important;
    fill: var(--color-error);
}

#snackbar.warning {
    border: 2px solid orange;
    color: orange !important;
    fill: orange;
}

#snackbar.info {
    border: 2px solid var(--color-main-front);
    color: greenyellow !important;
    fill: var(--color-main-front);
}

#snackbar svg {
    width: 2rem;
    stroke: none;
}

svg.error, .error svg {
    fill: var(--color-error);
}

.object, .array {
    font-weight: 700;
    opacity: 1;
}

.object-key {
    font-weight: 700;
    opacity: 1;
}

.object-value {
    font-weight: normal;
    opacity: 0.8;
}

.modal {
    z-index: 10;
    display: flex;
    flex-direction: column;
    position: fixed;
    background-color: var(--color-main-background);
    border: 2px solid var(--color-main-front);
    border-radius: 15px;
    padding: 1rem 1rem;
    text-align: left;
    margin: 2rem 2rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-ok) var(--color-main-background);
    max-height: calc(100vh - 8rem);
}

#users {
    flex-grow: 1;
}

/* Track */
.modal ::-webkit-scrollbar {
    width: 20px;
}
.modal ::-webkit-scrollbar-track {
    border-radius: 15px 0px 15px 0px;
}
   
/* Handle */
::-webkit-scrollbar-thumb {
    background: var(--color-ok); 
    border-radius: 0
}
  
/* Handle on hover */
    ::-webkit-scrollbar-thumb:hover {
    background: #b30000; 
}  

::-webkit-scrollbar-track {
    border: 1px solid var(--color-main-front); 
    border-top: none;
    border-bottom: none;
    border-radius: 0;
}
   
::-webkit-scrollbar-thumb {
    background: var(--color-ok);
}

/* width */
::-webkit-scrollbar {
    width: 20px;
  }
  
/* Track */
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px grey; 
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: var(--color-ok);
    border-left: 1px solid var(--color-main-front);
    border-right: 1px solid var(--color-main-front);
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: var(--color-main-front); 
}

div.buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 1.5em;
    justify-content: flex-start;
}

div.button {
    flex: 1 1 min-content;
    border: 1px solid darkgray;
    border-radius: 0.35em;
    margin: 0.5em 0;
    padding: 0.5em;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: nowrap;    
    align-items: center;

}

div.button div, div.button p {
    padding: 0;
    margin: 0;
    line-height: 1em;
}

div.button:hover {
    background-color: var(--color-darker-front);
}

div.button svg {
    width: 1em;
    height: 1em;
    padding: 0;
    margin: 0 0.5em 0 0;
}

#login-form-type-selector.flex-col > div { 
    border: 1px solid darkgray;
    border-radius: 1em;
    margin: 1em 0;
    padding: 1em 0.5em;
}

#login-form-type-selector.flex-col > div:hover { 
    background-color: var(--color-darker-front);
}

#login-form-type-selector .flex-row {
    justify-content: flex-start;
    flex-wrap: nowrap;
}

#login-form-type-selector svg {
    width: 2em;
    height: 2em;
    margin-right: 1em;
}

#login-form p, #confirmation-form p {
    margin-top: 0;
}

#login-input {
    background-color: rgb(164, 164, 164);
    color: var(--color-main-background);
    border: 1px solid rgb(176, 176, 176);
    border-radius: 2px;
    margin: 0;
    padding: 0.5rem;
}

p#login-error {
    margin: 0.3rem 0;
    font-size: 0.8rem;
    line-height: 0.8rem;
}

#login-button {
    align-self:flex-end;
    margin: 0 0 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

p#login-switch {
    cursor: pointer;
    text-decoration: underline solid;
    font-weight: normal;
    font-size: 0.9em;
    padding: 2em 0 0 0;
    margin: 0 0 0 0;
}

#login-form-form .confirmation-form-buttons {
    justify-content:space-between;
}

#login-form-form .confirmation-form-buttons svg {
    width: 1.5em;
    height: 1.5em;
}

.confirmation-buttons, .confirmation-form-buttons {
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    column-gap: 2em;
    align-items: center;
}

header {
    width: var(--width);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: black;
    color: var(--color-main-front);
    padding: 0.5em 0.5em 0.5em 0;
    text-align: left;
}

header > div > svg {
    height: 2em;
    fill: var(--color-main-front);
    vertical-align: middle;
}


#title {
    vertical-align: middle;
    font-size: 1.5em;
    font-weight: 700;
    padding-left: 0.5em;
}

#interface-choice {
    line-height: 1;
    align-self: flex-start;
    margin-top: 0.5em;
}

html.admin #interface-admin {
    font-weight: 700;
}

html.user #interface-admin {
    cursor: pointer;
    text-decoration: underline;
}

html.user #interface-user {
    font-weight: 700;
}

html.admin #interface-user {
    cursor: pointer;
    text-decoration: underline;
}

section h1 {
    margin: 0.5em 0 0 0;
}

#user { position: relative; }

@media(hover: hover) {
    .menu-item:hover svg {
        fill: black;
    }
    
    .menu-item:hover {
        color: black;
        background-color: var(--color-main-front);
    }
    
    #user:hover .menu {
        display: block;
    }
}

#user:hover .menu.show {
    display: block;
}

.menu-item {
    line-height: 1.5em;
}

.menu {
    position: absolute;
    display: none;
    background-color: black;
    border: 1px solid var(--color-main-front);
    border-radius: 5px;
    margin: 0.5em 0;
    padding: 0;
    right: 0em;
    top: 1.5em;
    z-index: 100;
    white-space: nowrap;
    font-size: 1em;
}

.modal:not(.no-show) ~ header #user-menu {
    display: none !important;
}

.menu svg {
    height: 1em;
}
.menu span {
    padding:  0em 0.75em 0.25em 0.25em;
    vertical-align: middle;
}

#user-name {
    margin: 0.5em 0 ;
    line-height: 1em;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}

p.info, p.error {
    padding: 0;
    margin: 0.3rem 0 0 0;
    line-height: 1em;
}

.bold {
    font-weight: 700;
}

.italic {
    font-style: italic;
}

.info {
    font-size: 0.85em;
    font-style: italic;
}

.error {
    color: var(--color-error);
    font-size: 0.85em;
    font-weight: 700;
}

.form-wrapper {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
}

.form-item {
    display: flex;
    flex-direction: column;
}

.form-item.align-left {
    align-items: baseline;
}

.modal:not(.no-show) ~ #hello {
    border: 10px solid greenyellow

}

.dropdown {
    transform: scaleY(0);
    opacity: 0;
    transform-origin: top;
    transition: all 0.5s;
}

.dropdown.visible {
    transform: scaleY(1.0);
    opacity: 1;
    filter: none;
}

input, textarea, select, button {
    background-color: rgb(164, 164, 164);
    height: 30px;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--color-main-background);
    border: 1px solid rgb(176, 176, 176);
    border-radius: 2px;
    margin: 0.25rem 0 0 0;
    padding: 0.5rem;
}

select {
    padding: 0 0 0 0.5rem;
}

textarea {
    resize: none;
    height: 14em;
    width: 100%;
}

button {
    margin: 0;
    padding: 0 1rem;
    cursor: pointer;
}

input, select {
    max-width: 100%;
}


.flex {
    display: flex;
    gap: 10px;
}

.flex-col {
    flex-direction: column;
}

.full-width {
    width: 100%;
}

.flex-row.justify {
    justify-content: space-between;
}

.flex-row.align-right {
    justify-content: flex-end;
}

.flex-col .align-right {
    align-self: flex-end;
}

.flex-col .align-left {
    align-self: flex-start;
}

.flex-row .align-right {
    justify-self: flex-end;
}

.flex-row.align-left {
    justify-content: flex-start;
}

.flex-row.flex-center {
    align-items: center;
}


/* Spinner animation */
@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.wp:not(.active) .wp-controls {
    display:none;
}

.wp:not(.active.cron-active) #icon-status-schedule {
    display:none;
}

.wp:not(.active.setpoint-active) #icon-status-moisture {
    display:none;
}

.wp:not(.watering) #icon-status-watering, .wp:not(.watering) #wp-stop-watering-button {
    display:none;
}

.wp.watering #wp-water-button {
    display:none;
}

.wp:not(.cron-ok) #schedule-controls .wp-control-item:not(#undefined-schedule) {
    display:none;
}

.wp.cron-ok #schedule-controls .wp-control-item#undefined-schedule {
    display:none;
}

html:not(.admin) .wp:not(.temp-sensor-ok) #moisture-controls .wp-control-item:not(#undefined-moisture) {
    display:none;
}

.wp.temp-sensor-ok #moisture-controls #undefined-moisture {
    display:none;
}

.wp:not(.temp-sensor-ok) #moisture-controls .wp-control-item#setpoint-moisture {
    display:none;
}

.wp.setpoint-ok #moisture-controls .wp-control-item #setpoint-undefined {
    display:none;
}

.wp:not(.setpoint-ok) #moisture-controls .wp-control-item #setpoint-defined {
    display:none;
}

html.admin .only-user {
    display: none;
}
