/* ========== variables.css：全局设计令牌（Calm Medical Premium） ========== */
:root {
  /* ---- 品牌主色（医疗专业青绿） ---- */
  --color-primary: #0d9488;          /* teal-600 */
  --color-primary-dark: #0f766e;     /* teal-700 */
  --color-primary-darker: #115e59;   /* teal-800 */
  --color-primary-light: #14b8a6;    /* teal-500 */
  --color-primary-soft: #ccfbf1;     /* teal-100 */
  --color-primary-bg: #f0fdfa;       /* teal-50 */

  /* ---- 强调色（行动/紧急） ---- */
  --color-accent: #f97316;           /* orange-500 */
  --color-accent-dark: #ea580c;      /* orange-600 */

  /* ---- 语义色 ---- */
  --color-success: #10b981;          /* emerald-500 */
  --color-success-bg: #ecfdf5;
  --color-warning: #f59e0b;          /* amber-500 */
  --color-warning-bg: #fffbeb;
  --color-danger: #ef4444;           /* red-500 */
  --color-danger-dark: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-info: #0ea5e9;             /* sky-500 */
  --color-info-bg: #f0f9ff;

  /* ---- 中性色（板岩灰阶） ---- */
  --color-text: #0f172a;             /* slate-900 */
  --color-text-secondary: #475569;   /* slate-600 */
  --color-text-tertiary: #94a3b8;    /* slate-400 */
  --color-text-inverse: #ffffff;
  --color-text-on-primary: #ffffff;

  --color-bg: #f1f5f9;               /* slate-100，应用背景 */
  --color-bg-soft: #f8fafc;          /* slate-50 */
  --color-surface: #ffffff;          /* 卡片表面 */
  --color-surface-alt: #f8fafc;
  --color-overlay: rgba(15, 23, 42, 0.55);

  --color-border: #e2e8f0;           /* slate-200 */
  --color-border-strong: #cbd5e1;    /* slate-300 */
  --color-border-focus: #14b8a6;

  /* ---- 意图标签配色（结构化回复业务标签） ---- */
  --tag-intent-bg: #ccfbf1;
  --tag-intent-fg: #115e59;
  --tag-confidence-bg: #fef3c7;
  --tag-confidence-fg: #92400e;
  --tag-scene-bg: #e0e7ff;
  --tag-scene-fg: #3730a3;
  --tag-action-bg: #dbeafe;
  --tag-action-fg: #1e40af;
  --tag-transfer-bg: #fee2e2;
  --tag-transfer-fg: #991b1b;

  /* ---- 字体 ---- */
  --font-family-base: 'Noto Sans SC', 'PingFang SC', 'HarmonyOS Sans SC',
    'Microsoft YaHei', 'Hiragino Sans GB', 'Source Han Sans CN', sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code',
    'Consolas', monospace;

  /* 自助机大字号体系（触摸屏可读性优先） */
  --font-size-xs: 14px;
  --font-size-sm: 16px;
  --font-size-base: 18px;            /* 基准字号大于常规 Web */
  --font-size-md: 20px;
  --font-size-lg: 24px;
  --font-size-xl: 30px;
  --font-size-2xl: 40px;
  --font-size-3xl: 56px;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.2;
  --line-height-base: 1.55;
  --line-height-loose: 1.8;

  /* ---- 间距（8px 栅格） ---- */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  --spacing-4xl: 80px;

  /* ---- 圆角 ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* ---- 阴影 ---- */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.18);
  --shadow-primary: 0 8px 24px rgba(13, 148, 136, 0.28);
  --shadow-accent: 0 8px 24px rgba(249, 115, 22, 0.32);

  /* ---- 触摸目标尺寸（自助机触屏规范） ---- */
  --touch-min: 56px;
  --touch-comfort: 64px;
  --touch-large: 80px;

  /* ---- 动效 ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.15s;
  --duration-base: 0.25s;
  --duration-slow: 0.4s;

  /* ---- 布局 ---- */
  --app-max-width: 1280px;
  --chat-bubble-max: 75%;
  --header-height: 88px;
  --input-area-height: 132px;
}

/* 自助机横屏 1920×1080 优化 */
@media (min-width: 1600px) {
  :root {
    --font-size-base: 20px;
    --font-size-md: 22px;
    --font-size-lg: 26px;
  }
}

/* 竖屏自助机 / 手机端 */
@media (orientation: portrait) and (max-width: 768px) {
  :root {
    /* 手机端字号体系（避免自助机大字号在手机上拥挤） */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 15px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --chat-bubble-max: 85%;
    --header-height: 56px;
    --input-area-height: 116px;
  }
}

/* 尊重用户动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
