<template>
  <aside class="panel-left" aria-label="助手上下文">
    <div class="panel-left-header">
      <div class="avatar">
        <svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg">
          <rect x="2" y="2" width="76" height="76" rx="20" fill="#2b1f99" />
          <rect x="33" y="18" width="14" height="44" rx="6" fill="#ffffff" />
          <rect x="18" y="33" width="44" height="14" rx="6" fill="#ffffff" />
          <circle cx="47" cy="26" r="4" fill="#3ad4d8" />
        </svg>
      </div>
      <span class="assistant-name">空海医院医疗助手</span>
      <span class="assistant-tagline">说出需求，我来判断下一步</span>
    </div>

    <div class="separator" />

    <div class="example-section">
      <span class="example-label">你可以这样说</span>
      <div class="example-phrase">我头疼三天，还有点恶心，想挂号</div>
      <div class="example-phrase">明天上午有神经内科的号吗</div>
      <div class="example-phrase">我想找李明医生</div>
    </div>

    <div class="separator" />

    <div class="cap-section">
      <span class="cap-label">我能帮您</span>
      <div class="cap-tag-grid">
        <span class="cap-tag">挂号预约</span>
        <span class="cap-tag">科室导诊</span>
        <span class="cap-tag">医生查询</span>
        <span class="cap-tag">查报告</span>
        <span class="cap-tag">门诊缴费</span>
      </div>
    </div>

    <div class="demo-hint-box">
      <span class="demo-hint-label">联调演示环境</span>
      <span class="demo-hint-text">当前为联调演示环境，支付与 HIS 数据均为 Mock。语音及后端接口暂未接入。</span>
    </div>
  </aside>
</template>

<style scoped>
.panel-left {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  gap: 24px;
  overflow-y: auto;
}

.panel-left-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.assistant-name {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.assistant-tagline {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.separator {
  height: 0;
  border-top: 1px solid var(--border);
  margin: 0 -4px;
}

.example-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.example-label {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.example-phrase {
  padding: 9px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.example-phrase:hover {
  border-color: var(--border);
  color: var(--fg);
}

.cap-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cap-label {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.cap-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cap-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklch, var(--accent) 15%, transparent);
  white-space: nowrap;
}

.demo-hint-box {
  margin-top: auto;
  padding: 12px 14px;
  background: var(--warn-bg);
  border: 1px solid color-mix(in oklch, var(--warn) 20%, transparent);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-hint-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warn-text);
}

.demo-hint-text {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.4;
}
</style>
