

#wagtail-form {
  background: #ffffff;
  border-radius: 0.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 75px 100px 100px;
}

#wagtail-form .custom-form-fields tbody.rows label {
  display: none;
}

@media (max-width: 991px) {
  #wagtail-form {
    padding: 3.75rem 2.5rem 4rem;
  }
}

@media (max-width: 767px) {
  #wagtail-form {
    padding: 3rem 1.25rem 3rem;
  }

  #wagtail-form .custom-form-fields table,
  #wagtail-form .custom-form-fields tbody,
  #wagtail-form .custom-form-fields tr,
  #wagtail-form .custom-form-fields td {
    display: block;
    width: 100%;
  }

  #wagtail-form .custom-form-fields thead {
    display: none;
  }

  #wagtail-form .custom-form-fields .rows .row-item:nth-child(n+2) {
    display: none;
  }

  #wagtail-form .custom-form-fields .rows .row-item.is-added {
    display: block;
  }

  #wagtail-form .custom-form-fields tbody.rows label {
    display: block;
  }

  #wagtail-form .custom-form-fields .row-item {
    padding: 12px 16px;
  }

  #wagtail-form .custom-form-fields td {
    padding: 8px 0;
    border-bottom: 0;
  }
}

#wagtail-form .custom-form-fields .rows .row-item.is-added {
  display: table-row;
}

#wagtail-form .form-group {
  margin-bottom: 20px;
}

#wagtail-form .custom-form-fields table td .form-group {
  margin-bottom: 0;
}

#wagtail-form .custom-form-fields table thead th:first-child {
  border-top-left-radius: 5px;
}

#wagtail-form .custom-form-fields table thead th:last-child {
  border-top-right-radius: 5px;
}

#wagtail-form .custom-form-fields table tr:nth-child(odd),
#wagtail-form .custom-form-fields table tr:nth-child(even) {
  background: #ffffff;
}

#wagtail-form .form-group label {
  display: block;
  margin-bottom: 5px;
  font-family: 'Averta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #184376;
}

#wagtail-form .custom-form-fields > .row {
  margin-bottom: 1.75rem;
}

#wagtail-form .add-form-row {
  margin: 10px 0 28px;
  font-size: 0.9375rem !important;
  font-weight: 400;
  text-transform: none;
}

#wagtail-form .remove-form-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem;
  font-family: 'Averta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9375rem !important;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease;
  background-color: #db574e;
  color: #ffffff;
}

#wagtail-form .remove-form-row:hover {
  background-color: #d74339;
  color: #ffffff;
}

#wagtail-form .form-control {
  width: 100%;
  height: auto;
  min-height: 0;
  background: var(--basic-light-grey, #f1f1f1);
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 15px 20px;
  font-family: 'Averta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.75);
  transition: border-color 150ms ease, background-color 150ms ease;
}

#wagtail-form .form-control::placeholder {
  color: rgba(0, 0, 0, 0.75);
  opacity: 1;
}

#wagtail-form .form-control:hover {
  background-color: #ebe7e2;
}

#wagtail-form .form-control:focus,
#wagtail-form .form-control:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: #184376;
}

#wagtail-form .default-form-fields textarea.form-control {
  min-height: 160px;
  resize: vertical;
}

#wagtail-form .form-group:has(select):after,
#wagtail-form .dropdown-wrap:has(select):after {
  content: none;
}

#wagtail-form .dropdown-wrap {
  position: relative;
}

#wagtail-form .dropdown-wrap select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 150ms ease, background-color 150ms ease;
}

#wagtail-form .dropdown-wrap select.form-control:hover {
  background-color: #ebe7e2;
}

#wagtail-form .dropdown-wrap select.form-control:focus,
#wagtail-form .dropdown-wrap select.form-control:focus-visible {
  outline: none;
  border-color: #184376;
}

#wagtail-form .dropdown-wrap:not(.cip-select-wrap)::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  background: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5l4.5 5 4.5-5' fill='none' stroke='rgba(0,0,0,0.65)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

#wagtail-form .cip-select-trigger.form-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease;
}

#wagtail-form .cip-select-trigger.form-control:hover {
  background-color: #ebe7e2;
}

#wagtail-form .cip-select-trigger.form-control:focus-visible,
#wagtail-form .cip-select-wrap.is-open .cip-select-trigger.form-control {
  outline: none;
  border-color: #184376;
}

#wagtail-form .cip-select-trigger__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#wagtail-form .cip-select-trigger__chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  transition: transform 150ms ease;
  background: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5l4.5 5 4.5-5' fill='none' stroke='rgba(0,0,0,0.65)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

#wagtail-form .cip-select-wrap.is-open .cip-select-trigger__chevron {
  transform: rotate(180deg);
}

#wagtail-form .cip-select-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #ffffff;
  border-radius: 5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  max-height: 280px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
}

#wagtail-form .cip-select-wrap.is-open .cip-select-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#wagtail-form .cip-select-option {
  padding: 10px 14px;
  border-radius: 4px;
  font-family: 'Averta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

#wagtail-form .cip-select-option.is-selected:not(.is-active) {
  background: #eef1f5;
  font-weight: 700;
}

#wagtail-form .cip-select-option.is-active {
  background: #184376;
  color: #ffffff;
}


