.bef-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 0;
  border-radius: 12px;
}

.bef-animated-border-yes .bef-form {
  --bef-animated-border-size: 2px;
  --bef-animated-border-color-1: #36d7ff;
  --bef-animated-border-color-2: #0a6dff;
  --bef-animated-border-speed: 6s;
}

.bef-animated-border-yes .bef-form::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: var(--bef-animated-border-size);
  background: conic-gradient(
    from 0deg,
    var(--bef-animated-border-color-1),
    var(--bef-animated-border-color-2),
    var(--bef-animated-border-color-1)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: bef-rotate-border var(--bef-animated-border-speed) linear infinite;
}

@keyframes bef-rotate-border {
  to {
    transform: rotate(1turn);
  }
}

.bef-form .bef-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 var(--bef-field-width, 100%);
  max-width: var(--bef-field-width, 100%);
}

.bef-form .bef-field label {
  font-weight: 600;
}

.bef-form .bef-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.bef-form .bef-choice input[type="checkbox"],
.bef-form .bef-choice input[type="radio"] {
  width: auto;
  margin: 0;
}

.bef-form .bef-legal-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.bef-form .bef-lightbox-trigger {
  appearance: none;
  background: transparent;
  border: 0;
  color: #2271b1;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  line-height: 1.4;
}

.bef-form .bef-field input,
.bef-form .bef-field textarea,
.bef-form .bef-field select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ccd0d4;
  border-radius: 4px;
}

.bef-form button[type="submit"] {
  width: fit-content;
  min-width: 140px;
  padding: 10px 16px;
  border: 1px solid #2271b1;
  background: #2271b1;
  color: #fff;
  cursor: pointer;
}

.bef-form .bef-actions {
  width: 100%;
  text-align: left;
}

.bef-status {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 4px;
}

.bef-status.bef-ok {
  background: #e7f8ec;
  color: #11552a;
}

.bef-status.bef-error {
  background: #fdecec;
  color: #7d1818;
}

.bef-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.bef-lightbox[aria-hidden="false"] {
  display: block;
}

.bef-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 25, 0.65);
}

.bef-lightbox-dialog {
  position: relative;
  z-index: 2;
  width: min(92vw, 640px);
  max-height: 84vh;
  margin: min(8vh, 70px) auto;
  background: #fff;
  border-radius: 10px;
  padding: 22px 20px;
  overflow: auto;
  box-sizing: border-box;
}

.bef-lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  font-family: inherit;
  font-weight: 400;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #1f2937;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bef-lightbox-close:hover,
.bef-lightbox-close:focus {
  background: rgba(15, 23, 42, 0.08);
  color: #111827;
  border-color: rgba(15, 23, 42, 0.15);
}

.bef-lightbox-title {
  margin: 0 24px 12px 0;
}

.bef-lightbox-content > :first-child {
  margin-top: 0;
}

.bef-lightbox-content > :last-child {
  margin-bottom: 0;
}

body.bef-lightbox-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .bef-form .bef-field {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }

  .bef-mobile-gap-collapse-yes .bef-form {
    column-gap: 0 !important;
  }
}
