#shop-support-root { position: relative; z-index: 10050; }
.shop-support-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #409eff), #1d8cf8);
  color: #fff;
  box-shadow: 0 10px 28px rgba(64, 158, 255, 0.45);
  cursor: pointer;
  z-index: 10052;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shop-support-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(64, 158, 255, 0.5);
}
.shop-support-fab-icon { font-size: 1.5rem; line-height: 1; }
.shop-support-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #f56c6c;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
}
.shop-support-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 10050;
  display: none;
}
.shop-support-backdrop.is-open {
  display: block;
}
.shop-support-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: #f8fafc;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  display: none;
  flex-direction: column;
  z-index: 10051;
}
.shop-support-panel.is-open {
  display: flex;
  animation: shop-support-slide-in 0.28s ease;
}
.shop-support-panel[hidden],
.shop-support-backdrop[hidden] {
  display: none !important;
}
@keyframes shop-support-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.shop-support-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--primary, #409eff), #2563eb);
  color: #fff;
  border-bottom: none;
}
.shop-support-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.shop-support-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.shop-support-header-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.9;
}
.shop-support-header strong {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}
.shop-support-close {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}
.shop-support-close:hover {
  background: rgba(255, 255, 255, 0.28);
}
.shop-support-status {
  padding: 10px 16px;
  font-size: 0.8125rem;
  color: #475569;
  background: #e8f1ff;
  border-bottom: 1px solid #dbeafe;
}
.shop-support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f1f5f9;
}
.shop-support-msg {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
}
.shop-support-msg-system {
  align-self: center;
  background: transparent;
  color: #909399;
  font-size: 0.75rem;
  padding: 0;
}
.shop-support-msg-user {
  align-self: flex-end;
  background: var(--primary, #409eff);
  color: #fff;
}
.shop-support-msg-other {
  align-self: flex-start;
  background: #f2f3f5;
  color: #303133;
}
.shop-support-card {
  font-size: 0.8125rem;
}
.shop-support-compose {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.shop-support-compose textarea {
  flex: 1;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #f8fafc;
}
.shop-support-compose textarea:focus {
  outline: none;
  border-color: var(--primary, #409eff);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
}
.shop-support-send {
  border: none;
  border-radius: 12px;
  background: var(--primary, #409eff);
  color: #fff;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
  min-width: 64px;
}
.shop-support-offline {
  padding: 16px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}
.shop-support-offline-hint {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: #64748b;
}
.shop-support-offline textarea {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  margin-bottom: 10px;
}
.shop-support-actions {
  padding: 0 16px 12px;
  text-align: right;
}
.shop-support-link {
  border: none;
  background: none;
  color: #909399;
  font-size: 0.8125rem;
  cursor: pointer;
}
body.shop-support-open { overflow: hidden; }

@media (max-width: 640px) {
  .shop-support-panel { width: 100vw; }
}
