/* CSS pre moju tabulku na porovnanie generacii - responzivna so sliderom */

.tabulka-porovnanie-generacie-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.tabulka-porovnanie-generacie-title {
  display: inline-block;
  padding-right: 18px;     
  border-bottom: 3px solid #ff0000;
  border-right: 5px solid #ff4d4d;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;     
}

.tabulka-porovnanie-generacie-toggler {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 24px 0 18px 0;
  flex-wrap: wrap;
}

.tabulka-porovnanie-generacie-toggler button {
  padding: 10px 26px;
  font-size: 1.7rem;
  background: #d6d6d6;
  color: black;
  border: none;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  font-weight: 500;
  outline: none;
  margin-bottom: 0;
}

.tabulka-porovnanie-generacie-toggler button.active,
.tabulka-porovnanie-generacie-toggler button:active {
  background: red;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,99,235,0.13);
}

/* Toggler pod sebou na menších obrazovkách */
@media (max-width: 700px) {
  .tabulka-porovnanie-generacie-toggler {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .tabulka-porovnanie-generacie-toggler button {
    font-size: 1.2rem;
    width: 95%;
    max-width: 330px;
    margin-bottom: 5px;
  }
}

/* Šípky na kraji obrazovky */
.tabulka-porovnanie-generacie-sipka-global {
  position: absolute;
  z-index: 9999;
  background: black;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: background 0.22s, box-shadow 0.2s, transform 0.22s, opacity 0.18s;
  opacity: 0.95;
  animation: tabulka-pulse 1.15s infinite;
  user-select: none;
  padding-left: 10px;
  padding-right: 10px;
}

.tabulka-porovnanie-generacie-sipka-vlavo { left: 20px; }
.tabulka-porovnanie-generacie-sipka-vpravo { right: 20px; }

@keyframes tabulka-pulse {
  0% { box-shadow: 0 0 0 0 #2563eb44; transform: translateY(-50%) scale(1);}
  60% { box-shadow: 0 0 0 14px #2563eb11; transform: translateY(-50%) scale(1.07);}
  100% { box-shadow: 0 0 0 0 #2563eb00; transform: translateY(-50%) scale(1);}
}

/* V mobile trošku menšie */
@media (max-width: 600px) {
  .tabulka-porovnanie-generacie-sipka-global {
    width: 30px;
    height: 30px;
    font-size: 1.3rem;
    padding-left: 6px;
    padding-right: 6px;
  }
  .tabulka-porovnanie-generacie-sipka-vlavo { left: 10px; right: auto; }
  .tabulka-porovnanie-generacie-sipka-vpravo { right: 10px; left: auto; }
}

/* --- HLAVNÝ GRID TABLE --- */
.tabulka-porovnanie-generacie-slider-tabulky {
  display: grid;
  grid-auto-flow: row;
  gap: 0px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 16px;
  transition: opacity 0.2s;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 1;
  min-width: 0; /* KLÚČOVÉ! */
  /* grid-template-columns nastavuje JS! */
}

.tabulka-porovnanie-generacie-slider-tabulky.active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
  z-index: 2;
}

/* Dynamická bunka v gride - KLÚČOVÉ min-width: 0 pre správne zalamovanie */
.tabulka-porovnanie-generacie-bunka {
  min-width: 0 !important;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  word-break: break-word;      /* KLÚČOVÉ PRE ZALOMENIE */
  overflow-wrap: break-word;   /* KLÚČOVÉ PRE ZALOMENIE */
  width: 100%;
}

.tabulka-porovnanie-generacie-vlastnost {
  padding: 12px 10px;
  background: #fff;
  border-bottom: 2px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  font-size: 1.3rem;
  text-align: center;
  min-height: 42px;
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;     /* Najdôležitejšie pre grid zalomenie! */
}

.tabulka-porovnanie-generacie-vlastnost:last-child {
  border-radius: 0 0 0px 0px;
  border-bottom: 2px solid #e5e7eb;
}

.tabulka-porovnanie-generacie-vlastnost p {
  margin: 0;
  font-size: 1.3rem;
  color: #444;
  width: 100%;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: center;
}

/* Produkt */
.tabulka-porovnanie-generacie-produkt {
  background: white;
  border: 1px solid;
  border-color: #a3c4f3;
  border-radius: 0px;
  border-bottom: 2px solid #a3c4f3;
  text-align: center;
  padding: 10px 10px 10px 10px;
  min-width: 0; /* Kvôli gridu */
}

.tabulka-porovnanie-generacie-produkt h3 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  min-width: 0;
}

.tabulka-porovnanie-generacie-obrazok {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  min-width: 0;
}

.tabulka-porovnanie-generacie-obrazok img {
  max-height: 100px;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.00);
  object-fit: contain;
  min-width: 0;
}

.tabulka-porovnanie-generacie-produkt p {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100%;
  text-align: center;
}

/* Nadpis produktu a texty na menších obrazovkách */
@media (max-width: 700px) {
  .tabulka-porovnanie-generacie-produkt h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    min-width: 0;
  }

  .tabulka-porovnanie-generacie-produkt p {
    font-size: 1.1rem;
    margin-bottom: 5px;
  }

  .tabulka-porovnanie-generacie-vlastnost {
    font-size: 1.2rem;
  }

  .tabulka-porovnanie-generacie-vlastnost p {
    font-size: 1.2rem;
  }
}
