/* ---------------------------------------------------------------------------
   content.css - wyglad tresci wpisow blogowych

   Dwa zrodla scalone 8.11.2026:
   1. standard tabel (v1, 6.11.2026) - byl w Customizerze, w bazie danych,
   2. blok CSS wstrzykiwany z functions.php przez wp_add_inline_style() -
      jedna dluga linia w kodzie PHP.

   Tresc przeniesiona bez zmian; dopisane tylko naglowki sekcji.
   Laduje sie po layout.css.
   --------------------------------------------------------------------------- */

/* =====================================================================
   Wach & Wach – standard tabel we wpisach blogowych (v1, 6.11.2026)
   Miejsce: Wygląd → Dostosuj → Dodatkowy CSS (wszystkie języki).
   Opis standardu: docs/wach-standard-tabel.md

   Znaczniki we wpisie (bez innych klas, stylów, szerokości i opakowań):
   <table>
     <thead><tr><th scope="col">Nagłówek 1</th><th scope="col">Nagłówek 2</th></tr></thead>
     <tbody><tr><td data-label="Nagłówek 1">…</td><td data-label="Nagłówek 2">…</td></tr></tbody>
   </table>

   Opcja: <table class="ww-last-strong"> – wyróżniona ostatnia kolumna (np. kwoty).

   Zakres: tylko tabele bezpośrednio w treści wpisu (.content-inner > table).
   Stare tabele w <div class="blog-content"> nie są objęte – zachowują dawne
   style z style.css do czasu decyzji o tym bloku (AUDYT.md, etap 2 pkt 6).
   ===================================================================== */

/* --- Komputer ------------------------------------------------------- */

body.single-post .post-content .content-inner > table {
  width: 100%;
  margin: 25px 0;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid #eee;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  font-size: .95em;
  line-height: 1.5;
}

body.single-post .post-content .content-inner > table thead tr th {
  padding: 15px;
  border: 0;
  border-bottom: 3px solid #ff8c00;
  background: #222;
  color: #fff;
  font-weight: 600;
  text-align: left;
  vertical-align: bottom;
}

body.single-post .post-content .content-inner > table tbody tr td {
  box-sizing: border-box;
  padding: 12px 15px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: transparent;
  color: #333;
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

body.single-post .post-content .content-inner > table tbody tr:last-child td {
  border-bottom: 0;
}

/* Opcja: wyróżniona ostatnia kolumna */
body.single-post .post-content .content-inner > table.ww-last-strong tbody tr td:last-child {
  background: #fafafa;
  color: #000;
  font-weight: 700;
}

/* --- Telefon: każdy wiersz jako karta ------------------------------- */

@media screen and (max-width: 768px) {

  body.single-post .post-content .content-inner > table {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  /* nagłówek ukryty wizualnie, ale dostępny dla czytników ekranu */
  body.single-post .post-content .content-inner > table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.single-post .post-content .content-inner > table,
  body.single-post .post-content .content-inner > table tbody,
  body.single-post .post-content .content-inner > table tbody tr,
  body.single-post .post-content .content-inner > table tbody tr td {
    display: block;
    width: 100%;
  }

  body.single-post .post-content .content-inner > table tbody tr {
    box-sizing: border-box;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .05);
  }

  body.single-post .post-content .content-inner > table tbody tr td,
  body.single-post .post-content .content-inner > table tbody tr:last-child td {
    border-bottom: 1px solid #f1f1f1;
  }

  body.single-post .post-content .content-inner > table tbody tr td:last-child {
    border-bottom: 0;
  }

  /* etykieta kolumny nad wartością */
  body.single-post .post-content .content-inner > table tbody tr td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #666;
    font-size: .85em;
    font-weight: 600;
  }

  body.single-post .post-content .content-inner > table tbody tr td:not([data-label])::before,
  body.single-post .post-content .content-inner > table tbody tr td:first-child::before {
    content: none;
  }

  /* pierwsza komórka = tytuł karty */
  body.single-post .post-content .content-inner > table tbody tr td:first-child {
    border-bottom: 3px solid #ff8c00;
    background: #222;
    color: #fff;
    font-weight: 700;
  }
}

/* =====================================================================
   Z bloku wp_add_inline_style() w functions.php (przeniesione 8.11.2026).
   Blok dat publikacji/aktualizacji generowany przez ww_post_dates_block().

   Piec regul starego standardu tabel (.blog-content table.text-table
   i .text-table-plain) usunieto 8.11.2026 - klasy nie wystepowaly
   w zadnym wpisie, stronie ani szkicu, tylko w jednej rewizji wpisu 9797.
   ===================================================================== */

@media screen and (max-width: 768px) {
  .post-content img.blog-icon { display: none; }
  .ww-post-dates span { display: block; margin-right: 0; }
}

/* --- daty publikacji i aktualizacji (ww_post_dates_block) ------------- */

.post-content p.ww-post-dates {
  margin-bottom: 24px;
  line-height: 1.5;
  color: #676767;
}

.ww-post-dates .ww-post-updated {
  margin-right: 12px;
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1b;
}

.ww-post-dates .ww-post-published {
  display: inline-block;
  font-size: 14px;
}
