/* =========================================================================
   Strony CMS przeniesione 1:1 ze starej strony xerografia.pl („widoki własne”
   iwarePRINT, kontener .xk-wrap) — obecnie: Kontakt (komenda
   scrape_legacy_contact_page, CustomPageView slug="kontakt").

   1) Blok „LEGACY” — skopiowany BEZ ZMIAN z <style> w #view-container
      https://xerografia.pl/kontakt (stara strona nie ładowała DM Sans, więc
      w praktyce działa systemowy stos fontów — tak samo tutaj).
   2) Blok „W2P” — uzupełnienia nowego sklepu: reset Tailwind preflight,
      mapy Google w kartach oddziałów, działający formularz (zamiast
      formularza iwarePRINT) i wygląd znacznika [formularz-kontaktowy]
      w edytorze XPress.
   Plik ładowany na froncie (custom_page*.html) ORAZ wewnątrz iframe edytora
   XPress (DictConfig.richtext_content_css) — w MIS treść wygląda jak w sklepie.
   ========================================================================= */

/* ── 1) LEGACY ─────────────────────────────────────────────────────────── */
.xk-wrap *, .xk-wrap *::before, .xk-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
.xk-wrap {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #143758;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}
.xk-wrap a { text-decoration: none; color: inherit; }

/* BREADCRUMB */
.xk-breadcrumb {
  font-size: 0.75rem; color: #6b7a8d;
  padding: 1.25rem 1.5rem 0;
  max-width: 1060px; margin: 0 auto;
  display: flex; gap: 6px; align-items: center;
}
.xk-breadcrumb a { color: #0096DB; }
.xk-breadcrumb a:hover { text-decoration: underline; }
.xk-breadcrumb span { opacity: 0.45; }

/* PAGE TITLE — wyśrodkowany z eyebrow */
.xk-page-title {
  max-width: 1060px; margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  text-align: center;
}
.xk-page-title h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700; letter-spacing: -0.03em; color: #143758;
  margin-top: 6px;
}

/* LAYOUT */
.xk-section { padding: 2.25rem 1.5rem; max-width: 1060px; margin: 0 auto; }
.xk-section-sep { background: #f4f4f4; }
.xk-section-sep .xk-section { margin: 0 auto; }

.xk-sec-label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: #0096DB; margin-bottom: 4px;
}
.xk-sec-label::before, .xk-sec-label::after {
  content: ''; display: block; width: 14px; height: 1.5px;
  background: #0096DB; border-radius: 2px;
}
.xk-sec-title {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700; color: #143758;
  letter-spacing: -0.02em; text-align: center; margin-bottom: 0.4rem;
}
.xk-dept-divider {
  height: 1px; background: #e2eaf2;
  margin: 1.5rem 0 1.5rem;
}

.xk-sub-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #143758;
  text-align: center; margin-bottom: 0.4rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.xk-sub-label::before, .xk-sub-label::after {
  content: ''; display: block; width: 30px; height: 1px;
  background: #143758; border-radius: 2px; opacity: 0.3;
}

.xk-readmore-wrap { text-align: center; margin: -0.75rem auto 1.75rem; }
.xk-readmore {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 600; color: #0096DB;
  text-decoration: none; transition: gap .15s, opacity .15s;
}
.xk-readmore:hover { gap: 9px; opacity: 0.85; }
.xk-readmore svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.xk-sec-sub-wide {
  font-size: 0.88rem; color: #6b7a8d; text-align: center;
  max-width: 780px; margin: 0 auto 1.75rem; line-height: 1.6;
}

.xk-sec-sub {
  font-size: 0.85rem; color: #6b7a8d; text-align: center;
  max-width: 520px; margin: 0 auto 1.75rem;
}

/* GRID */
.xk-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 640px) { .xk-two-col { grid-template-columns: 1fr; } }

/* CARD BASE */
.xk-card { background: #fff; border: 1px solid #e2eaf2; border-radius: 16px; overflow: hidden; }

/* SALES CARDS */
.xk-sales-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 2rem 1.5rem;
  border-top: 3px solid #0096DB;
}
.xk-sales-card.xk-alt { border-top-color: #143758; }

.xk-avatar {
  width: 110px; height: 110px; border-radius: 50%; background: #0096DB;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; border: 3px solid #ddedf7;
  overflow: hidden; flex-shrink: 0;
}
.xk-sales-card.xk-alt .xk-avatar { background: #143758; }
.xk-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; border-radius: 50%; }
.xk-avatar-i { font-size: 1.45rem; font-weight: 700; color: #fff; }

.xk-s-role {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #0096DB; margin-bottom: 3px;
}
.xk-s-name { font-size: 1.05rem; font-weight: 700; color: #143758; margin-bottom: 1.2rem; }

.xk-info-list { width: 100%; display: flex; flex-direction: column; gap: 7px; }

/* Info rows — tło szare zamiast niebieskiego */
.xk-info-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #f4f4f4;
  border: 1px solid #e2eaf2; border-radius: 10px;
  text-decoration: none; color: #143758;
  font-size: 0.83rem; font-weight: 500; text-align: left;
  transition: border-color .15s;
}
.xk-info-row:hover { border-color: #0096DB; }

/* Ikona — niebieska */
.xk-i-ico {
  width: 30px; height: 30px; background: #0096DB;
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.xk-i-ico svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.xk-i-detail small {
  display: block; font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #8aa0b4; margin-bottom: 1px;
}

/* Dostępność row — niebieska ikona zegara */
.xk-avail-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #f4f4f4;
  border: 1px solid #e2eaf2; border-radius: 10px;
  font-size: 0.83rem; color: #143758; font-weight: 500; text-align: left;
}
.xk-green-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }

/* Przycisk Zadzwoń — różowy, biały tekst */
.xk-call-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 1.1rem; padding: 10px 22px;
  background: #E7247F; color: #fff !important; border-radius: 50px;
  font-size: 0.82rem; font-weight: 700; text-decoration: none;
  letter-spacing: 0.04em; transition: opacity .15s;
}
.xk-call-btn:hover { opacity: 0.88; color: #fff !important; }
.xk-call-btn svg { width: 13px; height: 13px; fill: none; stroke: #fff !important; stroke-width: 2.5; stroke-linecap: round; }

/* BRANCH CARDS — bez badge-ów */
.xk-branch-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 2rem 1.75rem;
}
.xk-b-name { font-size: 1.05rem; font-weight: 700; color: #143758; margin-bottom: 6px; }
.xk-b-addr { font-size: 0.85rem; color: #6b7a8d; line-height: 1.7; margin-bottom: 1.25rem; }
.xk-b-addr strong { display: block; color: #143758; font-weight: 600; }

/* Godziny — rozsunięte justify-content: space-between */
.xk-hours-block {
  background: #fff; border: 1px solid #e2eaf2;
  border-radius: 10px; padding: 14px 20px; width: 100%;
  margin-bottom: 1.25rem;
}
.xk-h-label {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #0096DB; margin-bottom: 10px; text-align: center;
}
.xk-h-line {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.8rem; color: #143758; margin-bottom: 6px;
  padding: 0 4px;
}
.xk-h-line:last-child { margin-bottom: 0; }
.xk-h-line .xk-day { color: #6b7a8d; }
.xk-h-line .xk-time { font-weight: 600; }

.xk-contact-block {
  display: flex; flex-direction: column; gap: 6px;
  width: 100%; margin-bottom: 1.75rem;
}
.xk-c-link {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 0.83rem; font-weight: 500; color: #143758;
  text-decoration: none; padding: 9px 12px;
  border: 1px solid #e2eaf2; border-radius: 9px;
  background: #fff; transition: border-color .15s, color .15s;
}
.xk-c-link:hover { border-color: #0096DB; color: #0096DB; }
.xk-c-link svg { width: 13px; height: 13px; fill: none; stroke: #0096DB; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }

.xk-route-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px;
  border: 2px solid #0096DB; color: #0096DB;
  border-radius: 50px; font-size: 0.82rem; font-weight: 700;
  text-decoration: none; letter-spacing: 0.04em;
  transition: background .15s, color .15s;
}
.xk-route-btn:hover { background: #0096DB; color: #fff; }
.xk-route-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }

/* FORM */
.xk-form-wrap { max-width: 680px; margin: 0 auto; }
.xk-form-tabs {
  display: flex; gap: 4px; background: #eef3f7; padding: 4px;
  border-radius: 50px; width: fit-content; margin: 0 auto 1.5rem;
}
.xk-tab-btn {
  padding: 8px 20px; border-radius: 50px; border: none;
  font-family: inherit; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; color: #6b7a8d; background: transparent;
  transition: background .15s, color .15s;
}
.xk-tab-btn.xk-active { background: #0096DB; color: #fff; }

.xk-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .xk-form-grid { grid-template-columns: 1fr; } }
.xk-field { display: flex; flex-direction: column; gap: 5px; }
.xk-field.xk-full { grid-column: 1 / -1; }
.xk-field label { font-size: 0.68rem; font-weight: 700; color: #143758; letter-spacing: 0.08em; text-transform: uppercase; }
.xk-field input, .xk-field select, .xk-field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #dde7ef; border-radius: 10px;
  font-family: inherit; font-size: 0.88rem; color: #143758;
  background: #fff; outline: none; transition: border-color .15s; -webkit-appearance: none;
}
.xk-field input:focus, .xk-field select:focus, .xk-field textarea:focus { border-color: #0096DB; }
.xk-field textarea { min-height: 120px; resize: vertical; }

.xk-checks { margin-top: 12px; }
.xk-check-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 8px; }
.xk-check-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: #0096DB; cursor: pointer; flex-shrink: 0; margin-top: 3px; }
.xk-check-row label { font-size: 0.76rem; color: #6b7a8d; line-height: 1.55; cursor: pointer; }

.xk-submit-wrap { text-align: center; margin-top: 1.25rem; }
.xk-submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px; background: #E7247F; color: #fff;
  border: none; border-radius: 50px; font-family: inherit;
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  letter-spacing: 0.04em; transition: opacity .15s;
}
.xk-submit-btn:hover { opacity: 0.88; }
.xk-submit-btn svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; }

/* ── 2) W2P ────────────────────────────────────────────────────────────── */
.xk-wrap address { font-style: normal; }

/* Mapa Google w karcie oddziału (iframe) */
.xk-map {
  width: 100%; height: 220px; margin-bottom: 1.25rem;
  border: 1px solid #e2eaf2; border-radius: 10px; overflow: hidden; background: #eef3f7;
}
.xk-map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Znacznik [formularz-kontaktowy] — widoczny tylko w edytorze (na froncie
   podmieniany na formularz w apps.core.views._render_page_content). */
.xk-form-slot {
  max-width: 680px; margin: 0 auto !important; padding: 1.5rem 1rem !important;
  border: 2px dashed #0096DB; border-radius: 12px; background: #f2f9fd;
  color: #0096DB; font-weight: 700; font-size: 0.85rem; text-align: center;
}

/* Formularz (templates/cms/modules/_contact_form_xk.html) */
.xk-form-wrap form { margin: 0; }
.xk-field input[type="checkbox"] { width: 15px; }
.xk-errors {
  margin-bottom: 1rem; padding: 12px 16px; border-radius: 10px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 0.82rem;
}
.xk-errors li { list-style: disc; margin-left: 1.1rem; }
.xk-success {
  text-align: center; padding: 2rem 1.5rem;
  border: 1px solid #e2eaf2; border-top: 3px solid #22c55e; border-radius: 16px; background: #fff;
}
.xk-success-ico {
  width: 52px; height: 52px; border-radius: 50%; background: #dcfce7;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
}
.xk-success-ico svg { width: 24px; height: 24px; fill: none; stroke: #16a34a; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.xk-success h3 { font-size: 1.05rem; font-weight: 700; color: #143758; margin-bottom: 4px; }
.xk-success p { font-size: 0.88rem; color: #6b7a8d; }
.xk-submit-btn[disabled] { opacity: 0.6; cursor: wait; }
