/* weilan_custom_form - 钢结构定制表单（配置渲染） */

.weilan-custom-form {
  position: relative;
  height: 60rem;
  padding-bottom: 6.25rem;
}

.weilan-custom-form-bg {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  object-position: top;
  object-fit: cover;
}

.weilan-custom-form > .container {
  z-index: 5;
  position: relative;
}

/* 组件标题和描述 */
.weilan-custom-form-header {
  text-align: center;
  margin-bottom: 4.5625rem;
}

.weilan-custom-form-header-title {
  color: var(--text-color-light);
  margin-bottom: 0.625rem;
}

.weilan-custom-form-header-desc {
  font-size: var(--font-size-md);
  font-weight: 400;
  line-height: 1.625;
  color: var(--text-color-light);
  white-space: pre-line;
}

.weilan-custom-form-inner {
  display: flex;
  align-items: stretch;
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.25);
}

/* 左侧 - 标题 + 表单 */
.weilan-custom-form-left {
  display: flex;
  flex-direction: column;
  padding: 2.5rem 3.125rem 3.125rem 3.125rem;
  width: 62.5rem;
}

.weilan-custom-form-left .weilan-custom-form-title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: var(--font-size-xl);
  line-height: 1.5;
  color: #333;
  margin-bottom: 1.6875rem;
}

/* 表单 */
.weilan-custom-form-form {
  display: block;
  width: 100%;
}

.weilan-custom-form-fields {
  --column-gap: 2.5rem;

  display: flex;
  flex-wrap: wrap;
  column-gap: var(--column-gap);
  row-gap: 1.5rem;
}

.weilan-custom-form-field {
  width: 100%;
  box-sizing: border-box;
}

.weilan-custom-form-field--half {
  width: calc(50% - var(--column-gap) / 2);
}

.weilan-custom-form-label,
.weilan-custom-form-radio-label {
  display: flex;
  font-size: var(--font-size-md);
  font-weight: 400;
  line-height: 1.625;
  color: #333;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.weilan-custom-form-label--required {
  color: #ef2020;
  font-size: var(--font-size-md);
  font-weight: 400;
  line-height: 1.625;
}

.weilan-custom-form-input {
  width: 100%;
  padding: 0.625rem;
  border-radius: 8px;
  background-color: #f5f5f5;
  font-size: var(--font-size-md);
  line-height: 1.625;
}

.weilan-custom-form-input::placeholder {
  color: #999999;
}

.weilan-custom-form-input:focus::placeholder {
  color: var(--color-primary);
}

.weilan-custom-form-submit {
  margin-top: 2.875rem;
}

.weilan-custom-form-submit svg {
  width: 1.125rem;
  height: 0.75rem;
}

/* 右侧 - 标题 + 单选 */
.weilan-custom-form-right {
  flex: 1;
  min-width: 0;
}

.weilan-custom-form-card {
  position: relative;
  height: 100%;
  background: #ffffff;
  padding: 2.5rem 3.125rem 3.125rem 3.125rem;
}

.weilan-custom-form-right .weilan-custom-form-card-title {
  font-size: var(--font-size-xl);
  font-weight: 500;
  color: var(--text-color, #333);
  margin-bottom: 1.6875rem;
}

.weilan-custom-form-card-title::before {
  content: '';
  position: absolute;
  left: 0px;
  top: 2.5rem;
  height: calc(100% - 5.625rem);
  width: 1px;
  border-left: 2px dashed #ddd;
}

.weilan-custom-form-radio-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weilan-custom-form-radio-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--font-size-md);
  color: #666;
  cursor: pointer;
}

.weilan-custom-form-radio-item input[type='radio'] {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  border: 2px solid #d9d9d9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
}

/* 3. 使用伪元素绘制内部的“点” */
.weilan-custom-form-radio-item input[type='radio']::after {
  content: '';
  display: block;
  width: 0; /* 初始大小为 0 */
  height: 0;
  border-radius: 50%;
  background-color: var(--color-second);
  transition: all 0.2s; /* 增加平滑动画 */
}

/* 4. 选中时修改点的大小 */
.weilan-custom-form-radio-item input[type='radio']:checked::after {
  width: 6px; /* 这里修改你想要的圆点大小 */
  height: 6px;
}

.weilan-custom-form-radio-text {
  flex: 1;
}

.crmForm-error {
  color: red !important;
  font-size: 12px !important;
}

@media screen and (max-width: 1200px) {
  .weilan-custom-form {
    height: auto;
  }
}

@media screen and (max-width: 1024px) {
  .weilan-custom-form-right .weilan-custom-form-card-title::before {
    display: none;
  }
  .weilan-custom-form-inner {
    display: grid;
    grid-template-columns: 1fr;
  }
  .weilan-custom-form-left,
  .weilan-custom-form-right {
    width: 100%;
  }
}

/* 响应式 */
@media screen and (max-width: 992px) {
  .weilan-custom-form-inner {
    flex-direction: column;
    gap: 2rem;
  }

  .weilan-custom-form-left {
    padding: 2rem;
  }

  .weilan-custom-form-card {
    padding: 1.5rem 1.5rem 2rem;
  }
}

@media screen and (max-width: 768px) {
  .weilan-custom-form {
    padding: 2rem 0;
  }

  .weilan-custom-form-field--half {
    width: 100%;
  }

  .weilan-custom-form-card {
    padding: 1.25rem 1.25rem 1.75rem;
  }

  .weilan-custom-form-label,
  .weilan-custom-form-radio-label {
    white-space: normal;
  }
}

@media screen and (max-width: 576px) {
  .weilan-custom-form-fields {
    margin: 0;
  }

  .weilan-custom-form-field {
    padding: 0 0 0.5rem;
  }
}
