/* =========================================================================
   EnergoBazar.cz — styly porovnávače produktů (porovnani.php)
   a cenového indexu (cenovy-index.php).

   Doplněk k assets/css/style.css a assets/css/katalog.css; navazuje na
   proměnné --eb-* ze style.css. Vlastní soubor, aby se nekřížily úpravy
   sdílených stylů.
   ========================================================================= */

/* =========================================================================
   1) POROVNÁVAČ PRODUKTŮ
   ========================================================================= */

/* ---------- Nadpis „A vs B“ ---------- */
.cmp-vs {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--eb-sun-dark);
  padding: 0 0.15em;
  vertical-align: 0.12em;
}

/* ---------- Odznak strany (A / B) ---------- */
.cmp-side-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  margin-right: 0.4rem;
  vertical-align: 0.05rem;
}
.cmp-side-tag.a { background: #fff2d6; color: #9a6200; }
.cmp-side-tag.b { background: #e2eeed; color: #0d3b3e; }

/* ---------- Hlavičkové karty obou produktů ---------- */
.cmp-head { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.cmp-head .pm-frame { border-bottom: 1px solid #e7ecec; }
.cmp-head-a { border-top: 3px solid var(--eb-sun); }
.cmp-head-b { border-top: 3px solid var(--eb-brand); }

/* ---------- Srovnávací tabulka ---------- */
.cmp-table { min-width: 34rem; }
.cmp-table thead th.cmp-col-a { background: #fff6e6; }
.cmp-table thead th.cmp-col-b { background: #f1f7f6; }
.cmp-table tbody td { width: 33%; }
.cmp-table tbody tr.cmp-diff td { background: #fdfefe; }
.cmp-table tbody tr.cmp-same th,
.cmp-table tbody tr.cmp-same td { color: #8b9896; }
.cmp-table tbody tr.cmp-same td { background: #fafbfb; }
.cmp-table tbody tr.cmp-row-price th,
.cmp-table tbody tr.cmp-row-price td { font-size: 0.9rem; background: #f7fbfa; }
.cmp-table tbody td.cmp-better {
  background: #eef9f3;
  font-weight: 700;
  color: var(--eb-brand-dark);
}
.cmp-better-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #157347;
  color: #fff;
  border-radius: 999px;
  padding: 0.08rem 0.42rem;
  vertical-align: 0.08rem;
  white-space: nowrap;
}

/* ---------- Výhody / nevýhody vedle sebe ---------- */
.cmp-procon { height: 100%; }
.cmp-procon-a { border-left: 3px solid var(--eb-sun); }
.cmp-procon-b { border-left: 3px solid var(--eb-brand); }
.cmp-subhead {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7b8a88;
  margin-bottom: 0.5rem;
}

/* ---------- Verdikt ---------- */
.cmp-verdict-a { border-top: 3px solid var(--eb-sun); }
.cmp-verdict-b { border-top: 3px solid var(--eb-brand); }
.cmp-reason-list { list-style: none; margin: 0; padding: 0; }
.cmp-reason-list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 0.5rem;
  color: #34464a;
}
.cmp-reason-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--eb-sun-dark);
  font-weight: 800;
}
.cmp-reason-extra {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #55676a;
  border-left: 3px solid #e2e8e7;
  padding-left: 0.6rem;
  margin-top: 0.75rem;
}
.cmp-verdict-summary {
  margin-top: 1rem;
  background: #f4f8f7;
  border: 1px dashed #cfdedc;
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #34464a;
}

/* ---------- Seznam dvojic („nejčastější srovnání“) ---------- */
.cmp-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--eb-brand-dark);
  margin-bottom: 0.75rem;
}
.cmp-group-icon { width: 1.25rem; height: 1.25rem; color: var(--eb-brand); display: inline-flex; }
.cmp-group-icon svg { width: 100%; height: 100%; }
.cmp-group-count {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b9896;
  background: #f1f5f4;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}
.cmp-pair-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 768px) { .cmp-pair-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cmp-pair-list > li > a {
  display: block;
  background: #fff;
  border: 1px solid #e7ecec;
  border-radius: 0.75rem;
  padding: 0.6rem 0.85rem;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.cmp-pair-list > li > a:hover {
  border-color: var(--eb-sun);
  box-shadow: 0 2px 10px rgba(8, 37, 38, 0.06);
  transform: translateY(-1px);
}
.cmp-pair-names {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--eb-brand-dark);
}
.cmp-pair-names b {
  font-weight: 800;
  color: var(--eb-sun-dark);
  text-transform: uppercase;
  font-size: 0.72em;
  padding: 0 0.15em;
}
.cmp-pair-meta { display: block; font-size: 0.7rem; color: #8b9896; margin-top: 0.15rem; }

/* ---------- Výběr dvojice na rozcestníku ---------- */
.cmp-picker { min-width: 0; }
.cmp-select { height: auto; padding: 0.35rem; font-size: 0.82rem; }
.cmp-select option { padding: 0.28rem 0.4rem; border-radius: 0.35rem; }

/* ---------- Bazarové nabídky ---------- */
.cmp-bazar { min-width: 0; }

/* =========================================================================
   2) CENOVÝ INDEX
   ========================================================================= */

/* ---------- Přehledové dlaždice ---------- */
.pi-tile { padding: 1.1rem 1.15rem; display: flex; flex-direction: column; }
.pi-tile-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.5rem; }
.pi-tile-icon { width: 1.15rem; height: 1.15rem; display: inline-flex; }
.pi-tile-icon svg { width: 100%; height: 100%; }
.pi-tile-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7573;
}
.pi-tile-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--eb-brand-dark);
  letter-spacing: -0.02em;
}
.pi-tile-value span { font-size: 0.78rem; font-weight: 700; color: #8b9896; margin-left: 0.15rem; }
.pi-tile-spark { margin: 0.45rem 0 0.15rem; }
.pi-tile-spark svg { width: 100%; height: 34px; display: block; }
.pi-tile-note { font-size: 0.68rem; color: #8b9896; line-height: 1.45; margin-top: auto; }
.pi-tile-flag {
  font-size: 0.68rem;
  line-height: 1.45;
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
  margin-top: auto;
}
.pi-tile-flag.partial { background: #fff7e8; color: #91630b; }
.pi-tile-flag.modeled { background: #eef2ff; color: #3f4a99; }

/* ---------- Meziměsíční změna ---------- */
.pi-change { font-size: 0.78rem; font-weight: 700; margin-top: 0.15rem; }
.pi-change.down { color: #157347; }
.pi-change.up { color: #b45309; }
.pi-change.flat { color: #8b9896; font-weight: 600; }
.pi-change.inline { margin: 0; white-space: nowrap; }

/* ---------- Graf ---------- */
.pi-chart-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fbfdfc;
  border: 1px solid #eef3f2;
  border-radius: 0.9rem;
  padding: 0.5rem;
}
.pi-chart { display: block; width: 100%; min-width: 34rem; height: auto; }
.pi-spark { display: block; width: 100%; height: auto; }
.pi-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
.pi-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: #55676a; font-weight: 600; }
.pi-legend-item i { width: 0.7rem; height: 0.7rem; border-radius: 0.2rem; display: inline-block; }

/* ---------- Tabulka indexu ---------- */
.pi-table { min-width: 48rem; }
.pi-table tbody th { white-space: normal; vertical-align: top; }
.pi-cat { display: block; font-weight: 700; color: var(--eb-brand-dark); font-size: 0.82rem; }
.pi-cat-basis { display: block; font-size: 0.68rem; color: #8b9896; font-weight: 400; margin-top: 0.15rem; line-height: 1.4; }
.pi-num { white-space: nowrap; }
.pi-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  white-space: nowrap;
}
.pi-badge.ok { background: #e4f6ec; color: #157347; }
.pi-badge.warn { background: #fff3e0; color: #b45309; }
.pi-badge.model { background: #eef2ff; color: #3f4a99; }

/* ---------- Box „Citujte nás“ + embed ---------- */
.pi-cite {
  background: #fff;
  border: 1px solid #e7ecec;
  border-left: 4px solid var(--eb-sun);
  border-radius: 1rem;
  padding: 1.35rem 1.4rem;
  box-shadow: 0 1px 2px rgba(8, 37, 38, 0.04);
}
.pi-copy-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7573;
  margin: 0.65rem 0 0.3rem;
}
.pi-copy-row { display: flex; gap: 0.4rem; align-items: stretch; }
.pi-copy-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #dbe4e3;
  border-radius: 0.6rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f8fbfa;
  color: #1b2b2b;
}
.pi-copy-input:focus { outline: none; border-color: var(--eb-sun); box-shadow: 0 0 0 3px rgba(247, 166, 0, 0.18); }
.pi-copy-btn { white-space: nowrap; }
