/* =========================================================
   单手机端 · 获取手机号验证码登录
   基础样式来自 scan.css / login.css。
   ========================================================= */

/* ---------- 已分配手机号 + 获取验证码 ---------- */

.sms-phone-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 16px 16px 18px;
  background:
    linear-gradient(120deg, rgba(233, 248, 240, 0.9), rgba(251, 253, 251, 0.85)),
    #fff;
  border: 1px solid #bfe6d3;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(23, 163, 148, 0.05);
  animation: sms-box-in 0.3s ease both;
}

@keyframes sms-box-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sms-phone-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sms-phone-caption {
  font-size: 10.5px;
  color: #5b7c71;
  letter-spacing: 0.04em;
}

.sms-phone-number {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 700;
  color: #0f6b4f;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 地区名（香港 / 澳门 …）：弱化显示，号码才是重点。 */
.sms-phone-region {
  margin-right: 6px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 650;
  color: #2f6b5e;
  letter-spacing: 0;
}

.sms-phone-meta {
  font-size: 10.5px;
  color: var(--muted-light);
}

.sms-phone-meta:empty {
  display: none;
}

.sms-code-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 650;
  color: #f6fffb;
  white-space: nowrap;
  background: linear-gradient(135deg, #12857b 0%, var(--teal-deep) 100%);
  border: 0;
  border-radius: 11px;
  box-shadow: 0 12px 24px -14px rgba(10, 79, 73, 0.6);
  transition: filter 0.16s ease, transform 0.16s ease;
}

.sms-code-btn:hover {
  filter: brightness(1.05);
}

.sms-code-btn:active {
  transform: translateY(1px);
}

.sms-code-btn:disabled {
  cursor: wait;
  filter: saturate(0.7);
  opacity: 0.82;
}

.sms-code-btn svg {
  width: 17px;
  height: 17px;
}

.sms-code-btn .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sms-spin 0.7s linear infinite;
}

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

.sms-code-btn.is-busy .spinner {
  display: inline-block;
}

.sms-code-btn.is-busy svg {
  display: none;
}

/* ---------- 等待短信 ---------- */

.sms-wait {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f5faf7;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

.sms-wait-dot {
  position: relative;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  background: var(--teal-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(23, 163, 148, 0.14);
  animation: blink-dot 1.2s ease-in-out infinite;
}

.sms-wait > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sms-wait strong {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
}

.sms-wait span {
  font-size: 10.5px;
  color: var(--muted-light);
}

.sms-wait-count {
  flex: 0 0 auto;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
}

/* ---------- 验证码结果 ---------- */

.sms-result {
  display: grid;
  justify-items: center;
  padding: 8px 0 0;
  text-align: center;
  animation: result-in 0.42s ease both;
}

.sms-result h3 {
  margin: 0 0 7px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sms-code-display {
  margin: 4px 0 14px;
  padding: 14px 30px;
  font-family: var(--mono);
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 700;
  color: #0f6b4f;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  background: #ecfaf3;
  border: 1.5px solid #b7e3d1;
  border-radius: var(--radius-lg);
  user-select: all;
}

.sms-copy-btn {
  margin-bottom: 18px;
}

.sms-result .result-grid {
  width: 100%;
}

.sms-result .ghost-btn + .ghost-btn {
  margin-top: 10px;
}

@media (max-width: 620px) {
  .sms-phone-box {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .sms-code-btn {
    width: 100%;
  }

  .sms-phone-number {
    font-size: 19px;
  }

  .sms-code-display {
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }
}
