/* ============================================
   旭达电脑 预约表单独立样式
   style-xudanet.css — 不与根目录 style.css 冲突
   所有类名前缀 .xd-
   ============================================ */

.xd-booking-widget {
  background: #fff;
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  max-width: 680px;
  margin: 0 auto;
}

.xd-booking-widget h3 {
  text-align: center;
  font-size: 1.5rem;
  color: #1a6fb5;
  margin-bottom: 8px;
}

.xd-booking-widget .xd-subtitle {
  text-align: center;
  color: #6b7c8d;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.xd-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.xd-form-group {
  margin-bottom: 18px;
}

.xd-form-group label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}

.xd-form-group label .xd-required {
  color: #e74c3c;
  margin-left: 2px;
}

.xd-form-group label .xd-optional {
  color: #95a5a6;
  font-weight: 400;
  font-size: 0.82rem;
  margin-left: 4px;
}

.xd-form-control {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #2c3e50;
  background: #f8fafc;
  border: 1.5px solid #e1e8ed;
  border-radius: 8px;
  transition: all 0.25s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.xd-form-control:focus {
  border-color: #1a6fb5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,111,181,0.12);
}

.xd-form-control.xd-error {
  border-color: #e74c3c;
  background: #fef5f5;
}

.xd-form-control::placeholder {
  color: #b0bec5;
}

select.xd-form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea.xd-form-control {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

input[type="date"].xd-form-control {
  cursor: pointer;
}

.xd-error-msg {
  display: none;
  color: #e74c3c;
  font-size: 0.82rem;
  margin-top: 5px;
  padding-left: 2px;
}

.xd-error-msg.xd-show {
  display: block;
}

.xd-submit-btn {
  width: 100%;
  padding: 15px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #1a6fb5, #155a94);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.xd-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #155a94, #0d3b66);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,111,181,0.35);
}

.xd-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.xd-submit-btn.xd-loading {
  pointer-events: none;
}

.xd-submit-btn .xd-btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.xd-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: xd-spin 0.7s linear infinite;
}

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

/* 弹窗 */
.xd-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.xd-modal-overlay.xd-show {
  display: flex;
  animation: xd-fadeIn 0.25s ease;
}

@keyframes xd-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.xd-modal {
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: xd-slideUp 0.3s ease;
}

@keyframes xd-slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.xd-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.xd-modal-icon.xd-success {
  background: #e8f8ef;
  color: #27ae60;
}

.xd-modal-icon.xd-error {
  background: #fef0f0;
  color: #e74c3c;
}

.xd-modal h4 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.xd-modal p {
  color: #6b7c8d;
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.xd-modal-btn {
  display: inline-block;
  padding: 11px 36px;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #1a6fb5;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.xd-modal-btn:hover {
  background: #155a94;
}

/* 响应式 */
@media (max-width: 600px) {
  .xd-booking-widget {
    padding: 24px 18px;
    border-radius: 10px;
  }
  .xd-booking-widget h3 { font-size: 1.25rem; }
  .xd-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .xd-form-row .xd-form-group {
    margin-bottom: 18px;
  }
  .xd-submit-btn { padding: 13px 24px; font-size: 1rem; }
  .xd-modal { padding: 28px 20px; }
}
