* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

body {
    font-family: Arial, sans-serif;
}

.wrapper {
    display: flex;
    flex-direction: column;
}

.pruh {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    padding: 10px;    
    border-bottom: 1px solid #ddd;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
}

.box {    
    background-color: #e0e0e0;
    border: 1px solid #ddd;
    margin: 10px;
    padding: 20px;
    text-align: left;
    flex: 1;
    min-width: calc(25% - 20px);
    min-height: 380px;
}

.n1 {
    margin-bottom: 5px;
    font-weight: bold;
}

@media screen and (min-width: 651px) and (max-width: 1250px) {
    .box {
        flex: 0 0 calc(50% - 20px);
    }
}

@media screen and (max-width: 650px) {
    .box,
    .box-with-nested {
        flex: 0 0 calc(100% - 20px);
    }
}

@media screen and (min-width: 1251px) {
    .box {
        flex: 0 0 calc(33.3333% - 20px); /* 3 boxy vedle sebe na velkých obrazovkách */
    }
}

.box-with-nested {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nested-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 10px 0;    
    margin-bottom: 0; 
}

.nested-box {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    margin: 10px 0;
    padding: 10px;
}

.half {
    flex: 0 0 calc(50% - 10px);
    margin-right: 10px;
}

.third {
    flex: 0 0 calc(33.3333% - 13.3333px);
    margin-right: 10px;
}

.nested-box:last-child {
    margin-right: 0;
}

.red-background {
  background-color: #FFD6D6;
}

.blue-background {
  background-color: #D6E3FF;
}

.green-background {
  background-color: #DCF5DC;
}

.purple-background {
  background-color: #F0D6FF;
}

.yellow-background {
  background-color: #FFF5CC;
}

.orange-background {
  background-color: #FFE4CC;
}

.sand-background {
  background-color: #F3E2CC;
}

.tooltip {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 8px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    border-radius: 4px;
    left: 5%;
    top: 20px;
    z-index: 1000;
}

.nested-box.third:hover .tooltip {
    visibility: visible;
    opacity: 1;
    display: block;    
}


// tady zacinaji apple-style tlacitka

/* toto je verze vedle sebe - ale neucesana
/* Stylování pro switch-container pomocí CSS Grid */
.switch-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

/* Stylování pro každý switch-wrapper */
.switch-wrapper {
    text-align: center;
    box-sizing: border-box;
}

/* Stylování pro Apple-style přepínač */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch .toggle {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider (pozadí přepínače) */
.switch label {
    position: absolute;    
    cursor: pointer;
    background-color: #ccc;
    border-radius: 28px;
    width: 100%;
    height: 100%;
    margin-left: -20px;
    transition: background-color 0.4s;
}

/* Knoflík přepínače */
.switch label:before {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s;
}

/* Změna barvy pozadí při zaškrtnutí */
.switch .toggle:checked + label {
    background-color: #66bb6a;
}

/* Posunutí knoflíku doprava při zaškrtnutí */
.switch .toggle:checked + label:before {
    transform: translateX(22px);
}

/* Styl pro název zařízení pod přepínačem */
.switch-wrapper span {
    display: inline-block;
    margin-top: 10px;
    align: center;
    //margin-left: -5px;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
}

/* Použijeme specifičtější selektory */
.box .switch-container {
    display: flex !important;
    flex-wrap: wrap;
    width: 100%;
}

.box .switch-container .switch-wrapper {
    width: calc(25% - 20px);
    margin: 10px;
    margin-top: 20px;
    box-sizing: border-box;
    text-align: center;
}

/* styl prouzku spotreby bojleru */
#prouzek-container {
    width: 100%;
    height: 20px;
    background-color: #F5F5F5;
    border: 1px solid #DDDDDD;
    position: relative;
}

#prouzek-inner {
/*    background-color: #91DF91;*/
    background-color: #66BB6A;
    height: 100%;
    width: 0; /* Tady bude dynamicky nastavena šířka podle spotřeby */
}
        
/* Svislá čára uprostřed proužku */
#divider {
    position: absolute;
    left: 50%; /* Umístění čáry do středu šířky */
    top: 0;
    width: 1px;
    height: 100%; /* Plná výška proužku */
    background-color: #DDD;
    z-index: 2; /* Aby byla čára vždy nad obsahem */
}        
