.homepro-join {
  max-width: 560px;
  width: 100%;
}

.homepro-join__form {
  display: grid;
  gap: 16px;
}

.homepro-join__field {
  display: grid;
  gap: 8px;
  position: relative;
}

.homepro-join__field > label {
  margin-left: 1px;
}

.homepro-join__field input,
.homepro-join__field button {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.homepro-join__field button {
  background: var(--homepro-join-button-color, #214A9E);
  border-color: var(--homepro-join-button-color, #214A9E);
  color: var(--homepro-join-button-text-color, #FFFFFF);
  cursor: pointer;
}

.homepro-join__field button:hover,
.homepro-join__field button:focus {
  background: var(--homepro-join-button-hover-color, #2B5BC0);
  border-color: var(--homepro-join-button-hover-color, #2B5BC0);
}

.homepro-join__submit-btn {
  position: relative;
}

.homepro-join__submit-btn.is-loading {
  opacity: 0.85;
  pointer-events: none;
}

.homepro-join__submit-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  right: 12px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: homepro-join-spin 0.8s linear infinite;
}

@keyframes homepro-join-spin {
  to {
    transform: rotate(360deg);
  }
}

.elementor-editor-active .homepro-join__form,
.elementor-element-edit-mode .homepro-join__form {
  gap: 16px;
}

.elementor-editor-active .homepro-join__field,
.elementor-element-edit-mode .homepro-join__field {
  gap: 8px;
}

.homepro-join__field--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.homepro-join__toggle-label {
  max-width: 130px;
  line-height: 1.2;
  margin: 0;
}

.homepro-join__switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.homepro-join__switch {
  appearance: none;
  -webkit-appearance: none;
  width: 52px;
  height: 30px;
  border-radius: 20px;
  border: 1px solid #b9c0ce;
  background: #f1f3f7;
  cursor: pointer;
  position: relative;
  padding: 0 !important;
  transition: all 0.2s ease;
}

.homepro-join__switch::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.homepro-join__switch:checked {
  background: #214A9E;
  border-color: #214A9E;
}

.homepro-join__switch:checked::after {
  transform: translateX(22px);
}

.homepro-join__switch-label::before {
  content: attr(data-off);
  color: #555;
}

.homepro-join__switch:checked + .homepro-join__switch-label::before {
  content: attr(data-on);
  color: #214A9E;
  font-weight: 600;
}

.homepro-join__selected-company {
  display: none;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6dce8;
  border-radius: 6px;
  background: #fff;
  color: #1d2c4b;
  font-size: 14px;
  line-height: 1.35;
}

.homepro-join__selected-company--visible {
  display: block;
}

.homepro-join__suggestions {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid #d6dce8;
  background: #fff;
  box-shadow: 0 6px 14px rgba(21, 42, 84, 0.08);
  border-radius: 6px;
  max-height: 220px;
  overflow: auto;
}

.homepro-join__suggestions:empty {
  display: none;
}

.homepro-join__suggestions li {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef1f6;
  line-height: 1.35;
}


.homepro-join__lookup-loading {
  position: relative;
  color: #3d4d6a;
  padding-right: 34px !important;
}

.homepro-join__lookup-loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  right: 12px;
  margin-top: -7px;
  border: 2px solid rgba(33, 74, 158, 0.28);
  border-top-color: #214A9E;
  border-radius: 50%;
  animation: homepro-join-spin 0.8s linear infinite;
}

.homepro-join__suggestions li:last-child {
  border-bottom: 0;
}

.homepro-join__suggestions li:hover {
  background: #f5f8ff;
}


.homepro-join__thanks-image {
  display: none;
  text-align: center;
}

.homepro-join__thanks-image img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.homepro-join__message {
  display: none;
}

.homepro-join__message--error {
  display: block;
  color: #b00020;
}

.homepro-join__message--success {
  display: block;
  color: var(--homepro-join-success-message-color, #214A9E);
  font-size: var(--homepro-join-success-message-size, 20px);
  font-weight: var(--homepro-join-success-message-weight, 600);
  line-height: 1.2;
}

.homepro-join--submitted .homepro-join__field,
.homepro-join--submitted .homepro-join__suggestions,
.homepro-join--submitted .homepro-join__selected-company {
  display: none !important;
}
