/* konstanty */
:root {
  --color1: #337ab7;
  --color2: #69a8d9;
  --color3: #80b0d4;
  --color4: #656c6e;
  --sidebar-width: 270px;
  --breakpoint-tabulka: 1300px;
}

/* PRO UPRAVU LAYOUTU TABULKY PREJDI NIZE DO SEKCE LAYOUT TABULKY - TAM JSOU VSECHNY SIRKY + JE I JS FUNKCE V INDEX.PHP NA MIN-WIDTH TABULKY PRO DESKTOP*/

/* Obecné styly */

* {
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  /* background-color: #f4f4f4; */
  margin: 0;
  /* padding: 20px; */
  text-align: center;
}

body::before {
  content: "";
  position: fixed; /* Nebo absolute pokud chceš jen přes body */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(lib/106174.jpg);
  background-position: center center;
  background-size: cover;
  opacity: 0.6;
  z-index: -1;
}

.znacka img[alt="ADAPTA"] {
  height: 49px;
}
.znacka img[alt="INTEGRA Plus stojící"] {
  height: 49px;
}

.nejsou_vysledky_btn {
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
}

.zahlavi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* max-width: calc(100vw - 21px); */
}

.zahlavi h1 {
  color: var(--color4);
  font-size: 24px;
  font-weight: 500;
}

/* Stylování tabulky */
table {
  width: 100%;
  border-collapse: separate; /* Umožní mezery mezi buňkami */
  border-spacing: 2px; /* Mezera mezi buňkami */
  background: white;
}

th,
td {
  padding: 3px;
  text-align: center;
  background: #f9f9f9; /* Světle šedé pozadí pro jemnější vzhled */
  border: none; /* Odstraní klasické hranice */
}

td.funkce_nazev {
  padding: 5px;
  font-weight: 500;
  position: relative;
}

th {
  background: #0073e6;
  color: white;
}

/* První sloupec s funkcemi */
td:first-child,
th:first-child {
  width: 220px; /* Nastav požadovanou šířku */
  white-space: nowrap; /* Zabrání rozšiřování kvůli zalomení textu */
  text-align: left; /* Zarovná text vlevo pro lepší čitelnost */
  background: var(--color1); /* Světle modré pozadí */
}

/* ANO / NE buňky */
.tab-ano {
  /* background: #e5f2e5; */
  color: #155724;
}

.tab-ne {
  /* background: #f4e5e5; */
  color: #721c24;
}

/* Řádky tabulky */
tbody tr:nth-child(odd) td:first-child {
  background-color: #fbfbfb;
}

tbody tr:nth-child(even) td {
  background-color: #fff;
}

tr.foto td {
  background-color: white !important;
}

/* Obrázky v tabulce */
img:not(.logo) {
  max-height: 19px;
  vertical-align: middle;
}

/* Odkazy */
a {
  color: #0073e6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Styl pro značky */
.znacka img {
  height: 40px;
  width: auto;
  max-height: unset;
  object-fit: contain;
}

.znacka.znacka-watergate {
  background-color: var(--color1);
}

.znacka.znacka-geberit {
  background-color: var(--color2);
}

.znacka.znacka-laufen {
  background-color: var(--color3);
}

/* tr:nth-child(even) {
  background-color: #f9f9f9;
} */

/* nadpisy */
th {
  font-size: 14px;
}
/* popisky funkcí */
td.funkce_nazev {
  font-size: 13px;
  /* min-width: 126px; */
}
/* data */
td {
  font-size: 12px;
}

/* prvni sloupec - moznost zuzeni */
tr > th:first-child {
  max-width: 210px;
}

/* sticky zahlavi */

.sticky2 th,
.sticky3 th {
  position: sticky;
  z-index: 1000;
}

.sticky2 th {
  top: 0;
}

.sticky3 th {
  top: 26px;
  width: 10px;
  padding: 5px;
}

#resetovaci_tlacitko {
  color: #e44344;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
  margin-top: 15px;
}

.resetovaci_tlacitko__dole {
  margin-top: 14px;
}

#filterButtons {
  display: flex;
  padding: 7px;
  gap: 11px;
}

/* FILTER FORM */

#closeButton {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 62px;
  cursor: pointer;
  display: flex;

  width: 35px;
  height: 35px;
}

#closeButton svg {
  width: 35px;
  height: 35px;
}

#filterForm {
  margin: 0 auto;
  text-align: left;
  padding: 20px;
}
.funkce-item,
.model-item {
  margin: 5px 0;
}

.model-item,
.funkce-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.model-item *,
.funkce-item * {
  cursor: pointer;
}

.model-item {
  margin: 0;
  margin-bottom: 4px;
}

/* CHECKBOXY */
/* Skrytí původního checkboxu */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 15px;
  height: 15px;
  border: 2px solid var(--color1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

/* Styl při najetí myší */
input[type="checkbox"]:hover {
  border-color: var(--color1);
}

/* Efekt při zaškrtnutí */
input[type="checkbox"]:checked {
  background-color: var(--color1);
  border-color: var(--color1);
}

/* Přidání ikony zaškrtnutí pomocí Feather Icons */
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 51%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>');
  background-size: contain;
  background-repeat: no-repeat;
}

/* --- */

body.filtr_form {
  background-color: #f4f4f4;
}

.filtr-znacka {
  display: flex;
  gap: 17px;
  align-items: start;
  flex-wrap: wrap;
}

/*  */

.filtr-znacka h4 {
  margin: 0;
  font-size: 13px;
}

.model-item label {
  font-size: 13px;
  font-weight: 500;
}

.model > h4 {
  margin-bottom: 6px;
}

/* .filtr-znacka > h4:not(:first-child) {
  margin-top: 20px;
} */

/* .filtr-znacka .model-item__nomodel:last-child {
  margin-top: 20px;
} */

.filtr_dle_modelu_sekce {
  margin-top: 35px;
}

.filtr_btns {
  margin-bottom: 20px;
  margin-top: -20px;
}

/* Ujistit se, že checkboxy mají pevnou velikost */
input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px;
  min-height: 17px;
  max-width: 17px;
  max-height: 17px;
  flex-shrink: 0; /* Zabrání zmenšení checkboxu ve flex kontejnerech */
}

/* vyhledat */
.filtr_dle_funkci__vyhledat {
  position: relative;
  width: 100%;
  max-width: 300px; /* Maximální šířka inputu */
  margin-bottom: 14px;
}

#searchInputFunkce {
  width: 100%;
  padding: 10px 15px;
  font-size: 16px;
  border: none;
  outline: none;
  transition: all 0.3s ease-in-out;
  font-family: "Montserrat", sans-serif;
  border-bottom: 1px solid var(--color1);
}

table {
  overflow-x: auto;
}

/* REDESIGN */

.sticky3 th:not(:first-child) {
  font-size: 14px;
  font-size: 12px;
  font-weight: 500;
}

.tabulka__zahlavi > th:first-child,
.tabulka__zahlavi > td:first-child {
  font-size: 13px;
}

.tab__poznamka {
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  color: #555;
  margin-top: 3px;
  display: inline-block;
}

#mainContent {
  padding: 12px;
  padding-top: 0;
}

.zahlavi {
  padding: 2px 15px;
}

.sticky3 th:not(:first-child),
tr.radek_funkce td:not(:first-child) {
  max-width: 70px;
}

.body_container {
  display: flex;
  /* justify-content: center; */
}

.filtry_sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  position: relative;
  background-color: #f9f9f9;
  border-right: 1px solid #d3d3d3;
}

#filterForm h3 {
  margin: 0;
  margin-bottom: 10px;
  font-size: 16px;
}
#filterForm h2 {
  margin: 0;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 500;
}

.model-item.model-item__nomodel + div.model {
  margin-top: 4px;
}

.funkce-item label {
  font-size: 13px;
  font-weight: 500;
}

.body_container {
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
}

.body_container.sidebar-open {
  transform: translateX(0) !important;
}

.menu-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 10px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  cursor: pointer;
}

.eshop-btn,
.menu-toggle {
  font-weight: 500;
  background: var(--color4);
  color: #ffffff;
  margin: 0.5rem 0.25rem 0.5rem 0;
  white-space: nowrap;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--color4);
}

.eshop-btn:hover {
  text-decoration: none;
}

.menu-toggle svg,
.eshop-btn svg {
  width: 19px;
  margin-bottom: -2px;
}

.menu-toggle i {
  color: var(--color1);
}

.nejsou_vysledky {
  text-align: left;
}

.tabulka_container {
  display: inline-block;
  max-width: max-content;
  text-align: left;
}

.poznamkaPodTabulkou {
  font-size: 13px;
}

.funkce_nazev__barva {
  position: absolute;
  width: 3px;
  height: 100%;
  display: block;
  left: 0;
  bottom: 0;
}

.funkce_nazev > span {
  margin-left: 8px;
  display: inline-block;
}

.filtr_dle_funkci_wrapper__kategorie > h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  margin-top: 12px;
}

.filtr_dle_funkci_wrapper__kategorie {
  position: relative;
  padding-left: 4px;
}

.filtr_dle_funkci_wrapper__kategorie--barva {
  width: 2px;
  height: calc(100% - 28px);
  position: absolute;
  bottom: 0;
  left: 0;
}

.popup_scrollInfo {
  display: none;
  position: fixed;

  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.popup_scrollInfo img {
  width: 100%;
  max-width: 176px;
  max-height: 100%;
}

.popup_scrollInfo__inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  max-width: 90%;
  max-height: 100%;
  min-width: 288px;
  background: white;
  padding: 31px;
  border-radius: 4px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);

  font-size: 13px;
}

.popup_scrollInfo__btn {
  cursor: pointer;
  background: var(--color1);
  color: white;
  padding: 5px 15px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;

  display: flex;
  align-items: center;
  justify-content: center;
}

.popup_scrollInfo__btn svg {
  max-width: 15px;
  margin-left: 3px;
}

.popup_scrollInfo__close {
  position: absolute;
  top: 5px;
  right: 5px;
  cursor: pointer;
}

.popup_scrollInfo.active {
  display: block;
}

.zahlavi img.logo {
  max-height: 40px;
  max-width: 191px;
}

.logo {
  margin-right: 9px;
}

.zahlavi__ikony {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* LAYOUT TABULKY - NUTNE UPRAVIT KDYZ SE ZMENI POCET SLOUPCU !!!  =======================================*/

/* tabulka se na desktop chova jako fixed, jinak zlobi sirky sloupcu */
table {
  width: auto;
  table-layout: fixed;
  max-width: 1484px;
}

/* minimalni sirka nazvu modelu v zahlavi urci tabulku */
.sticky3 > th.znacka {
  min-width: 72px;
}

@media screen and (min-width: 1300px) {
  .zahlavi {
    min-width: 58vw;
  }

  .desktop-none {
    display: none;
  }

  .menu-toggle {
    display: none;
  }

  /* toto je kvuli zarovnani na stred na velkych obrazovkach */
  .body_container {
    max-width: 1761px;
    margin: 0 auto;
  }

  .body_container {
    justify-content: center;
  }
}

/* toto je pevna sirka prvniho sloupce */
tr > td:first-child,
tr > th:first-child {
  width: 330px;
  max-width: 330px;
}

td.funkce_nazev {
  text-wrap: wrap;
}

.link_shop span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  text-decoration: underline;
}

.link_shop span svg {
  max-width: 12px;
  margin-left: 2px;
}

.zahlavi__ikony__desktop {
  gap: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filtr_btns {
}

/* RESPO ================================================================================ */
/* SPECIALNI BREAKPOINT - bod pro zmenu layoutu tabulky - upravit dle poctu sloupcu */
@media screen and (max-width: 1200px) {
  table {
    table-layout: auto;
  }
}

/* TABLET */
@media screen and (max-width: 1300px) {
  .zahlavi h1 {
    align-self: end;
    max-width: unset;
    width: 100%;
    font-size: 18px;
    margin-bottom: 0;
    font-weight: 500;
  }

  .mobile-none {
    display: none;
  }

  .body_container {
    display: grid;
    grid-template-columns: 270px 100%;
  }

  .menu-close {
    display: block;
  }

  .body_container {
    transform: translateX(calc(-1 * var(--sidebar-width)));
  }

  td.funkce_nazev {
    padding-right: 29px;
  }
}

/* MOBILE */

@media screen and (max-width: 768px) {
  .zahlavi__ikony {
    gap: 5px;
  }

  .eshop-btn,
  .menu-toggle {
    font-size: 14px;
  }

  .zahlavi {
    flex-direction: column;
    align-items: start;
  }

  .go-to-eshop-wrapper a {
    font-size: 14px;
  }

  .zahlavi img.logo {
    display: none;
  }

  #filterButtons {
    position: absolute;
    right: unset;
    left: 50%;
    transform: translateX(-50%);
    top: 79px;
  }

  .logo {
    margin-right: 0;
  }
}

.ikona_info {
  position: relative;
  display: inline-block;
  margin-left: 5px;
  cursor: pointer;
}

.ikona_info i {
  width: 16px;
  height: 16px;
  color: var(--color1);
}

.info-box {
  display: none;
  position: absolute;
  background: white;
  border: 3px solid var(--color1);
  padding: 10px;
  /* box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); */
  width: 200px;
  z-index: 1000;
  font-size: 13px;
  top: 32px;
  border-radius: 4px;
}

.info-box::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 7px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--color1);
}

.filtr_dle_modelu:has(input[type="checkbox"]:checked) #filter-models-btn,
.filtr_dle_modelu:not(:has(input[type="checkbox"])) #filter-models-btn {
  opacity: 100% !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

#filter-models-btn {
  border: white;
  background-color: var(--color1);
  padding: 0.3rem 0.45rem;
  color: #ffffff;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.1s ease-in;
  will-change: transform, opacity;
  cursor: pointer;
  pointer-events: none;
  border: 1px solid var(--color3);
}
