/* =========================
   Form wrapper
   ========================= */

.ff--form {
  --ff-primary: #2563eb;
  --ff-primary-hover: #1d4ed8;
  --ff-border: #d1d5db;
  --ff-radius: 6px;
  --ff-gap: 16px;

  width: 100%;
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}

.ff--form *,
.ff--form *::before,
.ff--form *::after {
  box-sizing: border-box;
}


/* =========================
   Grid layout
   ========================= */

.ff--form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--ff-gap);
  width: 100%;
}

.ff--form .ff--field {
  grid-column: span 12;
  min-width: 0;
}

/* Field widths */

.ff--form .ff--field__width-3 {
  grid-column: span 3;
}

.ff--form .ff--field__width-4 {
  grid-column: span 4;
}

.ff--form .ff--field__width-6 {
  grid-column: span 6;
}

.ff--form .ff--field__width-8 {
  grid-column: span 8;
}

.ff--form .ff--field__width-9 {
  grid-column: span 9;
}

.ff--form .ff--field__width-12 {
  grid-column: span 12;
}


/* =========================
   Labels
   ========================= */

.ff--form .ff--field__label {
  display: block;
  margin-bottom: 6px;
  font: inherit;
  font-weight: 600;
}


/* =========================
   Inputs and selects
   ========================= */

.ff--form .ff--field__input,
.ff--form .ff--field__textarea,
.ff--form .ff--field__select {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;

  color: inherit;
  font: inherit;
  line-height: 1.5;

  background-color: transparent;
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);

  transition: border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.ff--form .ff--field__input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.ff--form .ff--field__input:focus,
.ff--form .ff--field__textarea:focus,
.ff--form .ff--field__select:focus {
  outline: none;
  border-color: var(--ff-primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 15%);
}

.ff--form .ff--field__input:disabled,
.ff--form .ff--field__select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


.ff--form .hidden {
  display: none;
}

.ff--form .ff--field__fakecheck--row {
  display: flex;
  align-items: center;
  gap: 8px;
  /* font-size: 11px; */
  /* color: #687086; */
}

.ff--form .ff--field__fakecheck--checkbox {
  width: 13px;
  height: 13px;
  border: 1px solid #cbd1df;
  border-radius: 3px;
}

.ff--form .ff-field__fakecheck--caption {}

.ff--form .ff--field__link {
  text-decoration: underline;
}


.ff--field__fakecheck--checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid #999;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.ff--field__fakecheck--checkbox.checked {
  background-color: #f97316;
  border-color: #f97316;
}

.ff--field__fakecheck--checkbox.checked::after {
  /* content: ""; */
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.ff--field__fakecheck--row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.ff--form .ff--error label,
.ff--form .ff--error input,
.ff--form .ff--error textarea {
  color: red;
  border-color: red;
}

.ff--form .ff--error input::placeholder,
.ff--form .ff--error textarea::placeholder {
  color: red
}

.ff--form .ff--required::after {
  content: "*";
  color: red;
}

.ff-wrapper {
  margin: 3rem auto;
}

.ff--success_message {
  text-align: center;
}

/* =========================
   Submit button
   ========================= */

.ff--form .ff--button__submit {
  display: inline-block;
  padding: 10px 20px;
  width: 100%;
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;

  background-color: var(--ff-primary);
  border: 1px solid var(--ff-primary);
  border-radius: var(--ff-radius);

  cursor: pointer;
  transition: background-color 0.15s ease,
    border-color 0.15s ease;
}

.ff--form .ff--button__submit:hover {
  background-color: var(--ff-primary-hover);
  border-color: var(--ff-primary-hover);
}

.ff--form .ff--button__submit:focus-visible {
  outline: 2px solid var(--ff-primary);
  outline-offset: 3px;
}

.ff--form .ff--button__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ff--field__captcha--row {
    display: grid;
    grid-template-columns: 5fr 100px;
    gap: 1rem;
}

.ff--field__captcha--img {
    height: 50px;
}


/* =========================
   Responsive layout
   ========================= */

@media (max-width: 600px) {

  .ff--form .ff--field__width-3,
  .ff--form .ff--field__width-4,
  .ff--form .ff--field__width-6,
  .ff--form .ff--field__width-8,
  .ff--form .ff--field__width-9 {
    grid-column: span 12;
  }
}