/* 科创智析 v1.2 · 个人知识库与语音学习交互 */

.knowledge-cloud-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  margin: -5px 0 16px;
  padding: 13px 17px;
  border: 1px solid rgba(176, 138, 74, .26);
  border-radius: 15px 15px 15px 4px;
  background:
    radial-gradient(circle at 84% 0, rgba(176, 138, 74, .13), transparent 32%),
    linear-gradient(118deg, rgba(255, 253, 247, .96), rgba(245, 239, 224, .9));
  box-shadow: 0 12px 30px rgba(62, 50, 31, .06);
}

.knowledge-cloud-strip::after {
  position: absolute;
  right: 18%;
  bottom: -25px;
  content: "典  ·  证  ·  算";
  color: rgba(140, 47, 57, .055);
  font: 700 44px var(--serif);
  letter-spacing: 9px;
  pointer-events: none;
}

.knowledge-cloud-strip > div {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.knowledge-cloud-strip > div:first-child > i {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(140, 47, 57, .18);
  border-radius: 50%;
  background: #9d7c47;
  box-shadow: 0 0 0 5px rgba(176, 138, 74, .1);
}

.knowledge-cloud-strip.ready > div:first-child > i {
  background: var(--jade);
  box-shadow: 0 0 0 5px rgba(69, 107, 90, .12), 0 0 18px rgba(69, 107, 90, .32);
}

.knowledge-cloud-strip strong {
  color: var(--ink-deep);
  font: 700 13px var(--serif);
  white-space: nowrap;
}

.knowledge-cloud-strip span,
.knowledge-cloud-strip b {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-cloud-meta {
  justify-content: flex-end;
}

.knowledge-cloud-meta > span {
  color: var(--jade-dark);
}

.evidence-switch {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 13px;
  padding: 11px 12px;
  border: 1px solid rgba(69, 107, 90, .19);
  border-radius: 12px 12px 12px 4px;
  background: linear-gradient(135deg, rgba(227, 235, 229, .72), rgba(255, 253, 248, .84));
  cursor: pointer;
}

.evidence-switch input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--jade);
}

.evidence-switch span {
  display: grid;
  gap: 3px;
}

.evidence-switch b {
  color: var(--jade-dark);
  font-size: 10px;
}

.evidence-switch small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.deep-source-note {
  margin: 10px 0;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
  color: #7a6d57;
  font-size: 8px;
  line-height: 1.55;
}

.knowledge-entry > div:first-child {
  justify-content: flex-start;
}

.knowledge-entry > div:first-child h3 {
  margin-right: auto;
}

.knowledge-entry .cloud-file-status {
  padding: 4px 7px;
  border: 1px solid rgba(176, 138, 74, .24);
  border-radius: 999px;
  color: #87682f;
  background: rgba(239, 227, 198, .58);
  font-size: 7px;
  font-style: normal;
  white-space: nowrap;
}

.knowledge-entry .cloud-file-status.vectored {
  border-color: rgba(69, 107, 90, .24);
  color: var(--jade-dark);
  background: var(--jade-soft);
}

.knowledge-entry .cloud-file-status.failed {
  color: var(--cinnabar-dark);
  background: var(--cinnabar-soft);
}

.voice-composer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px 4px;
  border-top: 1px dashed rgba(178, 139, 70, .25);
}

.voice-composer-row > small {
  overflow: hidden;
  margin-left: auto;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(69, 107, 90, .24);
  border-radius: 999px;
  color: var(--jade-dark);
  background: rgba(255, 253, 248, .88);
  font-size: 9px;
  font-weight: 700;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.voice-button:hover:not(:disabled) {
  border-color: rgba(69, 107, 90, .52);
  background: var(--jade-soft);
  box-shadow: 0 8px 18px rgba(47, 81, 67, .11);
  transform: translateY(-1px);
}

.voice-button > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 4px rgba(69, 107, 90, .1);
}

.voice-button.recording {
  border-color: rgba(162, 59, 50, .42);
  color: var(--cinnabar-dark);
  background: var(--cinnabar-soft);
}

.voice-button.recording > i {
  background: var(--cinnabar);
  animation: recordingPulse 1.1s ease-in-out infinite;
}

.voice-button.processing > i {
  background: var(--gold);
  animation: recordingPulse .72s ease-in-out infinite;
}

@keyframes recordingPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(162, 59, 50, .1); transform: scale(.88); }
  50% { box-shadow: 0 0 0 8px rgba(162, 59, 50, .02); transform: scale(1.12); }
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.message-meta > small {
  margin: 0 !important;
}

.speak-message-button {
  padding: 4px 8px;
  border: 1px solid rgba(176, 138, 74, .22);
  border-radius: 999px;
  color: #7d6234;
  background: rgba(255, 251, 240, .76);
  font-size: 7px;
}

.speak-message-button:hover {
  border-color: rgba(140, 47, 57, .28);
  color: var(--cinnabar-dark);
  background: var(--cinnabar-soft);
}

@media (max-width: 900px) {
  .knowledge-cloud-strip,
  .knowledge-cloud-strip > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .knowledge-cloud-meta {
    width: 100%;
    flex-direction: row !important;
    flex-wrap: wrap;
  }

  .voice-composer-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .voice-composer-row > small {
    width: 100%;
    margin-left: 0;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voice-button.recording > i,
  .voice-button.processing > i {
    animation: none;
  }
}
