/* 预约表单组件样式 */
.appointment-form-wrapper {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 10000000;
  /* 最高层级 */
  pointer-events: none;
  /* 默认允许点击穿透 */
}

/* 当预约表单显示时，隐藏专属客服按钮和聊天图标 */
.appointment-form-wrapper~.chat-icon,
.appointment-form-wrapper~[class*="客服"],
.appointment-form-wrapper~[id*="客服"],
.appointment-form-wrapper~[class*="kefu"],
.appointment-form-wrapper~[id*="kefu"],
.appointment-form-wrapper~[class*="service"],
.appointment-form-wrapper~[id*="service"],
.appointment-form-wrapper~.float-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.appointment-container {
  position: relative;
  width: 400px;
  max-width: calc(100vw - 60px);
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  pointer-events: auto;
  /* 恢复此区域的点击事件 */
  transition: all 0.3s ease;
}

.appointment-header {
  padding: 16px 20px;
  background: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.appointment-title {
  font-size: 20px;
  font-weight: bold;
  color: #000000;
}

.appointment-close {
  width: 10px;
  height: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appointment-close img {
  width: 10px;
  height: 16px;
  display: block;
}

.appointment-body {
  padding: 20px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.appointment-hotline {
  font-size: 18px;
  font-weight: 500;
  color: #000000;
  margin-bottom: 8px;
}

.appointment-desc {
  font-size: 16px;
  color: #4B5563;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

/* 联系方式输入框组 */
.form-group.contact-input {
  margin-top: -8px;
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  height: 114px;
  resize: none;
}

/* 联系方式标签样式 */
.contact-tabs {
  display: flex;
  width: 100%;
  margin-bottom: 8px;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.contact-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 14px;
  color: #000000;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0;
  outline: none;
  position: relative;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.contact-tab:focus {
  outline: none;
}

/* 确保只有一个选项会被激活 */
.contact-tab.chat-active {
  background: #E51937;
  color: white;
  border-color: #E51937;
  font-weight: 500;
  z-index: 2;
  pointer-events: auto;
}

/* 必填标记 */
.required-mark {
  color: #E51937;
  margin-left: 2px;
}

.appointment-submit {
  width: 100%;
  padding: 12px;
  background: #E51937;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.appointment-submit:hover {
  opacity: 0.9;
}

.appointment-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 错误样式 */
.error-message {
  color: #E51937;
  font-size: 12px;
  margin-top: 4px;
}

.has-error input,
.error-input {
  border-color: #E51937 !important;
  background-color: #fff8f8;
}

@media (max-width: 480px) {
  .appointment-form-wrapper {
    right: 10px;
    bottom: 10px;
  }

  .appointment-container {
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .appointment-body {
    padding: 16px;
    max-height: calc(100vh - 120px);
  }
}

/* 成功提示弹窗样式 */
.success-modal-wrapper {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99999999;
  /* 确保显示在最顶层，高于聊天窗口 */
  animation: slide-in 0.3s ease-out;
}

@keyframes slide-in {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.success-modal {
  width: 280px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
}

.success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #E8F5E9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.success-title {
  font-size: 20px;
  font-weight: 500;
  color: #000000;
  margin: 0 0 10px;
}

.success-message {
  font-size: 16px;
  line-height: 24px;
  color: #4B5563;
  margin: 0 0 15px;
}

.success-btn {
  border-radius: 8px;
  background: #E51937;
  border: none;
  padding: 6px 25px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 16px;
  font-weight: 500;
  color: #FFFFFF;
}

.success-btn:hover {
  background-color: #E51937;
}