/* IVComp — formularz kontaktowy, 27.10.2026.
   Uzupełnienie index.css bez zmiany siatki usług.
*/

/* =========================================================
   Główna obudowa formularza
   ========================================================= */

#ivcomp-contact {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 25px;

  background: #fff;
  border: 1px solid #d5e2ec;
  border-radius: 13px;

  box-sizing: border-box;
}

/* =========================================================
   Pole zabezpieczające przed spamem
   ========================================================= */

#ivcomp-contact .contact-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%);
}

/* =========================================================
   Górny pasek: komunikat i przycisk
   ========================================================= */

#ivcomp-contact .ix-contact-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  width: 100%;
  margin-bottom: 20px;
  padding: 12px 16px;

  background: #edf5fa;
  border: 1px solid #c8ddeb;
  border-radius: 10px;

  box-sizing: border-box;
}

/* Podstawowy wygląd komunikatu, także poza paskiem. */
#ivcomp-contact .contact-status {
  margin: 0 0 15px;
  padding: 12px 15px;

  color: #344b5d;
  background: #edf5fa;
  border: 1px solid #c8ddeb;
  border-radius: 8px;

  font-size: 14px;
  line-height: 1.5;
}

/* W pasku komunikat nie tworzy dodatkowego pudełka. */
#ivcomp-contact .ix-contact-toolbar .contact-status {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;

  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Komunikaty błędu i powodzenia poza paskiem. */
#ivcomp-contact .contact-status[data-state="error"] {
  color: #82312d;
  background: #fff2ef;
  border-color: #e5b8b3;
}

#ivcomp-contact .contact-status[data-state="success"] {
  color: #344b5d;
  background: #eff6fb;
  border-color: #cbddea;
}

/* W pasku pozostaje kolor tekstu właściwy dla danego stanu. */
#ivcomp-contact
  .ix-contact-toolbar
  .contact-status[data-state="error"] {
  color: #82312d;
  background: transparent;
  border: 0;
}

#ivcomp-contact
  .ix-contact-toolbar
  .contact-status[data-state="success"] {
  color: #344b5d;
  background: transparent;
  border: 0;
}

/* =========================================================
   Przycisk wysyłania
   ========================================================= */

#ivcomp-contact button[type="submit"] {
  background: #bdd8ee !important;
  color: #344b5d !important;
  border: 1px solid #a5c5df !important;
  border-radius: 8px;

  padding: 12px 25px;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;

  cursor: pointer;
}

#ivcomp-contact .ix-contact-toolbar #contact-submit {
  flex: 0 0 auto;
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 10px 20px;

  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

#ivcomp-contact button[type="submit"]:hover:not(:disabled) {
  background: #accfe9 !important;
  border-color: #8eb6d4 !important;
}

#ivcomp-contact button[type="submit"]:focus-visible {
  outline: 3px solid #2b6288;
  outline-offset: 3px;
}

#ivcomp-contact button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* =========================================================
   Układ pól: dane po lewej, wiadomość po prawej
   ========================================================= */

#ivcomp-contact .ix-contact-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
}

#ivcomp-contact .ix-contact-person {
  display: flex;
  flex-direction: column;
  gap: 16px;

  min-width: 0;
}

#ivcomp-contact .ix-contact-fields .form-group {
  min-width: 0;
  margin: 0;
}

/* =========================================================
   Etykiety i wspólny wygląd pól
   ========================================================= */

#ivcomp-contact .ix-field-label {
  display: block;
  margin: 0 0 6px;

  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

#ivcomp-contact .form-control {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;

  color: #344b5d;
  background: #f8fbfd;
  border: 1px solid #cadbe8;
  border-radius: 8px;

  box-sizing: border-box;
}

#ivcomp-contact .form-control:focus {
  background: #fff;
  border-color: #7da9ca;
  outline: 2px solid #2b6288;
  outline-offset: 2px;
  box-shadow: none;
}

#ivcomp-contact .form-control::placeholder {
  color: #6a7f90;
  opacity: 1;
}

/* =========================================================
   Niższe pola imienia i adresu e-mail
   ========================================================= */

#ivcomp-contact #contact-name,
#ivcomp-contact #contact-email {
  display: block;
  width: 100%;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 7px 12px;

  font-size: 16px;
  line-height: 22px;

  box-sizing: border-box;
}

/* =========================================================
   Pole wiadomości
   ========================================================= */

#ivcomp-contact .ix-contact-message {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

#ivcomp-contact #contact-message {
  flex: 0 0 auto;
  display: block;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  height: 130px;
  min-height: 130px;
  max-height: 130px;

  margin: 0;
  padding: 10px 12px;

  font-size: 16px;
  line-height: 1.5;

  resize: none !important;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;

  box-sizing: border-box;
}

/* =========================================================
   Informacja o prywatności
   ========================================================= */

#ivcomp-contact .contact-privacy {
  margin: 18px 0 0;

  color: #5d7487;
  font-size: 12px;
  line-height: 1.6;
}

#ivcomp-contact .contact-privacy a {
  color: #2b6288;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#ivcomp-contact .contact-privacy a:hover {
  color: #1c4969;
}

/* =========================================================
   Telefon: pola jedno pod drugim
   ========================================================= */

@media (max-width: 767px) {
  #ivcomp-contact {
    padding: 18px;
  }

  #ivcomp-contact .ix-contact-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #ivcomp-contact .ix-contact-toolbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
  }

  #ivcomp-contact .ix-contact-toolbar .contact-status {
    flex-basis: 100%;
  }

  #ivcomp-contact .ix-contact-toolbar #contact-submit {
    max-width: 100%;
    margin-left: auto;
    white-space: normal;
  }

  #ivcomp-contact #contact-message {
    height: 150px;
    min-height: 150px;
  }
}