* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: beige;
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
    /* display: flex;
    align-items: center;
    justify-content: center; */
}

.page-content {
    width: 100%;
    height: calc(100% - 70px);
}

.checkbox {
    display: none;
}

.checkbox + label {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 42px;
    background: linear-gradient(to right, #fd1a15 0, #fc8b34 45%, #7fd03e 55%, #007740 100%) 0 0;
    background-size: 250px 100%;
    border-radius: 70px;
    padding: 5px;
    cursor: pointer;
    transition: all 500ms ease;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.2) inset;
    margin-bottom: 5px;
}

.checkbox + label > span {
    display: block;
    margin-left: 85px;
    white-space: nowrap;
    line-height: 14px;
    font-size: 22px;
}

.checkbox + label > span > span {
    display: inline-block;
    width: 90px
}

.checkbox + label:before {
    content: "Off";
    width: 34px;
    height: 34px;
    position: absolute;
    left: 5px;
    top: 4px;
    border-radius: 100%;
    background: #fff;
    text-align: center;
    line-height: 34px;
    font-family: "Cabin", sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #fd1a15;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: left 500ms ease, color 500ms ease, -webkit-transform 150ms ease;
    transition: left 500ms ease, color 500ms ease, transform 150ms ease;
    transition: left 500ms ease, color 500ms ease, transform 150ms ease, -webkit-transform 150ms ease;
}

.checkbox + label:active:before {
    -webkit-transform: scale(0.95);
    transform: scale(0.95);
}

.checkbox:checked + label {
    background-position-x: -150px;
}

.checkbox:checked + label:before {
    content: "On";
    color: #007740;
    left: 40px;
}

.checkbox:disabled + label:before,
.checkbox:disabled + label span {
    color: #5a5a5a;
}

.checkbox:disabled + label {
    background: #5a5a5a;
}

.checkbox + label span.start-time {
    font-size: 16px;
    line-height: 16px;
    bottom: 0px;
    /*  position: absolute*/;
    margin-top: 5px;
}


.mainPumpAlarm {
    display: none;
}

.mainPumpAlarm + label {
    display: inline-block;
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(to right, #7fd03e 0, #007740 45%, #fd1a15 55%, #fc8b34 100%) 0 0;
    background-size: 250px 100%;
    border-radius: 70px;
    padding: 5px;
    cursor: pointer;
    transition: all 500ms ease;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.2) inset;
    margin-bottom: 10px;
}

.mainPumpAlarm + label span {
    width: 200px;
    display: block;
    margin-left: 85px;
    white-space: nowrap;
    line-height: 30px;
    font-size: 22px;
}

.mainPumpAlarm + label:before {
    content: "";
    width: 40px;
    height: 40px;
    position: absolute;
    left: 5px;
    top: 5px;
    border-radius: 100%;
    /* background: #fff; */
    text-align: center;
    line-height: 40px;
    font-family: "Cabin", sans-serif;
    font-size: 15px;
    font-weight: bold;
    color: #fd1a15;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: left 500ms ease, color 500ms ease, -webkit-transform 150ms ease;
    transition: left 500ms ease, color 500ms ease, transform 150ms ease;
    transition: left 500ms ease, color 500ms ease, transform 150ms ease, -webkit-transform 150ms ease;
}

.mainPumpAlarm + label:active:before {
    -webkit-transform: scale(0.95);
    transform: scale(0.95);
}

.mainPumpAlarm:checked + label {
    /* background-position-x: -150px; */
    animation: alarm 0.3s linear 0s infinite alternate;
}

@keyframes alarm {
    from {
        background: red;
    }
    to {
        background: yellow;
    }
}

.mainPumpAlarm:checked + label:before {
    content: "";
    color: #770000;
    left: 55px;
}



.checkbox + label > span > .quantity-deviation {
    display: inline;
    color: red;
}

.scheduler-tasks {
    border-collapse: collapse;
}

.scheduler-tasks td, .scheduler-tasks th {
    border: 1px solid gray;
}

.login {
    padding: 2em;
    display: grid;
    grid-template-columns: 1fr;
    grid-row-gap: 1em;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.login input {
    font-size: 1.5em;
    padding: 0.5em 1em;
    width: 100%;
}

.login-title {
    padding: 2em;
    text-align: center;
}

form > div {
    border: 3px solid rosybrown;
    padding: 5px;
    overflow: hidden;
}

input.hidden + label,
input.hidden + label + br {
    display: none;
}

.level {
    display: inline-block;
    border: 0;
    padding: 0;
    width: 200px;
    margin: 8px;
}

.level .content {
    background-color: blue;
    width: 80px;
    border: 0;
    padding: 0;
}

.level .label {
    color: blue;
    width: 200px;
    border: 1px solid blue;
}

.level .label span {
    content: "0%";
    display: block;
    text-align: center;
    font-size: 30px;
    padding: 0 10px;
    color: rgb(255, 255, 0);
    mix-blend-mode: difference;
}

.settings-page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.settings-navigation {
    width: 340px;
    margin: 0 auto;
    text-align: center;
}

.settings-navigation-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;

}

.settings-navigation-list li {
    margin: 10px 0;
    background-color: #96e9fc;
}

.settings-navigation-list .navigation-item {
    display: block;
}

#lock {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: none;
    cursor: not-allowed;
    background: rgba(200, 0, 0, 0.15);
}


#watering {
    width: 500px;
    margin: 0 auto;
}

.current-chart-data {
    border-collapse: collapse;
    margin: 30px auto;
}
.current-chart-data td {
    border: 1px solid grey;
    padding: 5px;
}

.history {
        text-transform: uppercase;
        text-decoration: none;
        font-weight: bold;
        color: #000;
        padding: 10px 25px;
        transition: all .2s;
        letter-spacing: 2px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
        white-space: nowrap;
        margin: 20px auto;
        display: block;
}


@media only screen and (min-width: 600px) {

    form.relays {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(420px, auto));
    }

}



@media only screen and (max-width: 1000px) {

    .page-content {
        padding-top: 60px;
        height: 100%;
    }

    .checkbox + label > span {
        width: 240px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .login-title {
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
        font-size: 1.5em;
    }

    #watering {
        padding: 5px 10px;
        width: auto;
    }

    .hide-on-mobile {
        display: none;
    }
}

