@charset "utf-8";

/* 设计稿基准 1920px，1rem = 100px，版心沿用 common.css 的 13rem */

.msg-main {
  position: relative;
  padding: 0.5rem 0 0.7rem;
  background-color: #F2F2F2;
  background-image:
    -webkit-linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.72) 100%),
    radial-gradient(ellipse 60% 80% at 78% 45%, rgba(120, 105, 85, 0.055) 0%, transparent 70%);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.72) 100%),
    radial-gradient(ellipse 60% 80% at 78% 45%, rgba(120, 105, 85, 0.055) 0%, transparent 70%);
}

.msg-main .wrapper {
  position: relative;
}

/* 卡片上方说明文字 */
.msg-intro__hello {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 0.2rem;
  font-weight: 700;
  line-height: 0.3rem;
  color: #333333;
}

.msg-intro__desc {
  margin-top: 0.04rem;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 0.14rem;
  line-height: 0.24rem;
  color: #666666;
}

/* 留言卡片 */
.msg-card {
  margin-top: 0.65rem;
  background: #FFFFFF;
}

.msg-card__title {
  height: 0.60rem;
  line-height: 0.60rem;
  background: var(--primary);
  font-family: "SimSun", "Songti SC", serif;
  font-size: 0.24rem;
  font-weight: 700;
  color: #FFFFFF;
  text-align: center;
}

.msg-form {
  padding: 0.46rem 1.15rem 0.7rem;
}

.msg-group + .msg-group {
  margin-top: 0.35rem;
}

.msg-group__title {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 0.12rem;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 0.2rem;
  font-weight: 700;
  line-height: 0.24rem;
  color: #333333;
}

.msg-group__bar {
  -webkit-flex: 0 0 0.03rem;
  flex: 0 0 0.03rem;
  width: 0.03rem;
  height: 0.16rem;
  background: var(--primary);
}

.msg-group__body {
  margin-top: 0.24rem;
}

/* 留言人：两列表单 */
.msg-row {
  display: -webkit-flex;
  display: flex;
  gap: 0.4rem;
}

.msg-row + .msg-row {
  margin-top: 0.16rem;
}

.msg-field {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  height: 0.42rem;
  display: -webkit-flex;
  display: flex;
}

.msg-field__label {
  -webkit-flex: 0 0 0.9rem;
  flex: 0 0 0.9rem;
  width: 0.9rem;
  height: 0.42rem;
  border: 1px solid #DCDCDC;
  background: #ffffff;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 0.16rem;
  line-height: 0.4rem;
  color: #333333;
  text-align: center;
}

.msg-field__input {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  height: 0.42rem;
  padding: 0 0.1rem;
  border: 1px solid #DCDCDC;
  border-left: 0;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 0.16rem;
  color: #333333;
  -webkit-transition: border-color 0.3s ease;
  transition: border-color 0.3s ease;
}

.msg-field__input:focus {
  border-color: var(--primary);
}

/* 留言内容 */
.msg-textarea {
  display: block;
  width: 100%;
  height: 1.2rem;
  padding: 0.08rem 0.1rem;
  border: 1px solid #DCDCDC;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 0.16rem;
  line-height: 0.24rem;
  color: #333333;
  resize: vertical;
  -webkit-transition: border-color 0.3s ease;
  transition: border-color 0.3s ease;
}

.msg-textarea:focus {
  border-color: var(--primary);
}

/* 验证码 */
.msg-captcha {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 0.16rem;
}

.msg-captcha__input {
  -webkit-flex: 0 0 7rem;
  flex: 0 0 7rem;
  width: 7rem;
  height: 0.42rem;
  padding: 0 0.1rem;
  border: 1px solid #DCDCDC;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 0.16rem;
  color: #333333;
  -webkit-transition: border-color 0.3s ease;
  transition: border-color 0.3s ease;
}

.msg-captcha__input:focus {
  border-color: var(--primary);
}

.msg-captcha__code {
  -webkit-flex: 0 0 0.66rem;
  flex: 0 0 0.66rem;
  width: 0.66rem;
  height: 0.3rem;
  display: block;
  -webkit-user-select: none;
  user-select: none;
}

.msg-captcha__refresh {
  -webkit-flex: 0 0 0.22rem;
  flex: 0 0 0.22rem;
  width: 0.22rem;
  height: 0.22rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  -webkit-transition: color 0.3s ease, -webkit-transform 0.3s ease;
  transition: color 0.3s ease, transform 0.3s ease;
}

.msg-captcha__refresh img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.msg-captcha__refresh:hover {
  -webkit-transform: rotate(60deg);
  transform: rotate(60deg);
}

/* 校验提示 */
.msg-form__tip {
  display: none;
  margin-top: 0.22rem;
  padding: 0.1rem 0.16rem;
  border: 1px solid #F3C9CD;
  border-radius: 0.04rem;
  background: #FFF4F4;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 0.14rem;
  line-height: 0.22rem;
  color: var(--primary);
}

.msg-form__tip.is-show {
  display: block;
}

.msg-form__tip.is-success {
  border-color: #CDE6D0;
  background: #F1F8F2;
  color: #2E7D32;
}

.msg-field__input.is-error,
.msg-textarea.is-error,
.msg-captcha__input.is-error {
  border-color: var(--primary);
}

/* 输入框与 label 拼接，聚焦或错误时同步 label 右边框，避免出现左侧缺线 */
.msg-field.is-focus .msg-field__label,
.msg-field.is-error .msg-field__label {
  border-right-color: var(--primary);
}

/* 操作按钮 */
.msg-actions {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 0.78rem;
  margin-top: 0.9rem;
}

.msg-btn {
  width: 1.7rem;
  height: 0.46rem;
  border: 0;
  border-radius: 0.08rem;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 0.18rem;
  color: #FFFFFF;
  text-align: center;
  -webkit-transition: background-color 0.3s ease, color 0.3s ease;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.msg-btn--submit {
  background: var(--primary);
}

.msg-btn--submit:hover {
  background: var(--primary-light);
}

.msg-btn--reset {
  background: #D9D9D9;
  color: #999999;
}

.msg-btn--reset:hover {
  background: #CFCFCF;
  color: #777777;
}

@media (max-width: 800px) {
  .msg-main {
    padding: 16px 0 24px;
    background-image: none;
  }

  .msg-intro__hello {
    font-size: 15px;
    line-height: 24px;
  }

  .msg-intro__desc {
    margin-top: 4px;
    font-size: 12px;
    line-height: 20px;
  }

  .msg-card {
    margin-top: 14px;
  }

  .msg-card__title {
    height: 42px;
    line-height: 42px;
    font-size: 18px;
  }

  .msg-form {
    padding: 18px 16px 24px;
  }

  .msg-group + .msg-group {
    margin-top: 20px;
  }

  .msg-group__title {
    font-size: 15px;
    line-height: 20px;
  }

  .msg-group__bar {
    -webkit-flex-basis: 3px;
    flex-basis: 3px;
    width: 3px;
    height: 15px;
  }

  .msg-group__body {
    margin-top: 12px;
  }

  .msg-row {
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 0;
  }

  .msg-row + .msg-row {
    margin-top: 10px;
  }

  .msg-field,
  .msg-field__label,
  .msg-field__input {
    height: 38px;
  }

  .msg-field__label {
    -webkit-flex-basis: 78px;
    flex-basis: 78px;
    width: 78px;
    line-height: 36px;
    font-size: 13px;
  }

  .msg-field__input {
    font-size: 13px;
  }

  .msg-textarea {
    height: 90px;
    font-size: 13px;
    line-height: 20px;
  }

  .msg-captcha {
    gap: 10px;
  }

  .msg-captcha__input {
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    width: auto;
    height: 38px;
    font-size: 13px;
  }

  .msg-captcha__code {
    -webkit-flex-basis: 66px;
    flex-basis: 66px;
    width: 66px;
    height: 30px;
  }

  .msg-captcha__refresh {
    -webkit-flex-basis: 20px;
    flex-basis: 20px;
    width: 20px;
    height: 20px;
  }

  .msg-form__tip {
    margin-top: 14px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 18px;
  }

  .msg-actions {
    gap: 30px;
    margin-top: 30px;
  }

  .msg-btn {
    width: 110px;
    height: 38px;
    font-size: 14px;
  }
}
