/* 工作台助手 · 右下角悬浮 */

.ws-assistant {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1200;
  font-family: var(--font-body, "Noto Sans SC", sans-serif);
}

.ws-assistant-fab {
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.35);
}

.ws-assistant-fab:hover,
.ws-assistant-fab:focus-visible {
  background: #0b5f59;
  outline: none;
}

.ws-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 3.6rem;
  width: min(380px, calc(100vw - 1.5rem));
  max-height: min(72vh, 560px);
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  gap: 0.55rem;
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.96);
  border: 1px solid rgba(26, 47, 54, 0.12);
  box-shadow: 0 20px 50px rgba(18, 48, 54, 0.22);
  backdrop-filter: blur(10px);
}

.ws-assistant-panel[hidden] {
  display: none !important;
}

.ws-assistant-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.ws-assistant-header strong {
  display: block;
  font-size: 1.05rem;
  color: #0b5f59;
}

.ws-assistant-header p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #3d5560;
}

.ws-assistant-close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #3d5560;
  min-width: 44px;
  min-height: 44px;
}

.ws-assistant-disclaimer {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(154, 103, 0, 0.1);
  border: 1px solid rgba(154, 103, 0, 0.22);
  color: #7a5200;
  font-size: 0.8rem;
}

.ws-assistant-log {
  overflow-y: auto;
  min-height: 160px;
  max-height: 280px;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  padding: 0.65rem;
  border-radius: 12px;
  background: rgba(26, 47, 54, 0.04);
  border: 1px solid rgba(26, 47, 54, 0.1);
}

.ws-bubble {
  max-width: 94%;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  line-height: 1.5;
}

.ws-bubble p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: #1a2f36;
}

.ws-role {
  font-size: 0.72rem;
  font-weight: 700;
  color: #3d5560;
}

.ws-bot {
  justify-self: start;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.14);
}

.ws-user {
  justify-self: end;
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.ws-assistant-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ws-assistant-quick button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  background: #fff;
  color: #0b5f59;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.ws-assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.ws-assistant-form input {
  min-height: 44px;
  border: 1px solid rgba(26, 47, 54, 0.14);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font: inherit;
}

.ws-assistant-form input:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.ws-assistant-status {
  margin: 0;
  font-size: 0.75rem;
  color: #3d5560;
}

@media (max-width: 520px) {
  .ws-assistant {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .ws-assistant-panel {
    width: calc(100vw - 1.2rem);
  }
}
