/* ── Ohjelmalistaus Pro – Frontend styles ── */

/* Nollaa teeman entry-content / block-wrapper -rajoitukset */
.entry-content #ohjelmalistaus-pro,
.wp-block-group #ohjelmalistaus-pro,
.wp-block-post-content #ohjelmalistaus-pro {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

#ohjelmalistaus-pro {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* ── Hakukenttä ── */
#hakusana {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* ── Filtterit ── */
.olp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}

.olp-filters select {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}

#avainsana { flex: 1 1 180px; }

.olp-tulevat-label {
  font-size: 13px;
  white-space: nowrap;
}

#tyhjenna {
  padding: 5px 10px;
  background: #555;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
#tyhjenna:hover { background: #333; }

/* ── Näkymävalinta ── */
.olp-nakyma-valinta {
  margin-bottom: 14px;
  display: flex;
  gap: 18px;
  font-size: 13px;
}
.olp-nakyma-valinta label { cursor: pointer; }

/* ── Palstat (scroll-container) ── */
.olp-palstat {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 8px;
}

.olp-palsta {
  flex: 1 1 0;
  min-width: 180px;
}

/* Palstan otsikko – pelkkä teksti, ohut alareuna */
.olp-palsta-otsikko {
  margin: 0 0 6px 0;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 2px solid #ccc;
  color: #222;
}

/* ── Ohjelmakortti ── */
.olp-ohjelma {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-left: 4px solid #0073aa;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.5;
  /* taustaväri tulee inline-tyylissä PHP:stä */
}

.olp-ohjelma-title {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  color: #111;
}

.olp-meta {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}

/* Esiintyjät */
.olp-esiintyjat {
  margin: 2px 0 6px 14px;
  padding: 0;
  font-size: 13px;
  color: #333;
}
.olp-esiintyjat li { margin: 0; }

/* Lava-badge (päivittäin-näkymä) */
.olp-lava-badge {
  display: inline-block;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 5px;
  letter-spacing: 0.2px;
}

/* Accordion */
.accordion-toggle {
  display: inline-block;
  margin-top: 4px;
  background: none;
  border: none;
  color: #0073aa;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}
.accordion-content {
  margin-top: 6px;
  font-size: 13px;
  color: #333;
}
.accordion-content a { color: #0073aa; }

/* ── Responsiivisuus ── */
@media (max-width: 600px) {
  .olp-palstat {
    flex-direction: column;
    overflow-x: visible;
  }
  .olp-palsta {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* ── Lukujärjestysnäkymä (grid) ── */

/* Päivätabit kun useita päiviä */
.olp-grid-paiva-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.olp-grid-tab {
  padding: 6px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.olp-grid-tab.olp-tab-active {
  background: #333;
  color: #fff;
  border-color: #333;
}

/* Scroll wrapper */
.olp-grid-wrap {
  overflow-x: auto;
  width: 100%;
}

/* Taulukko */
.olp-grid {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-size: 12px;
  table-layout: fixed;
}

/* Klo-sarake kiinteä leveys */
.olp-grid colgroup col:first-child,
.olp-grid td.olp-grid-klo-cell,
.olp-grid th.olp-grid-klo-header {
  width: 52px;
  min-width: 52px;
}

/* Lavan otsikkorivi */
.olp-grid-lava-header {
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 1px solid rgba(0,0,0,.08);
}
.olp-grid-klo-header {
  padding: 8px 4px;
  text-align: right;
  background: #f0f0f0;
  border: 1px solid #ddd;
  font-size: 11px;
  color: #666;
}

/* Aikasolut */
.olp-grid-klo-cell {
  padding: 0 6px 0 0;
  text-align: right;
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  border-right: 1px solid #ddd;
  vertical-align: top;
  background: #fafafa;
}
.olp-grid-klo-bold { color: #333; font-weight: 700; font-size: 12px; }
.olp-grid-klo-small { font-size: 10px; color: #bbb; }

/* Tasatunti-rivi korostettuna */
.olp-grid-row-hour td { border-top: 1px solid #ddd; }
.olp-grid-row-half td { border-top: 1px dashed #ebebeb; }

/* Tyhjä solu */
.olp-grid-empty {
  padding: 0;
  height: 24px;
}

/* Ohjelmasolu */
.olp-grid-event {
  padding: 5px 7px;
  vertical-align: top;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 2px;
  line-height: 1.4;
}

.olp-grid-aika {
  display: block;
  font-size: 10px;
  color: #555;
  margin-bottom: 2px;
}
.olp-grid-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #111;
  margin-bottom: 2px;
}
.olp-grid-esiintyjat {
  display: block;
  font-size: 11px;
  color: #444;
}
.olp-grid-lisaa {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  color: #0073aa;
}

/* Piilota grid-yhteensopimattomat filtterit grid-tilassa */
.olp-grid-mode .olp-hide-grid { display: none !important; }
