/* ==========================================================================
   Formularze AVM — kontakt [avm_kontakt] i serwis / reklamacje.

   Jeden wygląd dla obu: etykieta nad polem, pola 48 px z zaokrągleniem 9 px,
   checkbox 20 px w wierszu z tekstem, przycisk w kolorze sklepu. Ten sam układ
   ma formularz zapytania na karcie produktu (product.css w motywie).

   Kolory biorą zmienne motywu `avm`, a gdy ich nie ma (produkcja na Blocksy) —
   paletę firmową z wartości zapasowych.
   ========================================================================== */

.avm-form,
.av-form.av-form--service{
  --f-ko:var(--avm-ko,#121e65);
  --f-ko-d:var(--avm-ko-d,#0c1550);
  --f-lin:var(--avm-lin,#dfe3ea);
  --f-tx:var(--avm-tx,#1b2440);
  --f-mut:var(--avm-mut,#5a6480);
  --f-cz:var(--avm-cz,#d92d20);
  --f-bg:var(--avm-bg,#f3f4f6);
}

/* ——— komunikaty po wysłaniu ——— */
.avm-komunikat{
  position:relative;margin:0 0 16px;padding:13px 16px 13px 44px;border-radius:10px;
  font-size:14.5px;line-height:1.55;
}
.avm-komunikat::before{
  font-family:"Font Awesome 6 Free";font-weight:900;font-size:16px;line-height:1;
  position:absolute;left:16px;top:15px;
}
.avm-komunikat--ok{background:#e8f3ec;border:1px solid #9fd0ae;color:#0e561f}
.avm-komunikat--ok::before{content:"\f058";content:"\f058"/""}
.avm-komunikat--blad{background:#fdecea;border:1px solid #f3b4ae;color:#a11c12}
.avm-komunikat--blad::before{content:"\f06a";content:"\f06a"/""}

/* ==========================================================================
   Formularz kontaktowy [avm_kontakt]
   ========================================================================== */
.avm-form--kontakt .avm-form__siatka{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.avm-form--kontakt .avm-form__etykieta{display:block;margin:0}
.avm-form--kontakt .avm-form__etykieta--szeroka{grid-column:1 / -1}
.avm-form--kontakt .avm-form__etykieta > span{
  display:block;margin:0 0 6px;font-size:13.5px;font-weight:600;line-height:1.4;color:var(--f-tx);
}
.avm-form--kontakt .avm-form__etykieta b{color:var(--f-cz);font-weight:700}

.avm-form--kontakt .avm-form__pole,
.avm-form--kontakt .avm-form__tekst{
  display:block;width:100%;box-sizing:border-box;margin:0;
  border:1px solid var(--f-lin);border-radius:9px;background:#fff;
  font-family:inherit;font-size:15px;color:var(--f-tx);outline:0;
}
.avm-form--kontakt .avm-form__pole{height:48px;padding:0 14px}
.avm-form--kontakt .avm-form__tekst{min-height:130px;padding:12px 14px;line-height:1.5;resize:vertical}
.avm-form--kontakt .avm-form__pole:focus,
.avm-form--kontakt .avm-form__tekst:focus{border-color:var(--f-ko);box-shadow:0 0 0 3px rgba(37,99,235,.16)}

.avm-form .avm-recaptcha{margin-top:16px}

/* Selektor z nazwą elementu i !important: paleta Blocksy wchodzi w
   button[type="submit"] inline CSS-em i wygrywa specyficznością z samą klasą. */
.avm-form button.avm-form__przycisk{
  display:block;width:100%;height:52px;margin-top:16px;padding:0 24px;
  border:0 !important;border-radius:9px !important;cursor:pointer;
  background:var(--f-ko) !important;color:#fff !important;
  font-family:inherit;font-size:16px !important;font-weight:700 !important;
}
.avm-form button.avm-form__przycisk:hover{background:var(--f-ko-d) !important}

/* ==========================================================================
   Formularz serwisowy — znaczniki siedzą w treści strony „Serwis / Reklamacje",
   razem z jej własnym <style>. wpautop dokłada tam <br> w każdej etykiecie
   i puste <p> (także jako elementy siatki), co dawało pasy pustego miejsca
   i gwiazdkę pod etykietą. Porządkujemy to tutaj zamiast przepisywać treść.

   Przedrostek `section.av-form.av-form--service` celowo z nazwą elementu —
   musi przebić `.avm-strona__tresc .av-form …` z arkusza stron motywu.
   ========================================================================== */
section.av-form.av-form--service{padding:0;background:transparent;border-radius:0}
section.av-form.av-form--service br{display:none}
section.av-form.av-form--service form > p,
section.av-form.av-form--service .av-form__captcha > p{margin:0}
section.av-form.av-form--service .av-form__grid > p{display:none}
section.av-form.av-form--service .av-form__lead{margin:0 0 20px;color:var(--f-mut)}

/* Akapit ze skryptem reCAPTCHA pod formularzem — sam skrypt działa dalej,
   znika tylko pusta linia na dole karty. */
.av-form--service + p:has(> script){display:none}

section.av-form.av-form--service .av-form__grid{gap:16px 24px}
section.av-form.av-form--service .av-form__field{position:relative;margin:0}
section.av-form.av-form--service .av-form__field > label{
  display:block;margin:0 0 6px;font-size:13.5px;font-weight:600;line-height:1.4;color:var(--f-tx);
}
section.av-form.av-form--service .av-form__field > label > span{
  display:inline;margin:0;font-size:inherit;color:var(--f-cz);
}
/* „OPIS USTERKI" jest w treści wersalikami, reszta etykiet zwyczajnie. */
section.av-form.av-form--service label[for="opis-usterki"]{text-transform:lowercase}
section.av-form.av-form--service label[for="opis-usterki"]::first-letter{text-transform:uppercase}

section.av-form.av-form--service input[type="text"],
section.av-form.av-form--service input[type="email"],
section.av-form.av-form--service input[type="tel"],
section.av-form.av-form--service input[type="date"],
section.av-form.av-form--service select,
section.av-form.av-form--service textarea{
  display:block;width:100%;box-sizing:border-box;margin:0;
  border:1px solid var(--f-lin);border-radius:9px;background-color:#fff;
  font-family:inherit;font-size:15px;color:var(--f-tx);outline:0;
}
section.av-form.av-form--service input[type="text"],
section.av-form.av-form--service input[type="email"],
section.av-form.av-form--service input[type="tel"],
section.av-form.av-form--service input[type="date"],
section.av-form.av-form--service select{height:48px;padding:0 14px}
section.av-form.av-form--service textarea{min-height:110px;padding:12px 14px;line-height:1.5;resize:vertical}
section.av-form.av-form--service textarea#opis-usterki{min-height:150px}

section.av-form.av-form--service .av-form__hint{
  display:block;margin:6px 0 0;font-size:12.5px;line-height:1.5;color:var(--f-mut);opacity:1;
}
section.av-form.av-form--service .av-form__sep{border:0;border-top:1px solid var(--f-lin);margin:24px 0}

/* ——— pole pliku (etykietę-przycisk dokłada formularze.js) ——— */
section.av-form.av-form--service input.avm-plik__pole{
  position:absolute;width:1px;height:1px;padding:0;margin:0;border:0;
  opacity:0;overflow:hidden;clip-path:inset(50%);
}
/* `.av-form__field > label.avm-plik` — musi przebić regułę etykiet pól wyżej,
   bo etykieta-przycisk też jest <label> bezpośrednio w polu. */
section.av-form.av-form--service .av-form__field > label.avm-plik{
  display:flex;align-items:center;gap:12px;min-height:48px;margin:0;padding:6px 14px 6px 6px;
  border:1px dashed #c5ccd8;border-radius:9px;background:#fff;cursor:pointer;
  font-size:14px;font-weight:400;
}
section.av-form.av-form--service .avm-plik:hover{border-color:var(--f-ko)}
section.av-form.av-form--service .avm-plik__pole:focus-visible + .avm-plik{
  border-color:var(--f-ko);box-shadow:0 0 0 3px rgba(37,99,235,.16);
}
section.av-form.av-form--service .avm-plik > .avm-plik__przycisk{
  display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;height:36px;margin:0;padding:0 14px;
  border-radius:7px;background:var(--f-bg);color:var(--f-tx);font-size:14px;font-weight:600;
}
section.av-form.av-form--service .avm-plik__przycisk i{color:var(--f-ko)}
section.av-form.av-form--service .avm-plik > .avm-plik__nazwa{
  display:block;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:13.5px;font-weight:400;color:var(--f-mut);
}
section.av-form.av-form--service .avm-plik--wybrany > .avm-plik__nazwa{color:var(--f-tx);font-weight:600}

/* ——— zgoda i reCAPTCHA ——— */
section.av-form.av-form--service .av-form__consents{margin:22px 0 0}
section.av-form.av-form--service label.av-form__checkbox{
  display:flex;gap:10px;align-items:flex-start;margin:0;cursor:pointer;
  font-size:13.5px;font-weight:400;line-height:20px;color:var(--f-tx);
}
section.av-form.av-form--service .av-form__checkbox input{
  flex:0 0 20px;width:20px;height:20px;margin:0;accent-color:var(--f-ko);cursor:pointer;
}
section.av-form.av-form--service .av-form__checkbox > span{
  display:block;margin:0;font-size:13.5px;font-weight:400;line-height:20px;color:var(--f-tx);
}
section.av-form.av-form--service .av-form__checkbox b{color:var(--f-cz)}
section.av-form.av-form--service .av-form__consents > .av-form__hint{margin:6px 0 0 30px}
section.av-form.av-form--service .av-form__captcha{margin:18px 0 0}

section.av-form.av-form--service form > p:has(> button){margin:18px 0 0}
section.av-form.av-form--service button.av-btn{
  min-width:240px;height:52px;padding:0 28px;
  border:0 !important;border-radius:9px !important;
  background:var(--f-ko) !important;color:#fff !important;
  font-size:16px !important;font-weight:700 !important;
}
section.av-form.av-form--service button.av-btn:hover{background:var(--f-ko-d) !important}

/* ==========================================================================
   Telefon
   ========================================================================== */
@media (max-width:640px){
  .avm-form--kontakt .avm-form__siatka{grid-template-columns:1fr}
  section.av-form.av-form--service .av-form__grid{grid-template-columns:1fr;gap:14px}
  section.av-form.av-form--service .av-form__sep{margin:20px 0}
  section.av-form.av-form--service button.av-btn{width:100%;min-width:0}

  /* 16 px w polach: przy mniejszym foncie Safari na iPhonie powiększa stronę
     przy każdym dotknięciu pola. */
  .avm-form--kontakt .avm-form__pole,
  .avm-form--kontakt .avm-form__tekst,
  section.av-form.av-form--service input,
  section.av-form.av-form--service select,
  section.av-form.av-form--service textarea{font-size:16px}
}
