/* ==========================================================================
   Zhenxing Tech - Floating Inquiry Chat Widget Styles (No Avatar, Pure Icon)
   ========================================================================== */

/* Launcher Trigger Button (Collapsed State) */
.zx-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 10px;
  background: #ffffff;
  border: 1.5px solid #25a4eb;
  border-radius: 40px;
  box-shadow: 0 8px 24px rgba(37, 164, 235, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.zx-chat-launcher:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(37, 164, 235, 0.32), 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #1b8ecf;
}

.zx-chat-launcher-icon-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #25a4eb 0%, #1a8ad0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 164, 235, 0.3);
}

.zx-chat-launcher-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.zx-chat-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.zx-chat-launcher-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.2px;
}

/* Chat Popup Window */
.zx-chat-window {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 350px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border: 2px solid #25a4eb;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16), 0 4px 16px rgba(37, 164, 235, 0.12);
  z-index: 99995;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.zx-chat-window.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Top Blue Bar */
.zx-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #25a4eb 0%, #1e8cd0 100%);
  color: #ffffff;
  padding: 13px 18px;
  cursor: pointer;
  user-select: none;
}

.zx-chat-header-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #ffffff;
}

.zx-chat-header-btn {
  background: none;
  border: none;
  color: #ffffff;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.zx-chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.zx-chat-header-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  transition: transform 0.2s ease;
}

/* Body and Form */
.zx-chat-body {
  padding: 16px 18px 20px 18px;
  background: #ffffff;
}

.zx-chat-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.zx-chat-input-wrap {
  position: relative;
  width: 100%;
}

.zx-chat-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  border: 1.5px solid #dbe2e8;
  border-radius: 22px;
  font-size: 13px;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.zx-chat-input::placeholder {
  color: #8392a5;
  font-size: 12.5px;
}

.zx-chat-input:focus {
  border-color: #25a4eb;
  box-shadow: 0 0 0 3px rgba(37, 164, 235, 0.18);
}

.zx-chat-textarea {
  border-radius: 16px;
  height: 82px;
  resize: none;
  line-height: 1.45;
  padding: 11px 16px;
}

.zx-chat-textarea::placeholder {
  color: #8392a5;
  font-size: 12px;
  line-height: 1.4;
}

/* Submit Button */
.zx-chat-submit-btn {
  background: #71bf44;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 24px;
  padding: 11px 0;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(113, 191, 68, 0.35);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.zx-chat-submit-btn:hover {
  background: #62aa37;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(113, 191, 68, 0.45);
}

.zx-chat-submit-btn:active {
  transform: translateY(0);
}

.zx-chat-submit-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Alert Notification Banner */
.zx-chat-alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  display: none;
  animation: zxChatFadeIn 0.3s ease;
}

.zx-chat-alert.is-error {
  display: block;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.zx-chat-alert.is-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  gap: 12px;
}

.zx-chat-alert.is-success svg {
  width: 44px;
  height: 44px;
  color: #22c55e;
}

.zx-chat-alert-title {
  font-size: 16px;
  font-weight: 700;
  color: #15803d;
}

.zx-chat-alert-desc {
  font-size: 13px;
  color: #166534;
  line-height: 1.45;
}

@keyframes zxChatFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Spinner */
.zx-chat-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: zxChatSpin 0.7s linear infinite;
}

@keyframes zxChatSpin {
  to { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .zx-chat-window {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }
  .zx-chat-launcher {
    right: 16px;
    bottom: 16px;
  }
}


/* ==========================================================================
   Product Detail Customization Inquiry Modal (开始定制 / 咨询底价 专属弹窗)
   ========================================================================== */
.zx-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 34, 64, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.zx-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.zx-modal-container {
  background: #ffffff;
  width: 500px;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 34, 64, 0.25), 0 0 0 1px rgba(15, 34, 64, 0.08);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.zx-modal-overlay.is-active .zx-modal-container {
  transform: translateY(0) scale(1);
}

.zx-modal-header {
  background: linear-gradient(135deg, #0f2240 0%, #1b355d 100%);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.zx-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.zx-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.zx-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.zx-modal-body {
  padding: 24px;
}

.zx-modal-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: #1d4ed8;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
  width: 100%;
  box-sizing: border-box;
}

.zx-modal-product-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.zx-modal-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.zx-modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.zx-modal-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.zx-modal-label .req {
  color: #ef4444;
  margin-left: 2px;
}

.zx-modal-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14.5px;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.zx-modal-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.zx-modal-textarea {
  height: 84px;
  padding: 10px 14px;
  resize: vertical;
}

.zx-modal-submit-btn {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  background: linear-gradient(135deg, #ff6b00 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.zx-modal-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(234, 88, 12, 0.4);
  filter: brightness(1.04);
}

.zx-modal-submit-btn:active {
  transform: translateY(1px);
}

.zx-modal-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.zx-modal-success-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px 24px;
  gap: 14px;
}

.zx-modal-success-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zx-modal-success-icon svg {
  width: 32px;
  height: 32px;
}

.zx-modal-success-headline {
  font-size: 19px;
  font-weight: 700;
  color: #15803d;
  line-height: 1.4;
}

.zx-modal-success-sub {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}

.zx-modal-success-btn {
  margin-top: 10px;
  padding: 10px 32px;
  background: #0f2240;
  color: #ffffff;
  border-radius: 999px;
  border: none;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
