.device_group {
    clear: both;
    /*background: gainsboro;*/
    background: rgba(220,220,220,0.6);
    border-radius: 25px;
    box-sizing: border-box;
    box-shadow: 1px 1px 5px gray;
    margin: 15px;
    padding: 15px;
    padding-bottom: 0;
    overflow: hidden;
    /*opacity: 0.5;*/
}

.device_group_header {
    font-size: 2em;
    overflow: hidden;
}

.device_group_name {
    float: left;
    font-weight: bold;
}

.sensor_group {
    padding-left: 10px;
    /*overflow: hidden;*/
}

.device_sensor {
    /*float: left;*/
    /*margin: 0 10px;*/
    display: table-cell;
    vertical-align: bottom;
}

.device_sensor_div {
    /*float: right;*/
    display: table-cell;
    vertical-align: bottom;

}

.device_sensor_battery {
    font-size: 0.5em;
    padding-bottom: 4px;
}

.device_sensor img {
    height: 0.8em;
    margin-left: 10px;
}

.device_sensor a {
    text-decoration: none;
    color: black;
}

.temp_config_group {
    /*overflow: auto;*/
    /*clear: both;*/
    font-size: 1.5em;
    float: right;
}

.temp_config_subgroup {
    float: right;
    /*background: darkgray;*/
    margin-right: 5px;
    /*margin-top: 5px;*/
    /*overflow: auto;*/
    /*border-radius: 5px;*/
    padding: 5px;
    line-height: 25px;
    font-size: 1.5em;
    /*overflow: hidden;*/
}

.temp_input {
    /*width: 40px;*/
    font-size: 0.8em;
    margin: 5px;
    margin-right: 10px;
    float: left;
    cursor: pointer;
    /*margin-bottom: 10px;*/
}

.settings {
    width: 20px;
    height: 20px;
    float: left;
    background: url(img/settings_icon.png) no-repeat center;
    background-size: contain !important;
}

.devices {
    overflow: hidden;
    /*margin-top: 5px;*/
}

.device {
    width: 125px;
    /*height: 200px;*/
    /*background: gainsboro;*/
    float: left;
    margin: 15px;
    /*padding: 15px;*/
    /*border-radius: 25px;*/
    box-sizing: border-box;
    position: relative;
    text-align: center;
    /*box-shadow: 1px 1px 5px gray;*/
}

.device_name {
    text-align: center;
    font-size: 1.5em;
    /*font-weight: bold;*/
}

.device_status {
    text-align: center;
    height: 75px;
    width: 100%;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.temp_config {
    float: left;
    cursor: pointer;
    margin: 0;
    height: 35px;
    width: 35px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    line-height: 35px;
    text-align: center;
    color: white;
    font-size: 0.35em;
}

.temp_off {
    background: url(img/temp_2_off.png);
}

.temp_on {
    background: url(img/temp_2_on.png);
}

.change_device, .off_device {
    cursor: pointer;
}

.buttons {
    position: absolute;
    right: 15px;
    top: 0;
}

.link_btn {
    background: gray;
    color: white;
    text-transform: uppercase;
    padding: 5px;
    margin: 0 5px;
    border-radius: 3px;
    text-decoration: none;
    float: left;
    border: none;
    cursor: pointer;
}

#last_update {
    font-size: 0.7em;
    color: white;
}

/* TEMP SETTIGNS */
.settings {
    cursor: pointer;
}

.dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #aaaaaa;
    overflow: hidden;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 1px 1px 5px black;
}

.slider {
  width: 400px; /* Full-width */
  height: 20px; /* Specified height */
    margin: 10px;
}

/*input[type=range]::-webkit-slider-runnable-track {*/
  /*background: #3071a9;*/
  /*border: 1px solid #010101;*/
  /*border-radius: 1px;*/
  /*width: 100%;*/
  /*height: 20px;*/
  /*cursor: pointer;*/
/*}*/

/*#brightness_value, #target_value {*/
    /*font-size: 1.5em;*/
    /*text-align: center;*/
/*}*/

/*input[type=submit].link_btn {*/
    /*margin: 3px;*/
    /*float: right;*/
    /*font-size: 1.2em;*/
    /*background: dimgray;*/
/*}*/

.settings_header {
    margin-top: 10px;
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 30px;
}

/* LOGI */
.log_table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}

.log_table th, .log_table td {
    border: 1px solid black;
    padding: 5px;
}

.log_table th {
    background: gainsboro;
}

.log_table img {
    width: 35px;
    margin: 0 auto;
    display: block;
}

.pagination {
    text-align: center;
    margin-top: 10px;
}

.pagination a {
    background: gray;
    display: inline-block;
    color: white;
    height: 25px;
    width: 25px;
    line-height: 25px;
    margin: 0 5px;
    border-radius: 3px;
    text-decoration: none;
}

/* pogoda */
#clock {
    font-weight: bold;
    text-align: left;
    white-space: nowrap;
    color: white;
}

#time div {
    display: inline-block;
}

#seconds {
    font-size: 0.7em;
}

#temp, #pressure {
    display: inline-block;
}

#temp {
    margin-left: 1.5em;
}

#weather {
    text-align: left;
    background: rgba(220,220,220,0.6);
    border-radius: 25px;
    box-shadow: 1px 1px 5px gray;
    padding-left: 15px;
    line-height: 1.5em;
    position: relative;
}

#weather img {
    height: 1.5em;
    width: 1.5em;
    position: absolute;
    bottom: 0;
}

/* wykres */
.chart {
    width: 1800px;
    height: 900px;
}

.range_btn {
    padding: 5px 10px;
    background: gainsboro;
    border-radius: 15px;
    cursor: pointer;
    float: left;
    margin: 5px;
}

.active_btn {
    box-shadow: 1px 1px 3px black;
    color: rgba(0,0,255,0.6);
}

/* logowanie */
#login_form {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#login_form label {
    font-weight: bold;
    font-size: 1.5em;
}

#login_form input, #settings_dialog input[type=text] {
    border-radius: 10px;
    border-style: solid;
    border-color: dimgray;
    padding: 5px;
    font-size: 1.5em;
}

#login_form input[type=submit] {
    padding: 5px 25px;
    cursor: pointer;
    background: #0099ff;
    color: white;
}

.center {
    text-align: center;
}

.error_msg, .info_msg {
    text-align: center;
    font-size: 1.5em;
    padding: 10px;
    border-radius: 5px;
}

.info_msg {
    background: #ffffc4;
    border: 1px solid #ffff4d;
}

.error_msg {
    background: #ff9999;
    border: 1px solid #ff4d4d;
}

.offline, .offline a {
    color: silver !important;
}


/* rules */
.rules {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.rules td, .rules th {
    border: 1px solid black;
    text-align: center;
}

.rules th {
    background: dimgray;
    color: white;
}

.rules td {
    background: lightgray;
}

.rule_true, .rule_false, .rule_add, .rule_delete {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url(img/on.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.rule_false {
    background-image: url(img/off.png);
}

.rule_add {
    background-image: url(img/Plus.png);
    cursor: pointer;
}

.rule_delete {
    background-image: url(img/false.png);
    cursor: pointer;
}

.rule_form {
    display: none;
    margin-bottom: 10px;
}

.rule_form_buttons {
    text-align: center;
}

.device_group_header {
    background: rgba(200, 200, 200, 0.5);
    padding-right: 5px;
    /*border-radius: 5px;*/
    padding-left: 15px;
    margin-left: -15px;
    margin-right: -15px;
    overflow: auto;
}

.device_group_header {
    padding-top: 5px;
    padding-bottom: 5px;
}

.device_group_header {
    margin-top: -15px;
}

.flood_status {
    float: left;
    width: 25px;
    height: 25px;
    margin-right: 5px;
    background: crimson;
    border-radius: 35px;
    color: white;
    line-height: 25px;
    text-align: center;
    font-size: 0.5em;
}

.flood_ok {
    background: green;
}

.additional_sensors_group {
    background: rgba(170, 170, 170, 0.5);
    border-top-left-radius: 50px;
    float: right;
    padding-left: 20px;
}

.additional_sensors_group_container {
    overflow: auto;
    clear: both;
    margin-right: -15px;
}

.additional_sensors {
    float: right;
    clear: both;
}

.additional_sensors .device_sensor {
    font-size: 1.3em;
    float: right;
    margin-right: 10px;
    line-height: 25px;
    margin-bottom: 5px;
}

.device_sensor_name {
    font-size: 0.8em;
    float:left;
    margin-right: 10px;
}




@media (max-width: 1600px) {
    .chart {
        width: 1500px;
        height: 740px;
    }
}

@media (max-width: 1400px) {
    .chart {
        width: 1300px;
        height: 650px;
    }
}

@media (max-width: 600px) {
    .device_group_header {
        font-size: 1.4em;
    }

    .device_sensor_battery {
        padding-bottom: 2px;
    }

    .device_sensor img {
        height: 20px;
    }

    .device_sensor_battery img {
        height: 10px;
    }

    .device {
        width: 60px;
        margin: 10px;
    }

    .device_name {
        font-size: 0.9em;
    }

    .log_table {
        font-size: 0.65em;
    }

    .log_table img {
        width: 20px;
    }

    .rules {
        width: 90%;
        margin: 0 auto;
    }

    .chart {
        width: 375px;
    }

    #login_form label {
        font-size: 1em;
    }

    #login_form input, #settings_dialog input[type=text] {
        font-size: 1em;
    }

    .temp_input {
        /*width: 40px;*/
        font-size: 0.7em;
        margin: 0;
        margin-left: 5px;
        margin-right: 5px;
        /*margin-bottom: 10px;*/
    }

    .temp_config_subgroup {
        line-height: 35px;
        /*overflow: hidden;*/
    }
}