/* ============================================================
   预约回电弹窗 - 全局样式
   ============================================================ */

.cb-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}
.cb-modal-overlay.cb-show {
  opacity: 1;
  visibility: visible;
}
.cb-modal-overlay.cb-show .cb-modal-box {
  transform: translateY(0);
  opacity: 1;
}

.cb-modal-box {
  position: relative;
  width: 720px;
  max-width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 36px 40px;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 两栏表单布局 */
.cb-form-view {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
}
.cb-form-col {
  display: flex;
  flex-direction: column;
}
.cb-form-left {
  flex: 0 0 58%;
  padding-right: 32px;
  border-right: 1px solid #f0f0f0;
}
.cb-form-right {
  flex: 0 0 42%;
  padding-left: 32px;
  justify-content: center;
  align-items: center;
}

/* 右栏微信二维码区域 */
.cb-qr-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cb-qr-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin: 0 0 6px 0;
  line-height: 1.3;
}
.cb-qr-subtitle {
  font-size: 13px;
  color: #999;
  text-align: center;
  margin: 0 0 20px 0;
  line-height: 1.5;
}
.cb-qr-wrap {
  position: relative;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cb-qr-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
.cb-qr-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.cb-qr-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}
.cb-qr-tip {
  font-size: 14px;
  color: #666;
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

.cb-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #999;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}
.cb-close-btn:hover {
  background: #f5f5f5;
  color: #333;
}
.cb-close-btn svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
  max-width: none;
  display: inline-block;
}

.cb-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin: 0 0 8px 0;
  line-height: 1.3;
}
.cb-modal-subtitle {
  font-size: 15px;
  color: #666;
  text-align: center;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* ---- 手机号输入框 ---- */
.cb-input-wrap {
  position: relative;
  margin-bottom: 4px;
}
.cb-phone-input {
  width: 100%;
  height: 48px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 15px;
  color: #1a1a1a;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.cb-phone-input:focus {
  border-color: #3b6ef6;
}
.cb-phone-input.cb-error {
  border-color: #e93b3d;
}
.cb-error-tip {
  font-size: 13px;
  color: #e93b3d;
  margin-top: 6px;
  min-height: 18px;
  line-height: 1.4;
}

/* ---- 回电时间选择组 ---- */
.cb-time-group {
  margin-top: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.cb-time-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.cb-time-option:last-child {
  border-bottom: none;
}
.cb-time-option:hover {
  background: #fafafa;
}
.cb-time-option.cb-active {
  background: #f0f5ff;
  border-left: 3px solid #3b6ef6;
  padding-left: 13px;
}
.cb-time-option.cb-active .cb-time-main {
  color: #1a1a1a;
}

.cb-time-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.cb-time-main {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}
.cb-time-option:not(.cb-active) .cb-time-main {
  font-weight: 500;
}
.cb-time-sub {
  font-size: 13px;
  color: #999;
  line-height: 1.3;
}

.cb-time-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
}
.cb-time-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  color: #3b6ef6;
  background: #fff;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.2s;
}
.cb-time-select:focus {
  border-color: #3b6ef6;
}
.cb-time-select-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: #3b6ef6;
  pointer-events: none;
}
.cb-time-select-arrow svg {
  width: 12px !important;
  height: 12px !important;
  display: inline-block;
}

/* ---- 单选圆钮 ---- */
.cb-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.cb-time-option.cb-active .cb-radio {
  border-color: #3b6ef6;
  background: #3b6ef6;
}
.cb-radio svg {
  width: 12px !important;
  height: 12px !important;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
  display: inline-block;
}
.cb-time-option.cb-active .cb-radio svg {
  opacity: 1;
  transform: scale(1);
}

/* ---- 立即预约按钮 ---- */
.cb-submit-btn {
  width: 100%;
  height: 50px;
  background: #3b6ef6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
  transition: background 0.2s;
  font-family: inherit;
}
.cb-submit-btn:hover {
  background: #2d5ce0;
}
.cb-submit-btn:disabled {
  background: #9cb4f5;
  cursor: not-allowed;
}

/* ---- 底部联系电话区域 ---- */
.cb-contact-area {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cb-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cb-contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fafafa;
  color: #3b6ef6;
}
.cb-contact-icon svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0;
  max-width: none;
  display: inline-block;
}
.cb-contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cb-contact-label {
  font-size: 13px;
  color: #999;
  line-height: 1.3;
}
.cb-contact-phone {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
  line-height: 1.3;
}
.cb-contact-phone:hover {
  color: #3b6ef6;
}

/* ---- 成功状态 ---- */
.cb-success-view {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}
.cb-success-view.cb-show {
  display: flex;
}
.cb-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e8f7ee;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #22c55e;
}
.cb-success-icon svg {
  width: 36px !important;
  height: 36px !important;
  flex-shrink: 0;
  max-width: none;
  display: inline-block;
}
.cb-success-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
  text-align: center;
}
.cb-success-desc {
  font-size: 15px;
  color: #666;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 28px;
}
.cb-done-btn {
  width: 100%;
  height: 48px;
  background: #3b6ef6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.cb-done-btn:hover {
  background: #2d5ce0;
}

.cb-form-view.cb-hide {
  display: none;
}

/* ---- 移动端 ---- */
@media (max-width: 767px) {
  .cb-modal-box {
    width: 90vw;
    max-width: 420px;
    padding: 24px 20px;
    border-radius: 14px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .cb-form-view {
    flex-direction: column;
  }
  .cb-form-left {
    flex: none;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  .cb-form-right {
    flex: none;
    padding-left: 0;
  }
  .cb-qr-wrap {
    width: 160px !important;
    height: 160px !important;
  }
  .cb-modal-title {
    font-size: 20px;
  }
  .cb-modal-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .cb-phone-input {
    height: 44px;
    font-size: 14px;
  }
  .cb-submit-btn {
    height: 46px;
    font-size: 16px;
    margin-top: 20px;
  }
  .cb-contact-area {
    margin-top: 20px;
    padding-top: 16px;
  }
  .cb-success-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
  }
  .cb-success-icon svg {
    width: 30px !important;
    height: 30px !important;
  }
  .cb-success-title {
    font-size: 20px;
  }
  .cb-success-desc {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .cb-time-main {
    font-size: 15px;
  }
  .cb-time-sub {
    font-size: 12px;
  }
  .cb-time-select {
    font-size: 12px;
    padding: 5px 24px 5px 8px;
  }
  .cb-qr-title {
    font-size: 16px;
  }
  .cb-qr-subtitle {
    font-size: 12px;
    margin-bottom: 16px;
  }
  .cb-qr-tip {
    font-size: 13px;
  }
}

/* ---- 隐私政策勾选区域 ---- */
.cb-privacy-wrap {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f7f9fc;
  border-radius: 8px;
  border: 1px solid #e8edf3;
}
.cb-privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.cb-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 4px;
  margin-top: 1px;
  background: #fff;
  position: relative;
  transition: all 0.2s;
  box-sizing: border-box;
}
.cb-checkbox.cb-checked {
  background: #3b6ef6;
  border-color: #3b6ef6;
}
.cb-checkbox.cb-checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cb-privacy-text {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  flex: 1;
}
.cb-privacy-text a {
  color: #3b6ef6;
  text-decoration: none;
}
.cb-privacy-text a:hover {
  text-decoration: underline;
}
.cb-privacy-notice {
  font-size: 11px;
  color: #999;
  line-height: 1.5;
  margin: 8px 0 0 0;
  padding-left: 28px;
}

/* ---- 隐私政策弹层 ---- */
.cb-privacy-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
  box-sizing: border-box;
}
.cb-privacy-overlay.cb-show {
  opacity: 1;
  visibility: visible;
}
.cb-privacy-overlay.cb-show .cb-privacy-box {
  transform: translateY(0);
  opacity: 1;
}
.cb-privacy-box {
  position: relative;
  width: 600px;
  max-width: 100%;
  max-height: 80vh;
  background: #fff;
  border-radius: 14px;
  padding: 32px 32px 24px;
  box-sizing: border-box;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cb-privacy-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 16px 0;
  padding-right: 32px;
  line-height: 1.3;
}
.cb-privacy-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  font-size: 14px;
  color: #444;
  line-height: 1.7;
}
.cb-privacy-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 20px 0 8px 0;
}
.cb-privacy-content h3:first-of-type {
  margin-top: 0;
}
.cb-privacy-content p {
  margin: 0 0 10px 0;
}
.cb-privacy-content ul {
  margin: 0 0 10px 0;
  padding-left: 20px;
}
.cb-privacy-content li {
  margin-bottom: 4px;
}
.cb-privacy-content strong {
  color: #1a1a1a;
}
.cb-privacy-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.cb-privacy-agree {
  width: 100%;
  height: 48px;
  background: #3b6ef6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.2s;
  font-family: inherit;
  flex-shrink: 0;
}
.cb-privacy-agree:hover {
  background: #2d5ce0;
}

/* 移动端：隐私弹层 */
@media (max-width: 767px) {
  .cb-privacy-wrap {
    padding: 10px 12px;
    margin-top: 14px;
  }
  .cb-privacy-text {
    font-size: 12px;
  }
  .cb-privacy-notice {
    font-size: 10px;
    padding-left: 26px;
  }
  .cb-privacy-box {
    width: 92vw;
    max-width: 480px;
    padding: 24px 20px 20px;
    max-height: 85vh;
  }
  .cb-privacy-title {
    font-size: 18px;
  }
  .cb-privacy-content {
    font-size: 13px;
  }
  .cb-privacy-agree {
    height: 44px;
    font-size: 15px;
    margin-top: 16px;
  }
}
