.new-form-wrap {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

.new-form-container {
  position: relative;
}

.new-form-container,
.new-form-body,
.new-form-item,
.new-form-privacy {
  box-sizing: border-box;
}

.new-form-body {
  margin: 0;
}

.new-form-item {
  position: relative;
  padding: 0;
  clear: both;
}

.new-form-item-input {
  position: relative;
}

.new-form-item input:not([type="checkbox"]),
.new-form-select-trigger {
  display: block;
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #1e2026;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}

.new-form-item input:not([type="checkbox"]):focus,
.new-form-select-trigger:focus {
  border-color: #52a8ec;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .1), 0 0 8px rgba(82, 168, 236, .3);
}

.new-form-code-button {
  position: static;
  flex: 0 0 94px;
  width: 94px;
  height: 40px;
  border: 0;
  border-left: 1px solid #d9d9d9;
  border-radius: 0 6px 6px 0;
  background: #fff;
  color: #017aff;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
}

.new-form-code-button.is-loading,
.new-form-code-button.waiting {
  cursor: not-allowed;
  opacity: .65;
  pointer-events: none;
}

.new-form-code-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: new-form-spin .7s linear infinite;
  vertical-align: -2px;
}

@keyframes new-form-spin {
  to {
    transform: rotate(360deg);
  }
}

.new-form-submit {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.new-form-wrap .new-form-submit:hover {
  background-color: #4D95FF;
}

.new-form-submit.disabled {
  cursor: not-allowed;
  opacity: .65;
  pointer-events: none;
}

.new-form-privacy {
  display: flex;
  align-items: flex-start;
  margin: 0;
  color: #686c73;
  font-size: 12px;
  line-height: 20px;
}

.new-form-privacy input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 3px 6px 0 0;
}

.new-form-privacy input[type="checkbox"]:not(:checked) {
  border: 1px solid #D9D9D9;
  border-radius: 2px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
}

.new-form-privacy a {
  color: #017aff;
  text-decoration: none;
}

.new-form-field-error {
  display: none;
}

.new-form-inline-error .new-form-field-error {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 2;
  display: block;
  color: #f0150f;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.new-form-inline-error .new-form-field-error a {
  color: #017aff;
}

.new-form-inline-error .new-form-field-error:empty {
  display: none;
}

.new-form-item,
.new-form-select-item,
.new-form-privacy {
  position: relative;
}

.new-form-item.is-error input:not([type="checkbox"]),
.new-form-select-item.is-error .new-form-select-trigger,
.new-form-privacy.is-error {
  border-color: #f0150f;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, .12);
}

.new-form-privacy.is-error {
  box-shadow: none;
}


.new-form-company-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  width: 100%;
  max-height: 240px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, .2);
  list-style: none;
}

.new-form-company-dropdown.hide {
  display: none;
}

.new-form-company-option {
  padding: 10px 12px;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
}

.new-form-company-option:hover {
  background: #f5f5f5;
}

.new-form-select-trigger {
  position: relative;
  min-height: 40px;
  padding: 9px 36px 9px 12px;
  text-align: left;
}

.new-form-select-trigger-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 20px;
  gap: 4px;
  overflow: hidden;
}

.new-form-select-placeholder {
  color: #b1b5be;
}

.new-form-select-trigger-value {
  color: #262b33;
}

.new-form-select-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  pointer-events: none;
  transition: transform .2s ease;
}

.new-form-select-arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}

.new-form-select-arrow path {
  stroke: #666;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.new-form-select-item.is-open .new-form-select-arrow {
  transform: rotate(180deg);
}

.new-form-select-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 8;
  display: none;
  margin: 0;
  padding: 8px 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .14);
  list-style: none;
}

.new-form-select-item.is-open .new-form-select-panel {
  display: block;
}

.new-form-select-option {
  position: relative;
  width: 100%;
  min-height: 32px;
  padding: 5px 28px 5px 12px;
  background: transparent;
  color: #262b33;
  cursor: pointer;
  font-family: "PingFang SC";
  font-size: 14px;
  line-height: 22px;
  transition: color .2s ease;
}

.new-form-select-option.is-selected {
  color: #017aff;
}

.new-form-select-option-check {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 12px;
  height: 6px;
  margin-top: -5px;
  border-bottom: 1.5px solid #707070;
  border-left: 1.5px solid #707070;
  transform: rotate(-45deg);
  opacity: 0;
}

.new-form-select-option.is-selected .new-form-select-option-check {
  opacity: 1;
}

.new-form-select-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  padding: 0 4px;
  gap: 4px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #575b61;
  font-size: 12px;
  line-height: 20px;
}

.new-form-select-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-form-select-chip-remove {
  position: relative;
  width: 12px;
  height: 12px;
  opacity: .64;
  cursor: pointer;
}

.new-form-select-chip-remove::before,
.new-form-select-chip-remove::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 1px;
  width: 10px;
  height: 1.5px;
  border-radius: 999px;
  background: #666;
}

.new-form-select-chip-remove::before {
  transform: rotate(45deg);
}

.new-form-select-chip-remove::after {
  transform: rotate(-45deg);
}

/* Standard field layout. */
.new-form-wrap .new-form-field-tel,
.new-form-wrap .new-form-field-company {
  display: block;
  width: 100%;
}

.new-form-wrap .new-form-field-code {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.new-form-wrap .new-form-field-code .new-form-item-input {
  flex: 1;
  width: auto;
}

.new-form-wrap .new-form-field-code .new-form-code-button {
  flex: 0 0 94px;
  width: 94px;
}

.new-form-wrap .new-form-field-tel input,
.new-form-wrap .new-form-field-code input,
.new-form-wrap .new-form-field-company input,
.new-form-wrap .new-form-select-trigger {
  height: 40px;
  padding: 10px 12px;
}

.new-form-wrap .new-form-field-code input {
  padding-right: 12px;
}

/* 公共表单布局 */
.new-form-wrap .new-form-container {
  width: 100%;
  padding: 0;
  border-radius: 20px;
}

.new-form-wrap .new-form-body {
  padding: 0;
  border-radius: 10px;
}

.new-form-wrap .new-form-title {
  margin: 0 0 24px;
  text-align: center;
  white-space: nowrap;
}

.new-form-no-title .new-form-body {
  padding-top: 0;
}

.new-form-wrap .new-form-item {
  display: block;
  margin-bottom: 24px;
}

.new-form-wrap .new-form-item input::placeholder {
  color: #B1B5BE;
}

.new-form-wrap .new-form-field-code {
  display: flex;
  align-items: center;
  gap: 10px;
}

.new-form-wrap .new-form-field-code .new-form-code-button {
  flex: 0 0 94px;
  width: 94px;
  height: 38px;
  border: 1px solid #017aff;
  border-radius: 6px;
  color: #017aff;
  line-height: 38px;
  text-align: center;
}

.new-form-wrap .new-form-privacy {
  color: #686c73;
  font-size: 12px;
  white-space: nowrap;
}

.new-form-wrap .new-form-submit {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 24px;
  border: 0;
  border-radius: 22px;
  background: #017aff;
  color: #fff;
  line-height: 1.3;
}

/* Page variant is the default; modal is opt-in through new_form_config[variant]. */
.new-form-variant-page {
  padding: 0;
}

.new-form-variant-page .new-form-container {
  padding: 28px 40px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .45), 0 12px 30px rgba(34, 91, 145, .12);
}

.new-form-variant-page .new-form-submit {
  border-radius: 24px;
  background: #087ff5;
}

.new-form-variant-modal {
  width: 100%;
  padding: 0;
}

.new-form-variant-modal .new-form-container,
.new-form-variant-modal .new-form-body {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.new-form-variant-modal .new-form-privacy {
  white-space: normal;
}

@media (max-width: 480px) {
  .new-form-wrap .new-form-body {
    padding: 0;
  }

  .new-form-wrap .new-form-title {
    margin-bottom: 20px;
    font-size: 16px;
  }

  .new-form-no-title .new-form-body {
    padding-top: 0;
  }
}