html, body {
    padding: 0;
    margin: 0;
    color: #565656;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: #f7f7f7;
    font-size: 16px;
}

.pure-img-responsive {
    max-width: 100%;
    height: auto;
}

p {
    margin-bottom: 15px;
    margin-top: 0;
}

.box > p:last-child {
    margin-bottom: 0;
}

/**
 * Links
 */
a:link {
    color: rgb(0 0 238);
    text-decoration-color: #bbf;
}

a:visited {
    color: rgb(78 33 134);
    text-decoration-color: #d0b8ee;
}

a:active, a:active:hover{
    color: rgb(238 0 0);
    text-decoration-color: #fbb;
}

a:link:hover {
    text-decoration-color: rgb(0 0 238);
}

a:visited:hover {
    text-decoration-color: rgb(78 33 134);
}

/*
 * Layout
 */

.layout,
.menu,
.hamburger {
    transition: all 0.2s ease-out;
}

.layout {
    position: relative;
    left: 0;
    padding-left: 0;
}

.layout.active .menu {
    left: 170px;
    width: 170px;
}

.layout.active .hamburger {
    left: 170px;
}

.header {
    margin: 0;
    padding: .5em;
    color: black;
    height: 1.9em;
    border-bottom: 1px solid rgb(0 0 0 / 10%);
}

.header svg {
    float: left;
    margin-right: 0.6em;
    height: 1.9em;
    width: 1.9em;
    fill: #1A7CBD;
}

.header svg use {
    height: 1.9em;
    width: 1.9em;
}

.header h1 {
    margin: 0;
    padding: 0;
    font-size: 1.7em;
    font-weight: 300;
    color: #5c5c5c;
}

.hamburger {
    position: fixed;
    display: block;
    top: 0;
    left: 0;
    z-index: 10;
    height: 1.9em;
    width: 1.9em;
    padding: 0.5em;
    border-right: 1px solid rgb(0 0 0 / 10%);
    border-bottom: 1px solid rgb(0 0 0 / 10%);
    background: #f7f7f7;
}

.hamburger svg {
    float: left;
    height: 1.9em;
    width: 1.9em;
    fill: #5c5c5c;
}

.footer {
    font-size: small;
    text-align: right;
    margin-right: 0.8em;
    padding-bottom: 0.8em;
}

/*
 * Menu
 */

.menu {
    margin-left: -170px;
    width: 170px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    background: #5c5c5c;
    overflow-y: auto;
}

.menu a {
    color: #fff;
    border: none;
    padding: 0.6em 0 0.6em 0.6em;
}

.menu .pure-menu,
.menu .pure-menu ul {
    border: none;
    background: transparent;
}

.menu .pure-menu li a:hover,
.menu .pure-menu li a:focus {
    background: #424242;
}

.menu .pure-menu li a:active {
    background: #383838;
    color: white;
}

.menu .pure-menu-selected {
    background: #757575;
}

.menu .pure-menu-selected a {
    color: #fff;
}

.pure-menu-heading {
    color: rgb(255 255 255 / 80%);
    font-size: smaller;
}

.menu .title {
    background: #1A7CBD;
    font-size: 120%;
    color: #fff;
    margin: 0;
    text-transform: none;
}

.menu .title:active {
    color: #d3d3d3;
}

.menu .language {
    margin: 0.6em 0 0.6em 0.6em;
    border: 0;
    width: 9em;
    box-shadow: none;
}

/*
 * Menu Responsive styles
 */

@media (width >= 41em) {
    .layout {
        padding-left: 170px;
        left: 0;
    }

    .menu {
        left: 170px;
    }

    .hamburger {
        position: static;
        left: 170px;
        display: none;
    }

    .layout.active .hamburger {
        left: 170px;
    }
}

@media (width <= 41em) {
    .header {
        padding-left: 3.8em;
    }

    .header .page-icon {
        float: right;
    }

    .layout.active {
        position: relative;
        left: 170px;
    }
}

/**
 * Mode
 */
@media (width >= 41em) {
    .mode-form {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

@media (width <= 41em) {
    .mode-form {
        grid-template-columns: 1fr 1fr;
    }
}

.mode-form {
    display: grid;
    grid-gap: .5em;
}

.mode-color-form {
    display: inline-grid;
    grid-gap: .5em;
    margin-bottom: 1em;
    grid-template-columns: 1fr 1fr;
}

.radio-select {
    border: 2px solid #eee;
    border-radius: .4em;
    cursor: pointer;
    padding: .4em;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.radio-select:hover {
    border: 2px solid #d1d1d1;
    background: #f8f8f8;
}

.radio-select input[type='radio'] {
    position: fixed;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.radio-select svg {
    width: 2em;
    height: 2em;
    display: block;
    margin: auto;
}

.radio-select:has(input[type='radio']:checked) {
    border: 2px solid #1a7cbd;
    background: #1a7cbd;
    box-shadow: inset 0 0 0 2px white;
    color: white;
}

.radio-select:has(input[type='radio']:checked) svg {
    filter: brightness(0) invert(1);
}

/**
 * Misc.
 */

.color-area {
    height: 40px;
    width: 100%;
    background: gray;
    margin-bottom: 15px;
    margin-top: 10px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 30%);
}

.pure-g.colors > div {
    box-sizing: border-box;
    padding: 0.3em;
}

.pure-g.colors button {
    width: 100%;
    height: 40px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 30%);
}

/**
 * Forms / Radio
 */

label.pure-radio {
    padding: 5px;
    display: inline-block;
}

label.pure-radio input[type="radio"] {
    margin-top: -14px;
    display: inline-block;
}

/**
 * Slider
 */

input[type="range"],
input[type="range"]:focus,
input[type="range"]:active,
input[type="range"]::-moz-focus-inner,
input[type="range"]:-moz-focusring,
input[type="range"]::-moz-focus-outer{
    border: 0;
    outline: none;
}


input[type="range"] {
    appearance: none;
    margin-top: 8px;
    margin-bottom: 8px;
    height: 20px;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    cursor: pointer;
    background: #ddd;
    border: none;
    border-radius: 100px;
    box-shadow: inset 0 1px 1px 0 rgb(0 0 0 / 30%);
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    height: 28px;
    width: 28px;
    margin-top: -11px; /* ios Safari needs this to correctly position the thumb/knob */
    border-radius: 200px;
    background: linear-gradient(to bottom, rgb(255 255 255 / 100%) 0%, rgb(235 235 235 / 100%) 100%);
    box-shadow: 0 1px 1px rgb(0 0 0 / 30%), inset 0 0 0 1px rgb(255 255 255 / 90%);
    border: 1px solid rgb(0 0 0 / 30%);
    cursor: pointer;
    appearance: none;
}

input[type="range"]::-moz-range-track {
    height: 6px;
    background: #ddd;
    border: none;
    border-radius: 100px;
    box-shadow: inset 0 1px 1px 0 rgb(0 0 0 / 30%);
    appearance: none;
}

input[type="range"]::-moz-range-thumb {
    height: 28px;
    width: 28px;
    border-radius: 200px;
    background: linear-gradient(to bottom, rgb(255 255 255 / 100%) 0%, rgb(235 235 235 / 100%) 100%);
    box-shadow: 0 1px 1px rgb(0 0 0 / 30%), inset 0 0 0 1px rgb(255 255 255 / 90%);
    border: 1px solid rgb(0 0 0 / 30%);
    cursor: pointer;
    appearance: none;
}

.slider-label {
    margin-top: 11px;
    margin-bottom: 4px;
    display: inline-block;
    width: 100%;
}

.slider-label .value {
    float: right;
    margin-left: 15px;
}

/**
 * Settings
 */

.status.online {
    color: green;
}

.status.offline {
    color: red;
}

@media only screen and (width <= 480px) {
    .pure-form-aligned input, .pure-form-aligned select, .pure-form-aligned textarea, .pure-form-message-inline {
        width: 100%;
    }
}

/**
 * Box
 */

.box {
    padding: 1em;
    margin: 0.8em;
    box-shadow: 0 1px 1px 0 rgb(60 64 67 / 8%),0 1px 3px 1px rgb(60 64 67 / 16%);
    background: #fff;
    border-radius: 0.4em;
    text-align: justify;
    hyphens: auto;
}

.box h2 {
    margin-top: -5px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.6em;
    margin-left: -1em;
    margin-right: -1em;
    padding-right: 1em;
    padding-left: 1em;
    font-weight: normal;
    font-size: 1.1em;
}

.color-picker {
	width: 300px;
	margin: auto;
}

.pure-button {
    background-color: #1A7CBD;
    border-radius: 2em;
    color: white;
}

.pure-form input[readonly],
.pure-form select[readonly],
.pure-form textarea[readonly] {
    background-color: #E8E8E8;
    color: #666;
    border-color: #ccc;
}

.pure-control-group-switch label {
    text-align: right;
    display: inline-block;
    vertical-align: middle;
    margin: 0 1em;
}

.radio-wrapper {
    white-space: nowrap;
}

/*
 * Switch
 */
.pure-form-aligned .pure-control-group label.switch {
    width: 60px;
}

.switch {
    position: relative;
    display: inline-block;
    height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The Toggle slider */
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider::before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #1f8dd6;
}

input:focus + .slider {
    box-shadow: 0 0 1px #1f8dd6;
}

input:checked + .slider::before {
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round::before {
    border-radius: 50%;
}

.IroWheelBorder, .IroSliderGradient { /* stylelint-disable-line selector-class-pattern */
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 50%) !important;
    border: none !important;
}

.swatch-grid {
    display: grid;
    grid-template-columns: repeat(4, 68px);
    grid-template-rows: repeat(2, 50px);
    grid-gap: 10px;
    margin-top: 1em;
    margin-bottom: 1em;
    justify-content: center;
}

.swatch {
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 50%);
    border-radius: 4px;
    cursor: pointer;
}

/**
 * Sections
 */

.section, .section-connection-lost {
    display: none;
}

.section-connection-lost .box {
    background: #ffe9e9;
    color: #a94442;
    text-align: center;
    border: 1px solid #e0b2b2;
    box-shadow: none;
    min-height: 2.3em;
}

@media (width <= 41em) {
    .section-connection-lost .box {
        margin-left: 3.8em;
    }
}

.section-connection-lost .status-button {
    float: right;
    color: #fff;
    border-radius: 2em;
    background-color: #d9534f;
    border-color: #d9534f;
    margin-left: 20px;
}

.section-main {
    display: block;
}

.box-color {
    text-align: center;
}

.box-debug {
    overflow: hidden;
    overflow-wrap: break-word;
}

.box-debug > div{
    font-family: monospace;
}

.brightness, .speed, .functions-settings, .leds, .position {
    display: none;
}
