/* =====================================================================
   EnergoBazar.cz — nástroje 1.2
   (hlidaci-pes.php, poradna.php, poradna-detail.php, kompatibilita.php
    a modal „Hlídat toto hledání“ v kategorie.php)
   Samostatný stylopis, aby se nezasahovalo do sdíleného style.css.
   Navazuje na proměnné --eb-* definované ve style.css.
   ===================================================================== */

/* ---------- Společné pilulky filtrů ---------- */
.eb-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: #fff;
  border: 1px solid #e2e8e7;
  color: #4b5563;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
  white-space: nowrap;
}
.eb-tool-pill:hover { border-color: var(--eb-sun); color: var(--eb-sun-dark); }
.eb-tool-pill.active {
  background: var(--eb-brand);
  border-color: var(--eb-brand);
  color: #fff;
}
.eb-tool-pill .eb-tool-pill-count {
  font-size: 0.66rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 0 0.35rem;
}
.eb-tool-pill.active .eb-tool-pill-count { background: rgba(255, 255, 255, 0.2); }

/* =====================================================================
   HLÍDACÍ PES
   ===================================================================== */

.eb-watch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 0.7rem;
  padding: 0.55rem 1rem;
  border: 1.5px dashed var(--eb-sun);
  background: #fffaf0;
  color: var(--eb-sun-dark);
  transition: background .15s ease, border-color .15s ease;
  cursor: pointer;
  width: 100%;
}
.eb-watch-btn:hover { background: #fff2d9; border-color: var(--eb-sun-dark); }

/* Karta jednoho hlídání */
.eb-watch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.eb-watch-filters {
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.55;
}
.eb-watch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.66rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  white-space: nowrap;
}
.eb-watch-badge-active { background: #e4f6ec; color: #157347; }
.eb-watch-badge-paused { background: #f1f2f4; color: #4b5563; }
.eb-watch-freq { background: #e8edff; color: #3546b4; }

.eb-watch-hits {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  border-radius: 0.9rem;
  padding: 0.55rem 0.5rem;
  background: #f1f4f3;
  border: 1px solid #e2e8e7;
}
.eb-watch-hits b { font-size: 1.35rem; line-height: 1; color: var(--eb-brand-dark); }
.eb-watch-hits.hot { background: #fffaf0; border-color: var(--eb-sun-light); }
.eb-watch-hits.hot b { color: var(--eb-sun-dark); }
.eb-watch-hits span { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; color: #6b7573; margin-top: 0.2rem; }

/* Modal „Hlídat toto hledání“ (backdrop a panel jsou ve style.css) */
.eb-watch-modal[hidden] { display: none !important; }
.eb-watch-summary {
  background: #f7faf9;
  border: 1px solid #e2e8e7;
  border-radius: 0.8rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.5;
}
.eb-watch-freq-opt {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  border: 1px solid #e2e8e7;
  border-radius: 0.7rem;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.eb-watch-freq-opt:hover { border-color: var(--eb-sun); background: #fffdf7; }
.eb-watch-freq-opt input { margin-top: 0.2rem; }

/* =====================================================================
   PORADNA
   ===================================================================== */

.eb-qa-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.eb-qa-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  border-radius: 0.75rem;
  padding: 0.45rem 0.35rem;
  background: #f1f4f3;
  border: 1px solid #e2e8e7;
  flex-shrink: 0;
}
.eb-qa-stat b { font-size: 1.05rem; line-height: 1; color: var(--eb-brand-dark); }
.eb-qa-stat span { font-size: 0.55rem; font-weight: 700; text-transform: uppercase; color: #6b7573; margin-top: 0.15rem; }
.eb-qa-stat.answered { background: #e4f6ec; border-color: #cbe8d7; }
.eb-qa-stat.answered b { color: #157347; }
.eb-qa-stat.unanswered { background: #fff7ed; border-color: #fde5c2; }
.eb-qa-stat.unanswered b { color: #b45309; }

.eb-qa-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.66rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
  background: #f1f2f4;
  color: #4b5563;
}
.eb-qa-tag-fotovoltaika       { background: #fff3e0; color: #b45309; }
.eb-qa-tag-stridace           { background: #e8edff; color: #3546b4; }
.eb-qa-tag-baterie            { background: #e4f6ec; color: #157347; }
.eb-qa-tag-tepelna-cerpadla   { background: #ffe9e2; color: #b23a12; }
.eb-qa-tag-klimatizace        { background: #e7f4ff; color: #1d6fa5; }
.eb-qa-tag-wallboxy           { background: #ecfeff; color: #0e7490; }
.eb-qa-tag-dotace-legislativa { background: #f3e8ff; color: #6b21a8; }
.eb-qa-tag-bazarove-nakupy    { background: #f1f2f4; color: #4b5563; }

/* Odpověď */
.eb-answer { border-left: 3px solid #e5e9e8; padding-left: 1rem; }
.eb-answer.best {
  border-left-color: #22a06b;
  background: linear-gradient(90deg, #f2fbf6 0%, #ffffff 60%);
  border-radius: 0 0.8rem 0.8rem 0;
}
.eb-answer-body { font-size: 0.925rem; line-height: 1.7; color: #384444; }
.eb-answer-body p { margin-bottom: 0.75rem; }
.eb-answer-body p:last-child { margin-bottom: 0; }

.eb-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  background: #f1f4f3;
  color: var(--eb-brand-dark);
  border: 1px solid #e2e8e7;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.eb-vote-btn:hover { background: #e4f6ec; border-color: #a7d9bf; }
.eb-vote-btn[disabled] { opacity: .55; cursor: default; }

.eb-best-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  background: #22a06b;
  color: #fff;
}

/* =====================================================================
   KOMPATIBILITA
   ===================================================================== */

.eb-compat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.72rem;
  color: #6b7573;
}
.eb-compat-legend b { font-weight: 700; }

.eb-compat-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  border: 1px solid #e7ecec;
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.eb-compat-item:hover { border-color: #cfdad9; box-shadow: 0 6px 18px rgba(8, 37, 38, .06); }
.eb-compat-item.rel-compatible   { border-left: 4px solid #22a06b; }
.eb-compat-item.rel-partial      { border-left: 4px solid var(--eb-sun); }
.eb-compat-item.rel-incompatible { border-left: 4px solid #d05252; background: #fdfafa; }

.eb-compat-mark {
  width: 2rem; height: 2rem; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem;
}
.eb-compat-mark.rel-compatible   { background: #e4f6ec; color: #157347; }
.eb-compat-mark.rel-partial      { background: #fff3e0; color: #b45309; }
.eb-compat-mark.rel-incompatible { background: #fdeaea; color: #b02a2a; }

.eb-compat-src {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.63rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  white-space: nowrap;
}
.eb-compat-src-manufacturer { background: #e4f6ec; color: #157347; }
.eb-compat-src-community    { background: #e8edff; color: #3546b4; }
.eb-compat-src-unverified   { background: #fff3e0; color: #b45309; }

.eb-compat-proto {
  display: inline-flex;
  align-items: center;
  font-size: 0.63rem;
  font-weight: 700;
  border-radius: 0.35rem;
  padding: 0.08rem 0.4rem;
  background: #f1f2f4;
  color: #4b5563;
  border: 1px solid #e5e9e8;
}

.eb-compat-note { font-size: 0.78rem; color: #55605f; line-height: 1.55; margin-top: 0.3rem; }

.eb-compat-warn {
  border: 1px solid #fde5c2;
  background: #fffaf0;
  border-radius: 0.8rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.78rem;
  color: #8a5a10;
  line-height: 1.55;
}

/* Přepínač směru (střídač → baterie / baterie → střídač) */
.eb-compat-switch {
  display: inline-flex;
  background: #f1f4f3;
  border: 1px solid #e2e8e7;
  border-radius: 0.75rem;
  padding: 0.2rem;
  gap: 0.2rem;
}
.eb-compat-switch a {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 0.55rem;
  color: #4b5563;
  transition: background .15s ease, color .15s ease;
}
.eb-compat-switch a.active { background: var(--eb-brand); color: #fff; }
.eb-compat-switch a:not(.active):hover { color: var(--eb-brand); background: #fff; }

@media (max-width: 640px) {
  .eb-compat-switch { width: 100%; }
  .eb-compat-switch a { flex: 1; text-align: center; }
}
