/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* ==========================================================================
   [2026-10] Treść wpisu: linki, komentarz (cytat), autor
   Kolory iFlix: #141414 (tekst), #E6F4C0 (limonka), #545659 / #87898B (szarości)
   ========================================================================== */

/* Linki w treści - wcześniej w kolorze tekstu i bez podkreślenia, więc były niewidoczne */
body .brxe-post-content a:not(:has(img)) {
  color: #141414;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #A8CF45;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  border-radius: 3px;
  transition: background-color .15s ease, text-decoration-color .15s ease;
}
body .brxe-post-content a:not(:has(img)):hover,
body .brxe-post-content a:not(:has(img)):focus-visible {
  background-color: #E6F4C0;
  text-decoration-color: #141414;
}

/* Komentarz w artykule = element „Cytat" (blockquote) w edytorze.
   Pierwsza linijka w całości pogrubiona działa jak nagłówek ramki, „cite" jako podpis. */
body .brxe-post-content blockquote {
  position: relative;
  margin: 32px 0;
  padding: 22px 26px 22px 72px;
  background: #F3F9E3;
  border: 1px solid #D9EBA9;
  border-radius: 20px;
  color: #141414;
  font-family: inherit;
  font-size: inherit;
  font-style: normal;
  quotes: none;
}
/* motyw ma własny krój i wielkie litery dla cytatów - w ramce trzymamy czcionkę bloga */
body .brxe-post-content blockquote p,
body .brxe-post-content blockquote cite,
body .brxe-post-content blockquote footer {
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
}
body .brxe-post-content blockquote::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #141414 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E6F4C0'%3E%3Cpath d='M9.5 6C6.5 6 4 8.6 4 11.8V18h6v-6H6.9c.2-1.8 1.4-3 2.6-3V6zm9 0c-3 0-5.5 2.6-5.5 5.8V18h6v-6h-3.1c.2-1.8 1.4-3 2.6-3V6z'/%3E%3C/svg%3E") center / 16px no-repeat;
}
body .brxe-post-content blockquote p {
  margin: 0 0 10px;
  line-height: 1.65;
}
body .brxe-post-content blockquote p:last-child {
  margin-bottom: 0;
}
body .brxe-post-content blockquote > p:first-child > strong:only-child {
  display: block;
  font-size: 1.05em;
}
body .brxe-post-content blockquote cite,
body .brxe-post-content blockquote footer {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  color: #545659;
}
@media (max-width: 600px) {
  body .brxe-post-content blockquote {
    padding: 64px 18px 18px;
  }
  body .brxe-post-content blockquote::before {
    left: 18px;
    top: 18px;
  }
}

/* Autor - ramka pod wpisem [iflix_author_box] */
.iflix-author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 48px 0 8px;
  padding: 24px;
  border: 1px solid #E5E5E5;
  border-radius: 24px;
  background: #fff;
}
.iflix-author-photo {
  flex: 0 0 auto;
}
.iflix-author-img {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}
.iflix-author-label {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #87898B;
}
.iflix-author-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.iflix-author-name a {
  color: #141414;
  text-decoration: none;
}
.iflix-author-role {
  margin: 2px 0 0;
  font-size: 14px;
  color: #545659;
}
.iflix-author-bio {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: #363636;
}
.iflix-author-bio p {
  margin: 0 0 8px;
}
.iflix-author-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #141414;
  text-decoration: underline;
  text-decoration-color: #A8CF45;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.iflix-author-more:hover {
  background-color: #E6F4C0;
}
@media (max-width: 600px) {
  .iflix-author-box {
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }
}

/* Autor - nagłówek strony /author/... [iflix_author_header] */
.iflix-author-header {
  display: flex;
  gap: 36px;
  align-items: center;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}
.iflix-author-header .iflix-author-img {
  width: 168px;
  height: 168px;
}
.iflix-author-header-body {
  min-width: 0;
}
.iflix-author-header-name {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  color: #141414;
}
.iflix-author-header .iflix-author-role {
  margin-top: 6px;
  font-size: 16px;
}
.iflix-author-header .iflix-author-bio {
  max-width: 640px;
  font-size: 16px;
}
.iflix-author-count {
  display: inline-block;
  margin: 14px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #E6F4C0;
  font-size: 14px;
  font-weight: 600;
  color: #141414;
}
@media (max-width: 700px) {
  .iflix-author-header {
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }
  .iflix-author-header .iflix-author-bio {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Dolny pasek „Rezerwuj wizytę / Zamów kuriera / Zadzwoń" (szablon Mobile Bottom) jest przyklejony
   do dołu ekranu na telefonach w pionie (≤478 px) - bez odstępu zasłaniał koniec stopki. */
@media (max-width: 478px) {
  html body {
    padding-bottom: 72px;
  }
}

/* Tabele w treści wpisu: na wąskim ekranie przewijane w poziomie zamiast rozpychać stronę */
body .brxe-post-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}


/* ==========================================================================
   [2026-10] Style globalne treści wpisów - od klienta (blog-global.css)
   ========================================================================== */
/* blog.iflix.pl – globalne style treści wpisów (Bricks: Settings → Custom Code → Custom CSS lub Wygląd → Dostosuj → Dodatkowy CSS).
   Zakres: .brxe-post-content (Bricks) + .entry-content (fallback). Działa na czystym HTML z plików <slug>-post.html. */

/* --- Obrazy i figury --- */
.brxe-post-content figure, .entry-content figure {
  margin: 36px 0;
}
.brxe-post-content figure img, .entry-content figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}
.brxe-post-content figcaption, .entry-content figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: #545659;
}

/* --- Zrzuty iOS (pionowe, 1000×2162): wąskie i wyśrodkowane, zaokrąglenie jak ekran --- */
.brxe-post-content figure:has(img[width="1000"]), .entry-content figure:has(img[width="1000"]) {
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.brxe-post-content figure:has(img[width="1000"]) img, .entry-content figure:has(img[width="1000"]) img {
  border-radius: 40px;
  border: 1px solid #DDDEDF;
}

/* --- Infografika (1600×2133): większy promień, bez obramowania, pełna szerokość --- */
.brxe-post-content figure:has(img[width="1600"]) img, .entry-content figure:has(img[width="1600"]) img {
  border-radius: 32px;
}

/* --- Tabele: scroll poziomy na mobile zamiast łamania --- */
.brxe-post-content table, .entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.4;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0;
}
.brxe-post-content table thead, .brxe-post-content table tbody, .brxe-post-content table tr,
.entry-content table thead, .entry-content table tbody, .entry-content table tr { display: table; width: 100%; table-layout: fixed; }
.brxe-post-content th, .entry-content th {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  text-align: left;
  background: #E9F1FA;
  color: #141414;
  padding: 12px 14px;
}
.brxe-post-content td, .entry-content td {
  padding: 12px 14px;
  border-bottom: 1px solid #DDDEDF;
  vertical-align: top;
}
.brxe-post-content tbody tr:nth-child(even) td, .entry-content tbody tr:nth-child(even) td { background: #F7F7F7; }
.brxe-post-content table thead tr th:first-child, .entry-content table thead tr th:first-child { border-radius: 12px 0 0 0; }
.brxe-post-content table thead tr th:last-child, .entry-content table thead tr th:last-child { border-radius: 0 12px 0 0; }
@media (max-width: 600px) {
  .brxe-post-content table, .entry-content table { font-size: 14px; }
  .brxe-post-content th, .brxe-post-content td, .entry-content th, .entry-content td { padding: 10px 10px; }
  .brxe-post-content table thead, .brxe-post-content table tbody, .brxe-post-content table tr,
  .entry-content table thead, .entry-content table tbody, .entry-content table tr { min-width: 520px; }
}

/* --- Mobile: mniejsze promienie i marginesy --- */
@media (max-width: 600px) {
  .brxe-post-content figure, .entry-content figure { margin: 28px 0; }
  .brxe-post-content figure img, .entry-content figure img { border-radius: 16px; }
  .brxe-post-content figure:has(img[width="1000"]), .entry-content figure:has(img[width="1000"]) { max-width: 280px; }
  .brxe-post-content figure:has(img[width="1000"]) img, .entry-content figure:has(img[width="1000"]) img { border-radius: 32px; }
  .brxe-post-content figure:has(img[width="1600"]) img, .entry-content figure:has(img[width="1600"]) img { border-radius: 20px; }
}

/* --- Rada serwisanta (na później; w HTML: <blockquote class="rada">…</blockquote>) --- */
.brxe-post-content .rada, .entry-content .rada {
  position: relative;
  margin: 32px 0;
  padding: 22px 26px 22px 92px;
  background: #FFF6B5;
  border: 1px solid #F3E68A;
  border-radius: 32px;
  color: #363636;
  font-style: normal;
}
.brxe-post-content .rada::before, .entry-content .rada::before {
  content: "M";
  position: absolute; left: 26px; top: 22px;
  width: 48px; height: 48px; border-radius: 50%;
  background: #141414; color: #fff;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.brxe-post-content .rada::after, .entry-content .rada::after {
  content: "Rada serwisanta";
  display: block; order: -1;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #141414;
  margin-bottom: 6px;
}
.brxe-post-content .rada, .entry-content .rada { display: flex; flex-direction: column; }
.brxe-post-content .rada p, .entry-content .rada p { margin: 0; }
@media (max-width: 600px) {
  .brxe-post-content .rada, .entry-content .rada { padding: 72px 20px 20px; border-radius: 24px; }
  .brxe-post-content .rada::before, .entry-content .rada::before { left: 20px; top: 16px; }
}


/* ==========================================================================
   [2026-10] Tło jak na iflix.pl: białe + kolorowe gwiazdki u góry
   (obrazek z iflix.pl wgrany do mediów bloga: iflix-gwiazdki-tlo)
   ========================================================================== */
html:root {
  background-color: #fff;
}
html body {
  background: url("/wp-content/uploads/2026/10/iflix-header.png") no-repeat center 110px;
}
/* sekcje z własnym fioletowym tłem: nagłówek (Heading Blog), strona główna bloga (#29943), Blog Archive, Autor */
body #brxe-mcaaxz,
body #brxe-tsjnhe, body #brxe-dodsoj, body #brxe-rjyaoo, body #brxe-ejidze,
body #brxe-ffwqbv, body #brxe-cdroon, body #brxe-svvgjq, body #brxe-haavbu,
body #brxe-auhsec, body #brxe-nzupxi {
  background-color: transparent;
}
@media (max-width: 767px) {
  html body {
    background-size: 440px auto;
    background-position: center 70px;
  }
}

/* ==========================================================================
   [2026-10] Spis treści wpisu [mu-plugin iflix-blog-toc.php] + pasek postępu
   HTML spisu jest generowany po stronie serwera (indeksowalny), JS tylko podświetla sekcję.
   Od 1280 px spis pływa po lewej stronie treści, poniżej jest rozwijanym blokiem nad treścią.
   ========================================================================== */
.single-post .brxe-post-content {
  position: relative;
}
.brxe-post-content h2[id],
.brxe-post-content h3[id] {
  scroll-margin-top: 24px;
}
html:has(body.single-post) {
  scroll-behavior: smooth;
}
.brxe-post-content .iflix-toc {
  margin: 0 0 36px;
}
.iflix-toc-box {
  padding: 18px 22px;
  border: 1px solid #E5E5E5;
  border-radius: 20px;
  background: #fff;
}
.iflix-toc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #141414;
  cursor: pointer;
  list-style: none;
}
.iflix-toc-title::-webkit-details-marker {
  display: none;
}
.iflix-toc-title::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #141414;
  border-bottom: 2px solid #141414;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
}
.iflix-toc-box[open] .iflix-toc-title::after {
  transform: rotate(-135deg) translateY(-2px);
}
.brxe-post-content .iflix-toc-list,
.brxe-post-content .iflix-toc-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.brxe-post-content .iflix-toc-list {
  margin-top: 14px;
}
.brxe-post-content .iflix-toc-list li {
  margin: 0;
  padding: 0;
}
.brxe-post-content .iflix-toc-list li::before,
.brxe-post-content .iflix-toc-list li::marker {
  content: none;
}
/* nadpisujemy styl linków z treści wpisu (podkreślenie, pogrubienie) */
body .brxe-post-content .iflix-toc-list a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid #E5E5E5;
  border-radius: 0;
  background: none;
  color: #545659;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
body .brxe-post-content .iflix-toc-h3 > a {
  padding-left: 28px;
  font-size: 13px;
  font-weight: 400;
}
body .brxe-post-content .iflix-toc-list a:hover,
body .brxe-post-content .iflix-toc-list a:focus-visible {
  background: none;
  color: #141414;
}
body .brxe-post-content .iflix-toc-list a.is-active {
  border-left-color: #A8CF45;
  color: #141414;
  font-weight: 600;
}
@media (min-width: 1280px) {
  /* kolumna po lewej: od góry treści do jej końca, w środku przyklejony spis */
  .brxe-post-content .iflix-toc {
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(100% + 48px);
    width: clamp(200px, calc((100vw - 732px) / 2 - 72px), 260px);
    margin: 0;
  }
  .iflix-toc-box {
    position: sticky;
    top: 32px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .iflix-toc-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #87898B;
    cursor: default;
    pointer-events: none;
  }
  .iflix-toc-title::after {
    display: none;
  }
}

/* pasek postępu czytania */
.iflix-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  height: 4px;
  pointer-events: none;
}
.admin-bar .iflix-read-progress {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .iflix-read-progress {
    top: 46px;
  }
}
.iflix-read-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: #A8CF45;
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* [2026-10] Autor - pełne bio na stronie autora (pole „Bio - wersja pełna") */
.iflix-author-bio-long a {
  color: #141414;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.iflix-author-bio-long strong {
  font-weight: 600;
  color: #141414;
}
.iflix-author-bio-long ul,
.iflix-author-bio-long ol {
  margin: 0 0 8px;
  padding-left: 1.2em;
}
.iflix-author-bio-long ul { list-style: disc; }
.iflix-author-bio-long ol { list-style: decimal; }
@media (max-width: 700px) {
  .iflix-author-header .iflix-author-bio-long {
    text-align: left;
  }
}
