/* Wyszukiwarka FiboSearch — pill bar, jasnoszare tło, lupa po lewej, zielony pill button "Szukaj" po prawej. */

.maxi-search-cell{
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  width: auto;
  margin: 0;
}
.maxi-search-cell.wp-block-group{
  max-width: none;
}
.maxi-search-cell > *{
  max-width: none;
}

/* Outer wrap = pill (radius full, jasnoszare tło).
   margin: 0 auto — centruje wrapper w cell (FiboSearch capuje wrapper na max-width:600px,
   bez auto-margin siedzialby lewy-aligned w szerszym cellu = wizualnie nie na srodku headera). */
.dgwt-wcas-search-wrapp{
  width: 100%;
  height: 52px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  position: relative;
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: visible;
}

/* Lupa SVG po lewej wewnątrz pola (jako mask na ::before) */
.dgwt-wcas-search-wrapp::before{
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: #6b7280;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>") no-repeat center / contain;
  pointer-events: none;
  z-index: 2;
}

.dgwt-wcas-search-form{
  width: 100%;
  height: 100%;
  margin: 0;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp{
  display: flex !important;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  position: relative;
  max-width: none;
  overflow: visible;
}

/* Input — pelna szerokosc, padding-left 50 (dla lupy), padding-right 120 (dla buttona).
   Po wszystkich kaskadach z FiboSearch dajemy !important na paddingi by raz a dobrze. */
body .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{
  order: 1;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 120px 0 50px !important;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 15px;
  color: #1f2937;
  text-align: left;
  font-style: normal;
}

/* Suggestions dropdown (po szukaniu) — bialy panel pod searchem, zaokraglone rogi, cien */
.dgwt-wcas-suggestions-wrapp{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  margin-top: 8px;
  padding: 8px 0;
  overflow: hidden;
}
.dgwt-wcas-suggestion{
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.dgwt-wcas-suggestion:last-child{ border-bottom: 0; }
.dgwt-wcas-suggestion:hover,
.dgwt-wcas-suggestion.dgwt-wcas-suggestion-focused{
  background: #f9fafb;
}
/* "No results" notice — wycentruj + czytelna */
.dgwt-wcas-nores,
.dgwt-wcas-suggestion-nores{
  padding: 24px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}
/* Hover/focus — zachowaj transparent bg, by nie wystrzelil bialy prostokat nad pill wrappera.
   FiboSearch ma input:hover{background-color:#fff} z bardzo wysoka specyficznoscia — matchujemy ja. */
.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp.dgwt-wcas-search-focused .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:hover,
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:hover,
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus{
  background: transparent;
}

/* Submit button = zielony pill z tekstem "Szukaj" (SVG ukryty) */
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{
  order: 2;
  position: absolute;
  inset: auto 6px auto auto;
  left: auto;
  right: 6px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  height: 36px;
  min-height: 36px;
  width: auto;
  min-width: 0;
  max-width: none;
  flex: 0 0 auto;
  padding: 0 18px;
  margin: 0;
  background: #007236;
  color: #fff;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
  animation: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit::after{
  content: "SZUKAJ";
  color: #fff;
  font-weight: 500;
  letter-spacing: .04em;
}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg{
  display: none !important;
}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover{
  background: #005c2b;
  box-shadow: none;
  border-radius: 999px; /* FiboSearch w hoverze wstrzykuje border-radius:100% — robi z buttona elipse (blob). Wymuszamy pill. */
  opacity: 1;
}
/* FiboSearch wstrzykuje pseudo-element ::before na buttonie (Personalization.php — tooltip-arrow
   z transparent border + bg color). Na hover pojawia sie ten "ciemny blob/ogonek" za buttonem. Wylaczamy. */
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit::before,
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover::before,
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:focus::before{
  display: none;
  content: none;
  border: 0;
  background: none;
}

/* Placeholder — szary, średni weight */
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder{
  color: #6b7280; opacity: 1;
  font-weight: 500; font-size: 15px; font-style: normal;
}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-webkit-input-placeholder{
  color: #6b7280; opacity: 1;
  font-weight: 500; font-size: 15px;
}
.dgwt-wcas-search-input:focus::placeholder{ color: transparent; }

/* Voice search + screen-reader label */
.dgwt-wcas-search-wrapp .screen-reader-text{ position: absolute; left: -9999px; }
.dgwt-wcas-voice-search{ display: none; }

/* Preloader (loader podczas szukania) — przed buttonem */
.dgwt-wcas-style-pirx .dgwt-wcas-preloader{
  position: absolute;
  right: 110px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
}

/* Hide native FiboSearch label paragraph if it exists */
.dgwt-wcas-search-wrapp label.screen-reader-text + br{ display: none; }

/* === Blocksy header: FiboSearch w elemencie „Tekst" (.ct-header-text) ===
   Pod Blocksy search siedzi w wąskiej kolumnie i zwija się do domyślnej szerokości
   („waziutka"). Rozciągamy go w szeroki pasek. .ct-header-text istnieje TYLKO pod
   Blocksy — na prodzie (Greenshift FSE) reguła jest bezczynna. */
.ct-header-text .entry-content{ width: 100%; }
.ct-header-text .entry-content > p{ width: 100% !important; margin: 0; }
.ct-header-text .dgwt-wcas-search-wrapp{
  width: 100%;
  max-width: 820px;
  min-width: 680px;       /* nie pozwala kolumnie zwinąć searcha do paska */
  margin: 0 auto;
}
@media (max-width: 768px){
  .ct-header-text .dgwt-wcas-search-wrapp{ min-width: 0; max-width: none; }
}
