/* ============================================================
   BARCHIP FORMS
   ============================================================ */


/* ------------------------------------------------------------
   BASE
   ------------------------------------------------------------ */

.barchip-form,
.barchip-form * {
  box-sizing: border-box;
}

.barchip-form {
  width: 100%;
  font-family: "Poppins", "Raleway", Helvetica, Arial, sans-serif;
}


/* ------------------------------------------------------------
   FIELDS
   ------------------------------------------------------------ */

.barchip-form__field {
  width: 100%;
}

.barchip-form__input,
.barchip-form__select {
  display: block;
  width: 100%;
  height: 60px;

  padding: 0 2rem;

  border: 0;
  border-radius: 40px;

  background: #efeeef;

  color: #000;
  font-family: "Poppins", "Raleway", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;

  outline: none;

  transition:
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.barchip-form__input::placeholder {
  color: #000;
  opacity: 1;
}

.barchip-form__input:focus,
.barchip-form__select:focus {
  box-shadow: 0 0 0 2px rgba(247, 130, 30, 0.35);
}


/* ------------------------------------------------------------
   SELECT
   ------------------------------------------------------------ */

.barchip-form__select {
  cursor: pointer;
}


/* ------------------------------------------------------------
   HIDDEN ACCESSIBLE LABELS
   ------------------------------------------------------------ */

.barchip-form__label--hidden {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);
  white-space: nowrap;

  border: 0;
}


/* ============================================================
   MAIN FORM
   ============================================================ */

.barchip-form--main {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 15px;
}


/*
 * Consent + actions + status span full width.
 */
.barchip-form--main .barchip-form__consent,
.barchip-form--main .barchip-form__status,
.barchip-form--main .barchip-form__actions {
  grid-column: 1 / -1;
}


/* ------------------------------------------------------------
   MAIN BUTTON
   ------------------------------------------------------------ */

.barchip-form--main .barchip-form__actions {
  display: flex;
  justify-content: center;

  padding-top: 1rem;
}

.barchip-form--main .barchip-form__submit {
  min-width: 130px;
  height: 50px;

  padding: 0.5rem 1rem;

  border: 1px solid #f7821e;
  border-radius: 10px;

  background: #fff;

  color: #f7821e;

  font-family: "Raleway", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.barchip-form--main .barchip-form__submit:hover {
  background: #f7821e;
  color: #fff;
}


/* ============================================================
   FOOTER FORM
   ============================================================ */

.barchip-form--footer {
  display: grid;
  gap: 15px;
}
.barchip-form-wrapper--footer {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;

  padding: 3rem;

  background-image: url("https://barchip.com/wp-content/uploads/2024/10/FORM_BG.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  border-radius: 40px;

  font: 14px Helvetica, Arial, sans-serif;
}


/*
 * Slightly smaller footer fields,
 * matching the old bottomMcForm.
 */
.barchip-form--footer .barchip-form__input,
.barchip-form--footer .barchip-form__select {
  height: 50px;

  padding-left: 1.5rem;
  padding-right: 1.5rem;
}


/*
 * Consent + actions + messages take
 * the complete row.
 */
.barchip-form--footer .barchip-form__consent,
.barchip-form--footer .barchip-form__status,
.barchip-form--footer .barchip-form__actions {
  grid-column: 1 / -1;
}


/* ------------------------------------------------------------
   FOOTER BUTTON
   ------------------------------------------------------------ */

.barchip-form--footer .barchip-form__actions {
  display: flex;
  justify-content: center;

  padding-top: 1rem;
}

.barchip-form--footer .barchip-form__submit {
  min-width: 130px;
  min-height: 50px;

  padding: 0.5rem 1.25rem;

  border: 1px solid #fff;
  border-radius: 10px;

  background: transparent;

  color: #fff;

  font-family: "Raleway", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;

  text-transform: uppercase;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.barchip-form--footer .barchip-form__submit:hover {
  background: #fff;
  color: #f7821e;
}


/* ============================================================
   DOWNLOAD FORM
   ============================================================ */

.barchip-form--download {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 15px;
}

.barchip-form--download .barchip-form__consent,
.barchip-form--download .barchip-form__status,
.barchip-form--download .barchip-form__actions {
  grid-column: 1 / -1;
}

.barchip-form--download .barchip-form__actions {
  display: flex;
  justify-content: center;

  padding-top: 1rem;
}

.barchip-form--download .barchip-form__submit {
  min-height: 50px;

  padding: 0.5rem 1.5rem;

  border: 1px solid #f7821e;
  border-radius: 10px;

  background: #f7821e;

  color: #fff;

  font-family: "Raleway", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.barchip-form--download .barchip-form__submit:hover {
  background: #fff;
  color: #f7821e;
}

 /* ============================================================
   FOOTER WRAPPER
   ============================================================ */

.barchip-form-wrapper--footer {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;

  padding: 3rem;

  background-image: url("https://barchip.com/wp-content/uploads/2024/10/FORM_BG.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  border-radius: 40px;
}


/* ============================================================
   CONSENT
   ============================================================ */

.barchip-form__consent {
  grid-column: 1 / -1;

  margin: 0;
  padding: 5px 0 0;

  border: 0;

  font-family: "Poppins", "Raleway", Helvetica, Arial, sans-serif;
}

.barchip-form__consent-text {
  margin: 0 0 8px;
  padding: 0;

  font-size: 12px;
  line-height: 1.5;
  font-weight: 300;
}

.barchip-form__consent-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 8px 20px;
}

.barchip-form__radio-label {
  display: inline-flex;
  align-items: center;

  gap: 5px;

  margin: 0;

  font-size: 12px;
  line-height: 1.3;
  font-weight: 300;

  cursor: pointer;
}


/* Native radio, just orange */

.barchip-form__radio {
  appearance: auto;
  -webkit-appearance: radio;

  width: 14px !important;
  height: 14px !important;
  min-width: 14px;

  margin: 0 !important;
  padding: 0 !important;

  accent-color: #f7821e;

  cursor: pointer;
}


/* ============================================================
   MAIN CONSENT
   ============================================================ */

.barchip-form--main .barchip-form__consent {
  color: #222;
}

.barchip-form--main .barchip-form__consent-text {
  font-size: 12px;
  font-weight: 300;
}

.barchip-form--main .barchip-form__radio-label {
  color: #222;
  font-size: 12px;
}


/* ============================================================
   FOOTER CONSENT
   ============================================================ */

.barchip-form--footer .barchip-form__consent,
.barchip-form--footer .barchip-form__consent-text,
.barchip-form--footer .barchip-form__radio-label {
  color: #fff;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

  .barchip-form-wrapper--footer {
    padding: 2rem 1.5rem;
    border-radius: 30px;
  }

  .barchip-form__consent-options {
    gap: 8px 18px;
  }

}
/* ============================================================
   FOOTER LAYOUT
   ============================================================ */

.barchip-form--footer {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.barchip-form--footer .barchip-form__field,
.barchip-form--footer .barchip-form__consent,
.barchip-form--footer .barchip-form__status,
.barchip-form--footer .barchip-form__actions {
  width: 100%;
}

.barchip-form--footer .barchip-form__input,
.barchip-form--footer .barchip-form__select {
  width: 100%;
}
/* ============================================================
   BUTTON COMMON
   ============================================================ */

.barchip-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  appearance: none;
  -webkit-appearance: none;
}

.barchip-form__submit:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}


/* ============================================================
   LOADING
   ============================================================ */

.barchip-form__loader {
  display: none;

  width: 16px;
  height: 16px;

  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;

  animation:
    barchip-form-spin 0.7s linear infinite;
}

.barchip-form.is-loading .barchip-form__loader {
  display: inline-block;
}

@keyframes barchip-form-spin {
  to {
    transform: rotate(360deg);
  }
}


/* ============================================================
   STATUS / ERRORS
   ============================================================ */

.barchip-form__status {
  display: none;

  width: 100%;

  margin-top: 5px;

  font-size: 14px;
  line-height: 1.5;
}

.barchip-form__status.is-error,
.barchip-form__status.is-success {
  display: block;
}

.barchip-form__status.is-error {
  color: #b42318;
}

.barchip-form__status.is-success {
  color: #067647;
}

.barchip-form--footer .barchip-form__status.is-error {
  color: #fff;
}

.barchip-form--footer .barchip-form__status.is-success {
  color: #fff;
}


/* ============================================================
   HONEYPOT
   ============================================================ */

.barchip-form__honeypot {
  position: absolute !important;

  left: -9999px !important;

  width: 1px !important;
  height: 1px !important;

  overflow: hidden !important;

  opacity: 0 !important;
  pointer-events: none !important;
}


/* ============================================================
   WORDPRESS / DIVI PROTECTION
   ============================================================ */

/*
 * Prevent some theme styles from modifying
 * form controls unexpectedly.
 */

.barchip-form input,
.barchip-form select,
.barchip-form button {
  box-sizing: border-box;
}

.barchip-form button::after {
  display: none !important;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 767px) {

  .barchip-form--main,
  .barchip-form--footer,
  .barchip-form--download {
    grid-template-columns: 1fr;
  }
   .barchip-form-wrapper--footer {
    padding: 2rem 1.5rem;
    border-radius: 30px;
  }


  .barchip-form--main .barchip-form__consent,
  .barchip-form--main .barchip-form__status,
  .barchip-form--main .barchip-form__actions,
  .barchip-form--footer .barchip-form__consent,
  .barchip-form--footer .barchip-form__status,
  .barchip-form--footer .barchip-form__actions,
  .barchip-form--download .barchip-form__consent,
  .barchip-form--download .barchip-form__status,
  .barchip-form--download .barchip-form__actions {
    grid-column: auto;
  }


  .barchip-form__input,
  .barchip-form__select {
    height: 50px;

    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

.barchip-form__consent {
    width: 100%;
  }

  .barchip-form__consent-text {
    margin-bottom: 10px;

    font-size: 12px;
    line-height: 1.5;
  }

  .barchip-form__consent-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px 18px;
  }

  .barchip-form__radio-label {
    display: inline-flex;
    align-items: center;

    width: auto;

    margin: 0;

    gap: 5px;

    white-space: nowrap;
  }

  .barchip-form__radio {
    flex: 0 0 auto;

    width: 14px !important;
    height: 14px !important;

    margin: 0 !important;
  }
}