/* ==========================================================================
   预约挂号页样式（精简版）
   所有选择器均以 .yygh 为前缀，避免与站点/CMS 现有样式互相污染。
   改主色只需改下面 :root 里的 --c-main 及相关两个变量。
   ========================================================================== */

.yygh {
  --c-main: #2E7CF6;
  --c-main-dark: #1E5FD0;
  --c-main-light: #EAF1FE;
  --c-text: #1A1D24;
  --c-sub: #6B7280;
  --c-line: #E5E8EF;
  --c-bg: #F5F7FA;
  --c-white: #FFFFFF;
  --c-danger: #DC2626;
  --radius: 10px;

  max-width: 640px;
  margin: 0 auto;
  padding: 12px;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.yygh *,
.yygh *::before,
.yygh *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Tab ---------- */
.yygh-tabs {
  display: flex;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 12px;
}

.yygh-tab {
  flex: 1;
  position: relative;
  min-height: 46px;
  padding: 12px 4px;
  border: 0;
  background: none;
  color: var(--c-sub);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.16s;
}

.yygh-tab.is-active {
  color: var(--c-main-dark);
  font-weight: 600;
}

.yygh-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 36px;
  height: 3px;
  margin-left: -18px;
  border-radius: 2px;
  background: var(--c-main);
}

/* ---------- 面板 ---------- */
.yygh-panel {
  display: none;
}

.yygh-panel.is-active {
  display: block;
  animation: yygh-fade 0.2s ease;
}

@keyframes yygh-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 表单容器 ---------- */
.yygh-form {
  padding: 2px 14px;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}

/* ---------- 表单行 ---------- */
.yygh-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 4px 0;
  border-bottom: 1px solid var(--c-line);
}

.yygh-row:last-child {
  border-bottom: 0;
}

.yygh-label {
  flex: none;
  width: 72px;
  font-size: 15px;
  color: var(--c-text);
}

.yygh-label .yygh-req {
  margin-left: 1px;
  color: var(--c-danger);
}

/* 输入框字号必须 >= 16px，否则 iOS 聚焦时会自动放大页面 */
.yygh-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 12px 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--c-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.yygh-input::placeholder {
  color: #B4BAC5;
  font-size: 14.5px;
}

.yygh-input[type="date"] {
  min-height: 46px;
  -webkit-appearance: none;
  appearance: none;
}

/* ---------- 性别单选（保持浏览器原生样式） ---------- */
.yygh-radio {
  display: flex;
  flex: 1;
  gap: 22px;
}

.yygh-radio label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  cursor: pointer;
}

.yygh-radio input {
  margin: 0;
}

/* ---------- 纵向行（病情描述这类整块内容） ---------- */
.yygh-row-col {
  display: block;
  padding: 12px 0 14px;
  border-bottom: 0;
}

.yygh-row-col .yygh-label {
  display: block;
  width: auto;
  margin-bottom: 6px;
}

.yygh-textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 11px 12px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  outline: none;
  background: #FAFBFD;
  color: var(--c-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
}

.yygh-textarea::placeholder {
  color: #B4BAC5;
  font-size: 14.5px;
}

.yygh-textarea:focus {
  border-color: var(--c-main);
  background: var(--c-white);
}

/* ---------- 提交按钮 ---------- */
.yygh-submit {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-main);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s;
}

.yygh-submit:active {
  background: var(--c-main-dark);
}

/* ---------- 说明文字 ---------- */
.yygh-tip {
  margin: 12px 0 0;
  color: var(--c-sub);
  font-size: 12.5px;
  line-height: 1.7;
}

/* ---------- 电话预约 ---------- */
.yygh-tel {
  padding: 28px 16px;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  text-align: center;
}

.yygh-tel-desc {
  margin: 0;
  color: var(--c-sub);
  font-size: 13px;
}

.yygh-tel-num {
  display: block;
  margin: 6px 0;
  color: var(--c-main-dark);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
}

/* ---------- 微信预约步骤 ---------- */
.yygh-steps {
  margin: 0;
  padding: 6px 16px;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  list-style: none;
  counter-reset: yygh-step;
}

.yygh-steps li {
  position: relative;
  padding: 11px 0 11px 32px;
  border-bottom: 1px dashed var(--c-line);
  font-size: 14.5px;
  line-height: 1.6;
}

.yygh-steps li:last-child {
  border-bottom: 0;
}

.yygh-steps li::before {
  content: counter(yygh-step);
  counter-increment: yygh-step;
  position: absolute;
  left: 0;
  top: 12px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--c-main-light);
  color: var(--c-main-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 21px;
  text-align: center;
}

/* ---------- 无障碍 ---------- */
.yygh-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .yygh-panel.is-active {
    animation: none;
  }
}
