/* =========================================================================
   Opisy produktow przeniesione 1:1 ze starej strony xerografia.pl
   (komenda scrape_xerografia_descriptions). Kontener: .legacy-desc

   1) Kontekst bazowy - zmierzone computed styles "golych" tagow w kontenerze
      #produktOpis starej strony (Bootstrap 5 + motyw iwareprint8). Selektory
      .legacy-desc :where(tag) maja specyficznosc 0,1,0: wygrywaja z Tailwind
      preflight (0,0,1), a remisuja z klasami opisu (.xf-prod__p itd.), ktore
      stoja NIZEJ w pliku - tak jak na starej stronie klasa wygrywa z baza.
   2) Bloki .xf-prod, .xf-guidelines, .xf-tab skopiowane z https://xerografia.pl/api/themeCss
      (sekcja "OPIS PRODUKTU (.xf-prod)"), zmienne --brand-* z tego samego pliku.
   Style inline w opisach (560 atrybutow style="") dzialaja bez tego pliku,
   ale dziedzicza kolor/czcionke/marginesy z punktu 1).
   ========================================================================= */

.legacy-desc {
  --brand-blue: #0096DB;
  --brand-accent: #E7247F;
  --brand-text: #143758;
  margin: 24px 0 16px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: left;
}
.legacy-desc :where(*, *::before, *::after) { box-sizing: border-box; }

.legacy-desc :where(h1, h2, h3, h4, h5, h6) {
  font-family: Roboto, sans-serif;
  line-height: 1.2;
  color: inherit;
  padding: 0;
}
.legacy-desc :where(h1) { font-size: 38px; font-weight: 700; margin: 0 0 8px; }
.legacy-desc :where(h2) { font-size: 31px; font-weight: 700; margin: 0 0 20px; }
.legacy-desc :where(h3) { font-size: 16px; font-weight: 400; margin: 0 0 20px; }
.legacy-desc :where(h4, h5, h6) { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
/* Dawne <h1> z opisow zamienione na <h2 class="legacy-h1"> (SEO) - wyglad bazowy starego h1.
   Tytuly z klasa .xf-prod__title / stylami inline i tak nadpisuja rozmiar, wage i marginesy. */
.legacy-desc :where(h2.legacy-h1) { font-size: 38px; font-weight: 700; margin: 0 0 8px; }

.legacy-desc :where(p) { margin: 0 0 16px 16px; }
/* styles.css starej strony: .container .mt-4 ul { background: var(--bs-gray-100); padding: 1rem 2rem; border-radius: 1em } */
.legacy-desc :where(ul) { margin: 0 0 16px; padding: 16px 32px; list-style: disc; background: #f8f9fa; border-radius: 1em; }
.legacy-desc :where(ol) { margin: 0 0 16px; padding: 0 0 0 32px; list-style: decimal; }
.legacy-desc :where(li) { margin: 0; padding: 0; }
.legacy-desc :where(a) { color: #0096DB; text-decoration: underline; }
.legacy-desc :where(strong, b) { font-weight: 700; }
.legacy-desc :where(em, i) { font-style: italic; }
.legacy-desc :where(small) { font-size: 14px; }
.legacy-desc :where(table) { border-collapse: collapse; }
.legacy-desc :where(th) { font-weight: 700; text-align: left; padding: 1px; vertical-align: middle; }
.legacy-desc :where(td) { padding: 1px; vertical-align: middle; }
.legacy-desc :where(hr) { margin: 16px 0; }
.legacy-desc :where(blockquote) { margin: 0 0 16px; }
.legacy-desc :where(img) { display: inline; vertical-align: middle; max-width: 100%; height: auto; }

/* =========================================================
   OPIS PRODUKTU (.xf-prod) - 1:1 z themeCss starej strony
   ========================================================= */
.xf-prod {
  background: #fff;
  padding: 18px 0;
}
.xf-prod__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}
.xf-prod__box {
  background: #fff;
  border: 1px solid rgba(20, 55, 88, .12);
  border-radius: 14px;
  overflow: hidden;
  padding: 28px;
  margin: 10px 0;
  text-align: left;
  box-sizing: border-box;
}
.xf-prod__box p,
.xf-prod__box h1,
.xf-prod__box h2,
.xf-prod__box h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
  text-align: left;
}
.xf-prod__head { margin-bottom: 14px; }
.xf-prod__title {
  margin: 0 0 8px;
  color: var(--brand-text);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}
.xf-prod__lead {
  margin: 0;
  color: rgba(20, 55, 88, .84);
  font-size: 14px;
  line-height: 1.7;
}
.xf-prod__items {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}
.xf-prod__item { text-align: left; }
.xf-prod__h {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
.xf-prod__h::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 100%;
  background: rgba(20, 55, 88, .16);
}
.xf-prod__p {
  margin: 0;
  color: rgba(20, 55, 88, .84);
  font-size: 14px;
  line-height: 1.6;
}
.xf-prod__p--note {
  margin-top: 8px;
  color: rgba(20, 55, 88, .74);
}
.xf-prod__link-inline {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid rgba(0, 150, 219, .25);
  padding-bottom: 2px;
}
.xf-prod__link-inline:hover {
  color: var(--brand-accent);
  border-bottom-color: rgba(231, 36, 127, .35);
}
.xf-prod__more {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(20, 55, 88, .10);
}
.xf-prod__more-title {
  margin: 0 0 6px;
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 800;
}
.xf-prod__more-sub {
  margin: 0 0 12px;
  color: rgba(20, 55, 88, .74);
  font-size: 13px;
  line-height: 1.5;
}
.xf-prod__chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.xf-prod__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(20, 55, 88, .12);
  color: rgba(20, 55, 88, .90);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform .08s ease, border-color .12s ease, color .12s ease;
}
.xf-prod__chip:hover {
  border-color: rgba(0, 150, 219, .35);
  color: var(--brand-blue);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .xf-prod {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  .xf-prod__inner { max-width: 100%; padding: 0 12px; }
  .xf-prod__box { width: 100%; max-width: 100%; margin: 0; padding: 18px; box-sizing: border-box; }
  .xf-prod__chip { width: 100%; justify-content: flex-start; }
}

/* Zakladki "Przygotowanie pliku" (.xf-guidelines) i "Zamow projekt" (.xf-tab) - 1:1 z themeCss starej strony */
/* =========================================================
   PRZYGOTOWANIE PLIKU (.xf-guidelines)
   ========================================================= */
.xf-guidelines,
.xf-guidelines * { box-sizing: border-box; }
.xf-guidelines {
  background: #fff;
  padding: 18px 0;
}
.xf-guidelines__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}
.xf-guidelines__list {
  background: #fff;
  border: 1px solid rgba(20, 55, 88, .12);
  border-radius: 14px;
  overflow: hidden;
  padding: 18px;
}
.xf-guidelines__item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  align-items: start;
  width: 100%;
}
.xf-guidelines__icon {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(20, 55, 88, .14);
  box-shadow: 0 8px 18px rgba(20, 55, 88, .06);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--brand-blue);
}
.xf-ico { width: 46px; height: 46px; display: block; }
.xf-ico--cmyk { width: 48px; height: 48px; }
.xf-guidelines__content { min-width: 0; text-align: left; }
.xf-guidelines__h {
  margin: 0 0 6px;
  color: var(--brand-blue);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}
.xf-guidelines__p {
  margin: 0;
  color: rgba(20, 55, 88, .84);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.xf-guidelines__p--note { margin-top: 8px; }
.xf-guidelines__contact {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid rgba(0, 150, 219, .22);
  padding-bottom: 2px;
  margin-left: 6px;
}
.xf-guidelines__contact:hover {
  color: var(--brand-accent);
  border-bottom-color: rgba(231, 36, 127, .35);
}
.xf-guidelines__link {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand-blue);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid rgba(0, 150, 219, .25);
  padding-bottom: 2px;
}
.xf-guidelines__link:hover {
  color: var(--brand-accent);
  border-bottom-color: rgba(231, 36, 127, .35);
}

@media (max-width: 640px) {
  .xf-guidelines {
    width: calc(100% + 72px) !important;
    margin-left: -36px !important;
    margin-right: -36px !important;
  }
  .xf-guidelines__inner { max-width: 100% !important; padding-left: 6px !important; padding-right: 6px !important; }
  .xf-guidelines__list { width: 100% !important; max-width: 100% !important; padding: 14px !important; overflow: hidden; }
  .xf-guidelines__item { grid-template-columns: 72px minmax(0, 1fr) !important; gap: 12px !important; padding: 12px 0 !important; }
  .xf-guidelines__icon { width: 72px !important; height: 72px !important; }
  .xf-ico { width: 40px !important; height: 40px !important; }
  .xf-ico--cmyk { width: 42px !important; height: 42px !important; }
}


/* =========================================================
   ZAKŁADKA: ZAMÓW PROJEKT (.xf-tab)
   ========================================================= */
.xf-tab {
  background: #fff;
  padding: 18px 0;
}
.xf-tab,
.xf-tab * { font-family: inherit !important; }
.xf-tab__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  box-sizing: border-box;
}
.xf-tab__box {
  background: #fff;
  border: 1px solid rgba(20, 55, 88, .12);
  border-radius: 14px;
  overflow: hidden;
  padding: 28px;
  margin: 10px 0;
  text-align: left;
  box-sizing: border-box;
}
.xf-tab__head { margin-bottom: 14px; }
.xf-tab__title {
  margin: 0 0 8px;
  color: var(--brand-text);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}
.xf-tab__lead {
  margin: 0;
  color: rgba(20, 55, 88, .84);
  font-size: 14px !important;
  line-height: 1.7 !important;
}
.xf-tab__grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
@media (min-width: 860px) {
  .xf-tab__grid { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .xf-tab__card { height: 100%; }
}
.xf-tab__card {
  border: 1px solid rgba(20, 55, 88, .10);
  border-radius: 14px;
  padding: 16px;
  box-sizing: border-box;
  background: #fff;
}
.xf-tab__h {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
.xf-tab__h::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 100%;
  background: rgba(20, 55, 88, .16);
}
.xf-tab__p,
.xf-tab__bullet,
.xf-tab__stepTxt,
.xf-tab__miniText {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: rgba(20, 55, 88, .84);
}
.xf-tab__p { margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.xf-tab__p--note { margin-top: 10px; color: rgba(20, 55, 88, .74); }
.xf-tab__link {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid rgba(0, 150, 219, .25);
  padding-bottom: 2px;
}
.xf-tab__link:hover {
  color: var(--brand-accent);
  border-bottom-color: rgba(231, 36, 127, .35);
}
.xf-tab__bullets { display: grid; gap: 8px; margin-top: 2px; }
.xf-tab__bullet { position: relative; padding-left: 18px; }
.xf-tab__bullet::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(0, 150, 219, .30);
}
.xf-tab__steps { display: grid; gap: 10px; margin-top: 2px; }
.xf-tab__step { display: flex; gap: 10px; align-items: flex-start; }
.xf-tab__stepNo {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(20, 55, 88, .14);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  margin-top: 2px;
}
.xf-tab__mini { display: grid; gap: 10px; margin-top: 2px; }
.xf-tab__miniRow {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid rgba(20, 55, 88, .08);
}
.xf-tab__miniRow:first-child { border-top: 0; padding-top: 0; }
.xf-tab__miniLabel { color: rgba(20, 55, 88, .90); font-weight: 800; font-size: 13px; }

/* CTA */
.xf-tab__cta {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(20, 55, 88, .10);
}
.xf-tab__ctaBox {
  border: 1px solid rgba(20, 55, 88, .12);
  border-radius: 14px;
  padding: 16px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(245, 249, 255, .55), #fff);
}
.xf-tab__ctaTitle {
  margin: 0 0 6px;
  color: var(--brand-text);
  font-weight: 800;
  font-size: 15px !important;
  line-height: 1.3 !important;
}
.xf-tab__ctaText {
  margin: 0;
  color: rgba(20, 55, 88, .84) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}
.xf-tab__ctaBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(20, 55, 88, .12);
  color: rgba(20, 55, 88, .90);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: transform .08s ease, border-color .12s ease, color .12s ease;
  margin-top: 12px;
}
.xf-tab__ctaBtn:hover {
  border-color: rgba(0, 150, 219, .35);
  color: var(--brand-blue);
  transform: translateY(-1px);
}

/* Timing */
.xf-tab__cta--timing {
  border-top: 0 !important;
  padding-top: 0 !important;
  margin-top: 16px;
}
.xf-tab__cta--timing .xf-tab__ctaBox {
  background: #fff !important;
  border: 2px solid rgba(231, 36, 127, .28) !important;
}
.xf-tab__cta--timing .xf-tab__ctaTitle { color: var(--brand-blue) !important; }
.xf-tab__cta--timing strong { font-weight: 800; color: inherit; }

@media (max-width: 640px) {
  .xf-tab { width: auto !important; margin: 0 !important; }
  .xf-tab__inner { max-width: 100% !important; padding-left: 12px !important; padding-right: 12px !important; box-sizing: border-box; }
  .xf-tab__box {
    width: calc(100% + 72px) !important;
    margin-left: -36px !important;
    margin-right: -36px !important;
    padding: 18px !important;
    box-sizing: border-box;
    overflow: hidden;
  }
  .xf-tab__card { padding: 14px; }
}

/* Dopasowanie do kontenera nowego sklepu (px-6 = 24px zamiast 36px na starej stronie):
   stary -36px wypychal ramke .xf-guidelines__list 5px poza ekran telefonu. */
@media (max-width: 640px) {
  .legacy-desc .xf-guidelines {
    width: calc(100% + 48px) !important;
    margin-left: -24px !important;
    margin-right: -24px !important;
  }
}

/* Pelna szerokosc gridu strony produktu (desktop): stary motyw centrowal tresc w kolumnie
   max 1100px z wlasnym paddingiem 18px - w nowym sklepie odstep od krawedzi daje juz
   wrapper zakladek (md:px-10), wiec ramki wyrownuja sie do szerokosci kalkulatora.
   Telefon (<=640px) zostaje na regulach mobilnych motywu. */
@media (min-width: 641px) {
  .legacy-desc .xf-prod__inner,
  .legacy-desc .xf-guidelines__inner,
  .legacy-desc .xf-tab__inner {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }
}
