/* ============================================================
   gravity-3pg.css — skórka Gravity Forms w stylu 3PG (.lp-form)
   Podpiąć w motywie PO 3pg.css i gated.css:
     wp_enqueue_style('gravity-3pg', ..., ['3pg','gated']);
   Formularz GF wstawiamy w miejsce makiety .lp-form (np. w .lp-card
   w hero oraz w sekcji .lp-form-main). Działa dla GF 2.5+.
   Wymaga tokenów z 3pg.css (--blue, --navy, --line, --muted, --ink, --font, --paper-2).
   ============================================================ */

/* ---- kontener ---- */
.gform_wrapper.gravity-theme,
.lp-card .gform_wrapper,
.lp-form-main .gform_wrapper { margin: 0; padding: 24px 24px 26px; }
.lp-card .gform_wrapper { /* gdy GF zastępuje formularz w karcie */ }
.gform_wrapper .gform_heading { display: none; } /* tytuł sterujemy z .lp-form-h / .lp-tt */

/* ---- siatka pól (jak .lp-form) ---- */
.gform_wrapper .gform_fields {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 16px;
}
.gform_wrapper .gfield { grid-column: 1 / -1; margin-bottom: 13px; }
.gform_wrapper .gfield.gfield--width-half { grid-column: span 6; }
@media (max-width: 480px) {
  .gform_wrapper .gfield.gfield--width-half { grid-column: 1 / -1; }
}

/* ---- etykiety (jak .lp-field label) ---- */
.gform_wrapper .gfield_label,
.gform_wrapper legend.gfield_label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  letter-spacing: .02em; margin-bottom: 6px; line-height: 1.3;
}
.gform_wrapper .gfield_required { color: var(--blue); margin-left: 2px; }

/* ---- pola (jak .lp-field input) ---- */
.gform_wrapper .ginput_container input[type="text"],
.gform_wrapper .ginput_container input[type="email"],
.gform_wrapper .ginput_container input[type="tel"],
.gform_wrapper .ginput_container input[type="number"],
.gform_wrapper .ginput_container input[type="url"],
.gform_wrapper .ginput_container select,
.gform_wrapper .ginput_container textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 15px; color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.gform_wrapper .ginput_container textarea { min-height: 110px; line-height: 1.5; resize: vertical; }
/* Lista wyboru (select): pojedynczy chevron po prawej – bez kafelkowania, też na :hover/:focus
   (GF ma select:hover{background-image:var(--gf-ctrl-select-icon-hover)} – przywracał ikonę bez no-repeat). */
.gform_wrapper .ginput_container select,
.gform_wrapper .ginput_container select:hover,
.gform_wrapper .ginput_container select:focus,
.gform_wrapper .ginput_container select:active {
  cursor: pointer;
  padding-right: 42px;
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6570' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 18px !important;
}
.gform_wrapper .ginput_container input:focus,
.gform_wrapper .ginput_container select:focus,
.gform_wrapper .ginput_container textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21,155,214,.14);
}
/* placeholder szary (pola tekstowe) + szary placeholder listy wyboru */
.gform_wrapper .ginput_container input::placeholder,
.gform_wrapper .ginput_container textarea::placeholder { color: var(--muted) !important; opacity: 1; }
.gform_wrapper .ginput_container select:has( option.gf_placeholder:checked ) { color: var(--muted); }
.gform_wrapper .gfield_description,
.gform_wrapper .gform_fileupload_rules { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 5px; }

/* ---- checkbox zgody (jak .lp-consent) ---- */
.gform_wrapper .gfield--type-consent .ginput_container_consent,
.gform_wrapper .gfield--type-checkbox .gchoice {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; color: var(--muted); line-height: 1.45;
}
.gform_wrapper .gfield--type-consent input[type="checkbox"],
.gform_wrapper .gfield--type-checkbox input[type="checkbox"] {
  flex: none; width: 17px; height: 17px; margin-top: 1px; accent-color: var(--blue);
}
.gform_wrapper .gfield--type-consent label,
.gform_wrapper .gfield--type-checkbox .gchoice label { font-weight: 500; color: var(--muted); }
.gform_wrapper a { color: var(--blue); font-weight: 600; }

/* ---- przycisk (jak .btn.btn-primary, pełna szerokość) ---- */
.gform_wrapper .gform_footer { margin: 4px 0 0; padding: 0; }
.gform_wrapper .gform_footer .gform_button,
.gform_wrapper .gform-button,
.gform_wrapper .gform_page_footer .gform_button,
.gform_wrapper.gravity-theme .gform_footer input[type="submit"],
.gform_wrapper.gravity-theme .gform_footer input.gform_button {
  width: 100% !important; justify-content: center;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  color: #fff !important; background: var(--blue) !important; background-color: var(--blue) !important;
  border: none !important; border-radius: 12px; padding: 14px 22px; cursor: pointer;
  transition: transform .2s, background-color .2s;
}
.gform_wrapper .gform_footer .gform_button:hover,
.gform_wrapper.gravity-theme .gform_footer input[type="submit"]:hover { transform: translateY(-2px); background: var(--blue-deep) !important; background-color: var(--blue-deep) !important; }

/* ---- walidacja ---- */
.gform_wrapper .gfield_error .ginput_container input,
.gform_wrapper .gfield_error .ginput_container textarea,
.gform_wrapper .gfield_error .ginput_container select { border-color: #d65a4a; box-shadow: 0 0 0 3px rgba(214,90,74,.12); }
.gform_wrapper .gfield_validation_message,
.gform_wrapper .validation_message { font-size: 11.5px; color: #c0392b; margin-top: 5px; font-weight: 600; background: none; border: none; padding: 0; }
.gform_wrapper .gform_validation_errors { border: 1px solid #f0c9c2; background: #fdf1ef; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.gform_wrapper .gform_validation_errors h2 { font-size: 13.5px; color: #c0392b; margin: 0; }

/* ---- potwierdzenie wysłania (jak .lp-done) ---- */
.gform_confirmation_wrapper,
.gform_confirmation_message {
  text-align: center; padding: 30px 24px;
  font-size: 14.5px; color: var(--muted); line-height: 1.55;
}


/* ============ KOMPRESJA FORMULARZA (ciasniej, 3PG) – override CSS GF ============ */
.gform_wrapper.gravity-theme,
.lp-card .gform_wrapper,
.lp-form-main .gform_wrapper { padding: 14px 18px 16px !important; }
.gform_wrapper .gform_fields { gap: 9px 14px !important; }
.gform_wrapper .gfield { margin: 0 !important; }
.gform_wrapper .gfield_label,
.gform_wrapper legend.gfield_label { margin-bottom: 3px !important; font-size: 11.5px !important; line-height: 1.25 !important; }
.gform_wrapper .ginput_container input[type="text"],
.gform_wrapper .ginput_container input[type="email"],
.gform_wrapper .ginput_container input[type="tel"],
.gform_wrapper .ginput_container input[type="number"],
.gform_wrapper .ginput_container input[type="url"],
.gform_wrapper .ginput_container select,
.gform_wrapper .ginput_container textarea { padding: 9px 13px !important; font-size: 14px !important; border-radius: 9px !important; }
.gform_wrapper .ginput_container select { padding: 10px 40px 10px 13px !important; line-height: 1.4 !important; height: auto !important; min-height: 0 !important; }
.gform_wrapper .ginput_container textarea { min-height: 66px !important; height: 66px; line-height: 1.4 !important; }
.gform_wrapper .gfield--type-consent .ginput_container_consent,
.gform_wrapper .gfield--type-consent .ginput_container_consent label,
.gform_wrapper .gfield--type-consent .gfield_consent_label,
.gform_wrapper .gfield--type-checkbox .gchoice { font-size: 11px !important; line-height: 1.4 !important; font-weight: 500 !important; }
.gform_wrapper .gform_footer { margin: 6px 0 0 !important; padding: 0 !important; }
.gform_wrapper .gform_footer .gform_button,
.gform_wrapper.gravity-theme .gform_footer input[type="submit"] { padding: 12px 22px !important; width: 100% !important; }
