/* 浮动表单容器的CSS样式 */
.floating-form-container {
  background: white;
  padding: 5px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  position: fixed;
  /* 使其浮动 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  /* 初始隐藏 */
  z-index: 1000;
  /* 确保在其他元素之上 */
  transition: transform 0.3s ease-in-out;
}

.floating-form-container.active {
  transform: translate(-50%, -50%) scale(1);
}


.floating-form h3 {
  color: var(--primary);
  margin-top: 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group input,
.form-group select {
  width: 90%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.form-submit {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.form-submit:hover {
  background: #001a4d;
}

.gdpr-notice {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}

/* 遮罩层样式 */
.form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.form-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .floating-form-container {
    max-width: 95% !important;
    /* 尝试 95% */
    width: auto !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(0);
    min-width: 60%;
    z-index: 1000
  }

  .floating-form-container.active {
    transform: translate(-50%, -50%) scale(1);
  }
}

.toast-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.toast-message.show {
  opacity: 1;
}