/* 我要写信页面样式 */

.writeletter-page {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 0 20px;
  background-color: #ffffff;
  box-sizing: border-box;
}

.writeletter-container {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
  background-color: #ffffff;
  justify-content: center;
}

.writeletter-main {
  flex: 1;
  max-width: 913px;
  min-width: 0;
}

.form-wrapper {
  width: 100%;
  border: 1px solid #51b9ff;
  background: #fff;
}

.form-header {
  height: 52px;
  line-height: 52px;
  background-color: #eeeeee;
  padding-left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-title {
  font-size: 16px;
  color: #333333;
  font-weight: normal;
}

.form-content {
  padding: 5px 0;
}

/* 表单行：统一整行宽度，label 与 input 同高对齐 */
.form-row {
  display: flex;
  width: 100%;
  margin: 0 0 5px;
  box-sizing: border-box;
  align-items: stretch;
}

.form-label {
  flex: 0 0 110px;
  width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #95d5ff;
  color: #333;
  font-size: 14px;
  padding: 0 8px;
  box-sizing: border-box;
  min-height: 40px;
}

.form-input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 0px 10px;
  background-color: #ffffff;
  text-align: left;
  box-sizing: border-box;
  min-height: 40px;
}

.form-input input[type="text"] {
  width: 100%;
  max-width: 100%;
  height: 40px;
  line-height: 40px;
  padding: 0 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

/* 收信人 / 主题 / 内容：与信件内容同宽铺满输入区 */
#bm1,
#title,
#content {
  width: 100%;
  max-width: 100%;
}

.form-input input[type="text"]:focus {
  border-color: #51b9ff;
}

.form-input input[readonly] {
  background-color: #f5f5f5;
}

.form-input textarea {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 220px;
  padding: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  font-family: "Microsoft YaHei", "SimSun", sans-serif;
  resize: vertical;
  outline: none;
  color: #666666;
  box-sizing: border-box;
  align-self: stretch;
}

.form-row-textarea .form-input {
  align-items: flex-start;
}

.form-input textarea:focus {
  border-color: #51b9ff;
}

/* 短信验证：手机号与验证码输入框等宽 */
#tel1,
#smsCode {
  width: 220px;
  max-width: 100%;
  flex: 0 0 220px;
}

#captcha {
  width: 200px;
  max-width: 100%;
  flex: 0 0 200px;
}

#randImage {
  height: 34px;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid #ddd;
}

/* 信件类别（从接口动态加载的样式） */
#letterTypeContainer input[type="radio"] {
  margin-right: 5px;
  vertical-align: middle;
}

#letterTypeContainer label {
  margin-right: 15px;
  cursor: pointer;
  display: inline-block;
}

#letterTypeContainer label span {
  vertical-align: middle;
}

/* 按钮样式 */
.btn-send-code {
  margin-left: 0;
  height: 34px;
  padding: 0 12px;
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  vertical-align: middle;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-send-code:hover {
  background-color: #51b9ff;
  color: #fff;
  border-color: #51b9ff;
}

.btn-send-code:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.verify-tip {
  margin-left: 0;
  color: #666;
  font-size: 13px;
  line-height: 34px;
}

/* 表单操作按钮 */
.form-actions {
  width: 96%;
  margin: 20px auto 0;
  text-align: center;
  padding: 20px 0 10px;
}

.form-actions hr {
  margin-bottom: 20px;
  border: none;
  border-top: 1px solid #e0e0e0;
}

.btn-primary,
.btn-secondary {
  width: 110px;
  height: 38px;
  margin: 0 10px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #51b9ff;
  color: #fff;
}

.btn-primary:hover {
  background-color: #3fa0e8;
}

.btn-secondary {
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
}

.btn-secondary:hover {
  background-color: #f5f5f5;
}

/* 写信须知侧边栏 */
.writeletter-sidebar {
  width: 287px;
  flex-shrink: 0;
  background-color: #eeeeee;
  padding: 0;
}

.notice-box {
  padding: 15px;
}

.notice-box h3 {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin: 0 0 10px;
}

.notice-box hr {
  margin-bottom: 15px;
  border: none;
  border-top: 1px solid #ccc;
}

.notice-content {
  line-height: 200%;
  font-size: 14px;
  color: #333;
}

.notice-content p {
  margin: 0 0 10px;
  text-align: justify;
}

.notice-content .highlight {
  color: #ff0000;
}

/* 办理流程图 */
.process-banner {
  width: 100%;
  background: #fff;
  padding: 5px;
  border: 1px solid #51b9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.process-icon {
  width: 50px;
  height: 117px;
  flex-shrink: 0;
}

.process-image {
  max-width: 1070px;
  height: auto;
  flex: 1;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .writeletter-page {
    width: 100%;
    padding: 10px;
  }

  .writeletter-container {
    flex-direction: column;
  }

  .writeletter-main {
    max-width: 100%;
  }

  .writeletter-sidebar {
    width: 100%;
  }

  .form-input input[type="text"],
  #bm1,
  #title,
  .form-input textarea {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .writeletter-container {
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .form-wrapper {
    border: 1px solid #51b9ff;
  }

  .form-header {
    height: 45px;
    line-height: 45px;
    padding-left: 15px;
  }

  .form-header img {
    width: 28px;
    height: 20px;
  }

  .form-title {
    font-size: 15px;
  }

  .form-content {
    padding: 0;
  }

  .form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0;
  }

  .form-label {
    flex: 0 0 100%;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    padding: 10px 15px;
    min-height: auto;
    font-size: 13px;
    box-sizing: border-box;
  }

  .form-input {
    flex: 0 0 100%;
    width: 100%;
    padding: 10px 15px;
    box-sizing: border-box;
    min-height: auto;
  }

  .form-input input[type="text"],
  #bm1,
  #title,
  #tel1,
  #smsCode,
  #captcha {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    height: 36px;
    line-height: 36px;
    font-size: 14px;
  }

  .form-input textarea {
    width: 100%;
    max-width: 100%;
    min-height: 150px;
    font-size: 14px;
  }

  #letterTypeContainer {
    display: block;
  }

  #letterTypeContainer label {
    display: block;
    margin-bottom: 10px;
    margin-right: 0;
  }

  .btn-send-code {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    padding: 8px 12px;
    height: 36px;
  }

  .verify-tip {
    display: block;
    margin-left: 0;
    margin-top: 8px;
    font-size: 12px;
  }

  #randImage {
    display: block;
    margin: 10px 0 !important;
    width: 120px;
    height: 40px !important;
  }

  .form-actions {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 150px;
    height: 40px;
    margin: 5px;
    font-size: 15px;
  }

  .notice-box {
    padding: 15px;
  }

  .notice-box h3 {
    font-size: 15px;
  }

  .notice-content {
    font-size: 13px;
    line-height: 180%;
  }

  .process-banner {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .process-icon {
    width: 40px;
    height: auto;
  }

  .process-image {
    width: 100%;
    max-width: 100%;
  }
}
