/* ================================================================
   Stránka Aktuální cena elektřiny — ep = electricity price
   Paleta webu: akcent #e67c3a, text #2c3e50, bg #f8f9fa
   ================================================================ */

.ep-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  color: #2c3e50;
}

/* --- Hlavička stránky --- */
.ep-header {
  margin-bottom: 1.5rem;
}
.ep-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #2c3e50;
  margin: 0 0 .4rem;
}
.ep-header__perex {
  color: #555;
  font-size: .95rem;
  margin: 0;
}
.ep-header__perex a {
  color: #e67c3a;
}

/* --- Aktuální cena box --- */
.ep-current-wrap {
  margin-bottom: 2rem;
}
.ep-current {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  border-left: 5px solid #e67c3a;
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ep-current__meta {
  font-size: .8rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .25rem;
}
.ep-current__eur {
  font-size: 2.4rem;
  font-weight: 800;
  color: #2c3e50;
  line-height: 1;
}
.ep-current__unit {
  font-size: 1rem;
  font-weight: 400;
  color: #64748b;
}
.ep-current__czk {
  font-size: 1rem;
  color: #475569;
  margin-top: .2rem;
}
.ep-current__badge-wrap {
  margin-top: .4rem;
}
.ep-current--no-data {
  border-left-color: #cbd5e1;
  color: #94a3b8;
  font-style: italic;
}

/* barevný akcent border-left dle úrovně ceny */
.ep-current.ep-price--negative  { border-left-color: #8b5cf6; }
.ep-current.ep-price--low       { border-left-color: #22c55e; }
.ep-current.ep-price--medium    { border-left-color: #eab308; }
.ep-current.ep-price--high      { border-left-color: #f97316; }
.ep-current.ep-price--very-high { border-left-color: #ef4444; }

/* --- Sekce --- */
.ep-section {
  margin-bottom: 2.5rem;
}
.ep-section__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid #f1f5f9;
}
.ep-section__sub {
  font-size: .85rem;
  font-weight: 400;
  color: #94a3b8;
}
.ep-section--info {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}
.ep-section--info p {
  margin: 0 0 .8rem;
  color: #475569;
  font-size: .9rem;
  line-height: 1.65;
}
.ep-section--info p:last-child { margin-bottom: 0; }

/* --- Graf --- */
.ep-chart-wrap {
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}

/* --- Tabulka --- */
.ep-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.ep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: #fff;
}
.ep-table thead th {
  background: #f8f9fa;
  padding: .55rem .8rem;
  text-align: left;
  font-weight: 600;
  color: #64748b;
  border-bottom: 2px solid #e5e7eb;
}
.ep-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background .12s;
}
.ep-table tbody tr:last-child { border-bottom: none; }
.ep-table tbody tr:hover { background: #fafafa; }
.ep-table td {
  padding: .42rem .8rem;
  color: #334155;
}
.ep-td--time { font-weight: 600; color: #2c3e50; }
.ep-td--eur  { font-weight: 600; color: #2c3e50; }
.ep-td--czk  { color: #64748b; }

/* Zvýraznění aktuální hodiny */
.ep-row--current {
  background: #fff7ed !important;
}
.ep-row--current .ep-td--time,
.ep-row--current .ep-td--eur { color: #e67c3a !important; }

/* Barevný proužek vlevo dle ceny */
.ep-price--negative  td:first-child { border-left: 3px solid #8b5cf6; }
.ep-price--low       td:first-child { border-left: 3px solid #22c55e; }
.ep-price--medium    td:first-child { border-left: 3px solid #eab308; }
.ep-price--high      td:first-child { border-left: 3px solid #f97316; }
.ep-price--very-high td:first-child { border-left: 3px solid #ef4444; }

/* --- Badge --- */
.ep-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
}
.ep-badge--negative  { background: #ede9fe; color: #6d28d9; }
.ep-badge--low       { background: #dcfce7; color: #15803d; }
.ep-badge--medium    { background: #fef9c3; color: #a16207; }
.ep-badge--high      { background: #ffedd5; color: #c2410c; }
.ep-badge--very-high { background: #fee2e2; color: #b91c1c; }

/* --- Legenda --- */
.ep-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0;
}

/* --- Zdroj / patička --- */
.ep-source {
  font-size: .8rem;
  color: #94a3b8;
  margin-top: 1rem !important;
}
.ep-source a { color: #64748b; }

.ep-empty { color: #94a3b8; font-style: italic; }

/* --- Navigace mezi stránkami --- */
.ep-page-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.ep-page-nav a {
  padding: .4rem .9rem;
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  color: #475569;
  transition: background .12s;
}
.ep-page-nav a:hover, .ep-page-nav a.active {
  background: #e67c3a;
  color: #fff;
  border-color: #e67c3a;
}

/* --- Souhrnné statistiky (historie) --- */
.ep-hist-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.ep-hist-stat {
  flex: 1;
  min-width: 130px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  border-top: 3px solid #e67c3a;
  padding: .9rem 1rem;
  text-align: center;
}
.ep-hist-stat--low       { border-top-color: #22c55e; }
.ep-hist-stat--high      { border-top-color: #f97316; }
.ep-hist-stat--negative  { border-top-color: #8b5cf6; }
.ep-hist-stat--very-high { border-top-color: #ef4444; }

.ep-hist-stat__val {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #2c3e50;
  line-height: 1;
}
.ep-hist-stat__j {
  display: block;
  font-size: .75rem;
  color: #94a3b8;
  margin: .15rem 0 .3rem;
}
.ep-hist-stat__popis {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #64748b;
}

.ep-chart-wrap--tall { /* taller chart for history */ }

/* --- SEO sekce --- */
.ep-section--seo {
  border-top: 2px solid #f1f5f9;
  padding-top: 2rem;
}
.ep-seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-bottom: 2rem;
}
.ep-seo-block h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 .6rem;
}
.ep-seo-block p, .ep-seo-block ul {
  font-size: .9rem;
  color: #475569;
  line-height: 1.65;
  margin: 0 0 .6rem;
}
.ep-seo-block ul {
  padding-left: 1.2rem;
}
.ep-seo-block li {
  margin-bottom: .3rem;
}

.ep-formula {
  background: #f8f9fa;
  border-left: 3px solid #e67c3a;
  padding: .5rem .8rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: .85rem !important;
  color: #2c3e50 !important;
}

/* Zdroj dat box */
.ep-source-box {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
}
.ep-source-box__title {
  font-size: .95rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 .6rem;
}
.ep-source-box p {
  font-size: .88rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 .5rem;
}
.ep-source-box p:last-child { margin: 0; }
.ep-source-box a { color: #e67c3a; }
.ep-source-meta { color: #64748b !important; font-size: .82rem !important; }

@media (max-width: 640px) {
  .ep-seo-grid { grid-template-columns: 1fr; }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .ep-header h1 { font-size: 1.4rem; }
  .ep-current__eur { font-size: 1.8rem; }
  .ep-table { font-size: .82rem; }
  .ep-table td, .ep-table th { padding: .35rem .5rem; }
}
