/* 文件描述：培训合作伙伴申请弹窗样式（对齐试用申请 sa-form 下划线表单） */

/* 双弹窗略宽，便于长标签（证书选项等） */
.ztp-modal-cover .event-modal {
  max-width: 520px;
  border-radius: 4px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}

.ztp-modal-cover .event-modal__title {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 700;
  color: #1a2736;
  text-align: center;
}

/* 关闭按钮 */
.ztp-modal-cover .event-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #97a4b6;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.ztp-modal-cover .event-modal__close:hover {
  color: #1a1a1a;
  background-color: rgba(0, 0, 0, 0.06);
}

.ztp-modal-cover .event-modal__close:active {
  background-color: rgba(0, 0, 0, 0.1);
}

/* ── 下划线输入行（对齐 .sa-form__line） ── */
.ztp-modal-cover .event-modal__field:not(.ztp-law) {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  border-bottom: 1px solid #e5eaf0;
  padding: 14px 0 12px;
  transition: border-color 0.2s ease;
}

.ztp-modal-cover .event-modal__field:not(.ztp-law)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--blue, var(--primary, #115391));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.ztp-modal-cover .event-modal__field:not(.ztp-law):hover {
  border-bottom-color: #c5ced9;
}

.ztp-modal-cover .event-modal__field:not(.ztp-law):focus-within {
  border-bottom-color: transparent;
}

.ztp-modal-cover .event-modal__field:not(.ztp-law):focus-within::after {
  transform: scaleX(1);
}

.ztp-modal-cover .event-modal__field:not(.ztp-law):focus-within > label,
.ztp-modal-cover .event-modal__field:not(.ztp-law):focus-within .ztp-label {
  color: var(--blue, var(--primary, #115391));
}

.ztp-modal-cover .event-modal__field:not(.ztp-law) > label {
  flex: 0 0 72px;
  margin: 0;
  white-space: nowrap;
  font-size: 14px;
  color: #1a2736;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.ztp-label {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  font-size: 14px;
  color: #1a2736;
  white-space: nowrap;
  line-height: 1.4;
  transition: color 0.2s ease;
}

/* 覆盖 event_modal 方框输入，改为透明下划线风 */
.ztp-modal-cover .event-modal__field:not(.ztp-law) > input,
.ztp-modal-cover .event-modal__field:not(.ztp-law) > select,
.ztp-modal-cover .event-modal__captcha input,
.ztp-modal-cover .event-modal__sms input {
  flex: 1;
  min-width: 0;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: #1a2736;
  box-sizing: border-box;
}

.ztp-modal-cover .event-modal__field input::placeholder {
  color: #c5ced9;
}

/* 下拉：自定义箭头 */
.ztp-modal-cover .event-modal__field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2397a4b6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px 8px;
  cursor: pointer;
}

.ztp-modal-cover .event-modal__captcha,
.ztp-modal-cover .event-modal__sms {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 0;
}

.ztp-modal-cover .event-modal__captcha-img,
.ztp-modal-cover .ztp-captcha-img {
  height: 40px;
  width: auto;
  max-width: 120px;
  margin-left: 8px;
  border-radius: 6px;
  border: 1px solid #e5eaf0;
  cursor: pointer;
  flex: 0 0 auto;
  object-fit: contain;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.ztp-modal-cover .ztp-captcha-img:hover {
  opacity: 0.88;
  border-color: #c5ced9;
}

/* 短信按钮：文字链样式，非实心块 */
.ztp-modal-cover .event-modal__sms-btn,
.ztp-modal-cover .event-btn.event-modal__sms-btn {
  flex: 0 0 auto;
  appearance: none;
  min-height: auto;
  min-width: auto;
  margin-left: 4px;
  padding: 0 0 0 14px;
  border: none;
  border-left: 1px solid #e5eaf0;
  border-radius: 0;
  background: transparent;
  color: var(--blue, var(--primary, #115391));
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
  transform: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ztp-modal-cover .event-modal__sms-btn:hover:not(:disabled),
.ztp-modal-cover .event-btn.event-modal__sms-btn:hover:not(:disabled) {
  background: transparent;
  border-color: transparent;
  border-left-color: #e5eaf0;
  color: var(--blue-dk, #0c3d6b);
  box-shadow: none;
  transform: none;
}

.ztp-modal-cover .event-modal__sms-btn:disabled,
.ztp-modal-cover .event-btn.event-modal__sms-btn:disabled {
  color: #97a4b6;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 证书选择题：文案与是/否同一行，垂直居中对齐 */
.ztp-cert-choice {
  align-items: center;
  justify-content: flex-start;
}

.ztp-cert-choice .ztp-label {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  height: 26px; /* 与单选行同高，保证垂直对齐 */
}

.ztp-cert-choice .ztp-radio-row {
  flex: 0 0 auto;
  margin-left: 4px;
  height: 26px;
}

.ztp-radio-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.ztp-radio-row .ztp-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
  height: 100%;
}

.ztp-radio-row .ztp-radio input {
  margin: 0 !important; /* 覆盖勾选框默认上边距，保证与文字垂直居中 */
}

.ztp-radio,
.ztp-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
  cursor: pointer;
}

/* 覆盖 event_modal 里 input{width:100%}，避免勾选框被撑满 */
.ztp-modal-cover .ztp-radio input,
.ztp-modal-cover .ztp-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  padding: 0;
  border: 1.5px solid #c5ced9;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ztp-modal-cover .ztp-radio input {
  border-radius: 50%;
}

.ztp-modal-cover .ztp-radio input:checked,
.ztp-modal-cover .ztp-check input:checked {
  background: var(--blue, var(--primary, #115391));
  border-color: var(--blue, var(--primary, #115391));
}

.ztp-modal-cover .ztp-check input:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.ztp-modal-cover .ztp-radio input:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
}

/* 法律协议：对齐 sa-form__agree */
.ztp-law {
  display: block;
  margin: 18px 0 0;
  border: none;
  padding: 0;
}

.ztp-law .ztp-check {
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
  white-space: normal;
}

.ztp-law .ztp-check span {
  white-space: normal;
}

.ztp-law a {
  color: var(--blue, var(--primary, #115391));
  text-decoration: none;
}

.ztp-law a:hover {
  color: var(--blue-dk, #0c3d6b);
  text-decoration: underline;
}

.ztp-gs-no-cert .event-modal__desc {
  margin: 16px 0 8px;
  color: #c0392b;
  font-size: 14px;
  line-height: 1.6;
}

.ztp-modal-cover .event-modal__error {
  display: block;
  margin: 12px 0 0;
  color: #dc2626;
  font-size: 13px;
  text-align: center;
  min-height: 1.2em;
}

/* 覆盖 event_modal.css 的 display:none，仅靠 hidden 控制显隐 */
.ztp-modal-cover .event-modal__error[hidden] {
  display: none !important;
}

/* 提交按钮：对齐 sa-form__submit */
.ztp-modal-cover .event-modal__submit,
.ztp-modal-cover .event-btn.event-modal__submit {
  appearance: none;
  display: block;
  width: 100%;
  min-height: auto;
  margin-top: 20px;
  padding: 14px 18px;
  border: none;
  border-radius: 6px;
  background: var(--blue, var(--primary, #115391));
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ztp-modal-cover .event-modal__submit:hover:not(:disabled),
.ztp-modal-cover .event-btn.event-modal__submit:hover:not(:disabled) {
  background: var(--blue-dk, #0c3d6b);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(17, 83, 145, 0.28);
}

.ztp-modal-cover .event-modal__submit:active:not(:disabled),
.ztp-modal-cover .event-btn.event-modal__submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(17, 83, 145, 0.18);
}

.ztp-modal-cover .event-modal__submit:disabled,
.ztp-modal-cover .event-btn.event-modal__submit:disabled {
  background: #c5ced9;
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 提交中：保留主色 + 转圈，避免灰掉像不可用 */
.ztp-modal-cover .event-modal__submit.is-loading,
.ztp-modal-cover .event-btn.event-modal__submit.is-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--blue, var(--primary, #115391));
  color: #fff;
  cursor: wait;
  pointer-events: none;
}

.ztp-modal-cover .event-modal__submit.is-loading::before,
.ztp-modal-cover .event-btn.event-modal__submit.is-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ztp-submit-spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes ztp-submit-spin {
  to {
    transform: rotate(360deg);
  }
}
