/* ===== 预约咨询页面样式 ===== */

.contact-section {
  padding-top: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: start;
}

/* 左侧信息卡 */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.info-card {
  padding: 24px;
}

.info-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-emoji {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-light);
  border-radius: 8px;
  line-height: 1;
}

.info-list strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.info-list p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* 联系方式 */
.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background-color: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: background-color 0.2s var(--ease-standard),
              border-color 0.2s var(--ease-standard);
  text-decoration: none;
  color: inherit;
}

a.contact-method:hover {
  background-color: var(--accent-light);
  border-color: var(--accent-border);
}

.method-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.contact-method > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.method-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.method-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}

/* 福利卡 */
.info-card-fun {
  text-align: center;
  background-image: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  border-color: #dbeafe;
}

.fun-emoji {
  font-size: 40px;
  margin-bottom: 8px;
  line-height: 1;
}

.info-card-fun h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-card-fun p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* 右侧表单 */
.contact-form {
  padding: 32px;
}

.form-header {
  margin-bottom: 24px;
}

.form-header h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}

.form-header p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

.required {
  color: #ef4444;
  font-weight: 500;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out),
              background-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-group input:hover:not(:focus),
.form-group textarea:hover:not(:focus) {
  border-color: #94a3b8;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
  transition: opacity 0.2s ease;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
  opacity: 0.5;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* 原生 select（隐藏，替换为自定义组件，保留作为数据层） */
.form-group select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2364748b' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  background-size: 12px 12px;
  position: relative;
}

.form-group select option {
  background-color: #ffffff;
  color: var(--text-primary);
}

/* ===== 自定义液态玻璃下拉组件 ===== */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out),
              background-color 0.25s var(--ease-out);
  user-select: none;
  -webkit-user-select: none;
}

.custom-select-trigger:hover {
  border-color: #94a3b8;
  background-color: #fefefe;
}

.custom-select.open .custom-select-trigger {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.custom-select-value {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-value .option-emoji {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
}

.custom-select-value .option-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-value.placeholder-style {
  color: var(--text-tertiary);
}

.custom-select-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: transform 0.3s var(--ease-out),
              color 0.2s ease;
  font-size: 10px;
  line-height: 1;
}

.custom-select.open .custom-select-arrow {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

/* 下拉选项面板 - 液态玻璃 */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12),
              0 2px 8px rgba(15, 23, 42, 0.06);
  padding: 6px;
  z-index: 20;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-out),
              transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
}

.custom-select.open .custom-select-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* 滚动条美化 */
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4);
  border-radius: 100px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.5);
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background-color 0.15s ease,
              color 0.15s ease,
              transform 0.15s var(--ease-out);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-option:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.custom-select-option.selected {
  background-color: rgba(59, 130, 246, 0.14);
  color: var(--accent-primary);
  font-weight: 500;
}

.custom-select-option .option-emoji {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  line-height: 1;
}

.custom-select-option .option-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 联系方式组合输入 - 统一外框承载状态 */
.contact-input-group {
  display: flex;
  align-items: stretch;
  position: relative;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background-color: #fff;
  transition: border-color 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out);
}

.contact-input-group:hover {
  border-color: #94a3b8;
}

.contact-input-group:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.contact-input-group .custom-select {
  width: auto;
  flex-shrink: 0;
  flex: 0 0 112px;
  z-index: 1;
}

.contact-input-group .custom-select-trigger {
  border: none;
  border-radius: 0;
  border-top-left-radius: calc(var(--radius-md) - 1px);
  border-bottom-left-radius: calc(var(--radius-md) - 1px);
  padding-right: 10px;
  padding-left: 14px;
  height: 100%;
  background: transparent;
  box-shadow: none !important;
  position: relative;
}

/* 中间分隔线 */
.contact-input-group .custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background-color: var(--border-light);
  transition: background-color 0.25s var(--ease-out);
}

.contact-input-group:hover .custom-select-trigger::after,
.contact-input-group:focus-within .custom-select-trigger::after {
  background-color: var(--border-medium);
}

/* 下拉打开时也用外框统一的聚焦态 */
.contact-input-group .custom-select.open .custom-select-trigger {
  border: none;
  box-shadow: none !important;
}

.contact-input-group input {
  flex: 1;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  border-top-right-radius: calc(var(--radius-md) - 1px) !important;
  border-bottom-right-radius: calc(var(--radius-md) - 1px) !important;
  margin-left: 0;
  padding-left: 12px;
  height: auto;
  background: transparent;
  box-shadow: none !important;
  outline: none !important;
}

.contact-input-group input:hover,
.contact-input-group input:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* 提交按钮 */
.form-submit {
  width: 100%;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.form-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}

.form-submit:active::before {
  width: 300px;
  height: 300px;
  opacity: 1;
  transition: width 0s, height 0s, opacity 0s;
}

.form-tip {
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ===== 成功弹窗 ===== */
.success-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
  padding: 20px;
}

.success-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.success-modal {
  width: 100%;
  max-width: 420px;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  padding: 36px 28px;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-modal-overlay.show .success-modal {
  transform: translateY(0) scale(1);
}

.success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  background-image: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes successPop {
  0% {
    transform: scale(0.4) rotate(-15deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.success-modal h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.success-modal > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.success-details {
  background-color: rgba(241, 245, 249, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 22px;
  text-align: left;
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
}

.success-detail-row + .success-detail-row {
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.detail-label {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.detail-value {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 65%;
}

.success-modal .btn {
  width: 100%;
}

.success-modal-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* 响应式 */
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .contact-info {
    position: static;
    order: 2;
  }

  .contact-form-wrap {
    order: 1;
  }
}

@media (max-width: 768px) {
  .contact-form {
    padding: 24px 20px;
  }

  .form-header h2 {
    font-size: 19px;
  }

  .info-card {
    padding: 20px;
  }

  .contact-input-group {
    flex-direction: column;
  }

  .contact-input-group .custom-select {
    flex: 1 1 auto;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
  }

  .contact-input-group .custom-select-trigger {
    border: none;
    border-radius: 0;
    border-top-left-radius: calc(var(--radius-md) - 1px);
    border-top-right-radius: calc(var(--radius-md) - 1px);
    padding-right: 14px;
    background: transparent;
  }

  .contact-input-group .custom-select-trigger::after {
    display: none;
  }

  .contact-input-group input {
    border: none !important;
    border-radius: 0 !important;
    border-bottom-left-radius: calc(var(--radius-md) - 1px) !important;
    border-bottom-right-radius: calc(var(--radius-md) - 1px) !important;
    padding-left: 14px;
    background: transparent;
  }

  .success-modal {
    padding: 28px 22px;
  }

  .success-modal h3 {
    font-size: 19px;
  }

  .success-icon {
    width: 60px;
    height: 60px;
    font-size: 30px;
  }
}
