/* 亚马逊视觉专家悬浮组件样式 */
.floating-widget {
  position: fixed !important;
  bottom: 24px !important;
  left: 24px !important;
  width: 320px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  z-index: 1000 !important;
  font-family: 'Source Han Sans SC VF', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid #e8e9ea !important;
  color: #282C36 !important;
}

.floating-widget.collapsed {
  width: 280px !important;
  height: auto !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.floating-widget.collapsed .floating-widget-content {
  display: none !important;
}

.floating-widget.collapsed .floating-widget-header {
  display: none !important;
}

.floating-widget.collapsed .floating-widget-collapsed {
  display: block !important;
}

.floating-widget-collapsed {
  display: none;
  padding: 16px 20px;
  background: #282C36;
  color: white;
  text-align: center;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.floating-widget-collapsed:hover {
  background: #3a3f4a;
}

.collapsed-text {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.floating-widget-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 16px 20px !important;
  background: #282C36 !important;
  border-radius: 16px 16px 0 0 !important;
  color: white !important;
}

.floating-widget-header h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  color: white !important;
}

.toggle-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
  line-height: 1;
}

.toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.floating-widget-content {
  padding: 20px !important;
  background: #ffffff !important;
  color: #282C36 !important;
  border-radius: 0 0 16px 16px !important;
}

.widget-desc {
  margin: 0 0 16px 0 !important;
  font-size: 14px !important;
  color: #666 !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

.asin-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#asin-input {
  flex: 1 !important;
  padding: 12px 16px !important;
  border: 2px solid #e8e9ea !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  transition: border-color 0.2s !important;
  background: #fff !important;
  color: #282C36 !important;
}

#asin-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#asin-input::placeholder {
  color: #999;
}

.diagnose-btn {
  padding: 12px 20px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
  font-family: inherit !important;
}

.diagnose-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.diagnose-btn:active {
  transform: translateY(0);
}

.diagnose-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.diagnose-status {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  transition: all 0.3s;
}

.diagnose-status.loading {
  background-color: #f0f8ff;
  color: #0066cc;
  border: 1px solid #b3d9ff;
}

.diagnose-status.success {
  background-color: #f0fff4;
  color: #006600;
  border: 1px solid #b3e6b3;
}

.diagnose-status.error {
  background-color: #fff5f5;
  color: #cc0000;
  border: 1px solid #ffb3b3;
}

.hidden {
  display: none !important;
}


/* 响应式设计 */
@media (max-width: 768px) {
  .floating-widget {
    bottom: 16px !important;
    left: 16px !important;
    width: calc(100vw - 32px) !important;
    max-width: 320px !important;
  }
  
  .floating-widget.collapsed {
    width: 240px !important;
    height: auto !important;
  }
  
  .asin-input-group {
    flex-direction: column;
  }
  
  .diagnose-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .floating-widget {
    bottom: 12px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
  }
  
  .floating-widget.collapsed {
    width: 200px !important;
    height: auto !important;
  }
  
  .floating-widget-header {
    padding: 12px 16px !important;
  }
  
  .floating-widget-content {
    padding: 16px !important;
  }
}
