/* Shared theme tokens used by the FrontPage and Community masters. */
:root,
[data-community-theme="day"] {
  --chat-font: Arial, Helvetica, sans-serif;

  --chat-canvas: #071d2c;
  --chat-header: #086d9e;
  --chat-header-text: #ffffff;
  --chat-surface: #ffffff;
  --chat-surface-muted: #eef6fa;
  --chat-input: #f0f7fb;

  --chat-text: #102b43;
  --chat-text-muted: #536d85;
  --chat-link: #00699d;
  --chat-primary: #0878a8;
  --chat-primary-hover: #07658f;
  --chat-primary-text: #ffffff;
  --chat-success: #238647;
  --chat-border: #c9dfed;

  --chat-radius-sm: 8px;
  --chat-radius-card: 14px;
  --chat-radius-shell: 18px;
  --chat-shadow-card: 0 8px 26px rgb(3 31 50 / 12%);
  --chat-shadow-shell: 0 24px 60px rgb(0 12 24 / 28%);

  --chat-space-1: 4px;
  --chat-space-2: 8px;
  --chat-space-3: 12px;
  --chat-space-4: 16px;
  --chat-space-6: 24px;
  --chat-space-8: 32px;
}

[data-community-theme="night"] {
  --chat-canvas: #06172a;
  --chat-header: #075b91;
  --chat-shadow-shell: 0 24px 60px rgb(0 9 24 / 42%);
}

/* Component colours retain the existing light design exactly. Shared semantic
   roles can be overridden for dark mode; preview and nickname colours have
   separate roles because they are content rather than the surrounding UI. */
:root {
  --chat-on-accent: #fff;
  --chat-border-on-image: #fff;
  --chat-preview-canvas: white;
  --chat-preview-selection: red;
  --chat-surface-action-hover: #e9f5fc;
  --chat-focus-outline: #1687b6;
  --chat-surface-danger-hover: #fff0ef;
  --chat-text-danger: #b3261e;
  --chat-surface-soft: #f4f9fc;
  --chat-text-warning-strong: #a32626;
  --chat-text-secondary: #58758a;
  --chat-accent-focus: #087caf;
  --chat-rank-gauge-track: #e1edf5;
  --chat-border-row-subtle: #edf2f6;
  --chat-rank-meter-track: #edf3f7;
  --chat-border-rank-meter: #b8cfdd;
  --chat-accent: #087bac;
  --chat-rank-meter-highlight: #36b9e6;
  --chat-rank-meter-fill: #149fd0;
  --chat-rank-meter-saved: #b7e4f4;
  --chat-text-accent: #07547d;
  --chat-surface-accent-label: #e0f2fb;
  --chat-text-online: #21863b;
  --chat-rating-empty: #a2abb3;
  --chat-rating-selected: #a36e00;
  --chat-surface-focus: #f0f8fc;
  --chat-surface-info: #eef7fc;
  --chat-border-success: #b9ddc3;
  --chat-surface-success: #effaf2;
  --chat-text-success: #226638;
  --chat-nick-female: #800;
  --chat-nick-male: #008;
  --chat-border-field: #d2e4ef;
  --chat-text-description: #567084;
  --chat-surface-notice: #eef6fb;
  --chat-border-result: #d5e5ef;
  --chat-text-online-muted: #21763d;
  --chat-action-active: #0879ad;
  --chat-surface-tab-hover: #eaf4fa;
  --chat-text-tab-hover: #07517b;
  --chat-border-setting-row: #e4edf3;
  --chat-surface-selected: #e5f4fd;
  --chat-surface-visit: #f2f7fb;
  --chat-surface-account-warning: #fff5ed;
  --chat-border-account-warning: #f0d3bd;
  --chat-text-emote-warning: #9c3021;
  --chat-surface-emote-warning: #fff4ee;
  --chat-preview-console-surface: #243647;
  --chat-preview-console-text: #8ac6c6;
  --chat-border-divider: #e0eaf2;
  --chat-text-permission-caption: #526777;
  --chat-text-permission-heading: #18658a;
  --chat-text-disabled: #667582;
  --chat-surface-disabled: #f0f3f5;
  --chat-surface-summary-end: #f7fbfd;
  --chat-shadow-portrait-color: #153b5220;
  --chat-text-rank: #206284;
  --chat-surface-row-alternate: #f8fbfd;
  --chat-text-summary-value: #173f57;
  --chat-border-timeline: #c8e1ef;
  --chat-surface-panel: #f5f9fc;
  --chat-surface-table-heading: #e7f1f7;
  --chat-text-ranking-value: #086f9a;
  --chat-surface-row-hover: #eaf5fb;
  --chat-surface-count: #edf4fb;
  --chat-text-count: #24557a;
  --chat-surface-report-alternate: #f7f9fc;
  --chat-surface-report-details: #f5f9fd;
  --chat-accent-report: #2680b8;
  --chat-border-comment: #d5e2ed;
  --chat-surface-comment: #f4f8fc;
  --chat-border-comment-meta: #dce7f0;
  --chat-text-comment-meta: #47637b;
  --chat-surface-image-placeholder: #f1f4f7;
  --chat-text-ban-meta: #526879;
  --chat-text-event-log: #415b6c;
  --chat-surface-photo-preview: #eef5fa;
  --chat-surface-photo-approved: #e3f3e9;
  --chat-text-photo-approved: #21814c;
  --chat-surface-user-edit: #f3f8fb;
  --chat-surface-forum-heading: #e9f4fb;
  --chat-surface-button-muted: #edf5fa;
  --chat-page-banner-base: #337ab7;
  --chat-page-banner-start: #2476ae;
  --chat-surface-fansite-hover: #e7f3fa;
  --chat-text-chart: #374e60;
  --chat-border-forum: #d7e5ef;
  --chat-border-censor: #e7cdd0;
  --chat-accent-censor: #bf4050;
  --chat-surface-censor: #fff8f8;
  --chat-border-censor-input: #c6cfd6;
  --chat-surface-section-heading: #eef7fb;
  --chat-surface-delete-hover: #ffebed;
  --chat-border-delete-hover: #df9299;
  --chat-focus-danger: #c03945;
  --chat-border-information: #c9e0ef;
  --chat-surface-information: #f5faff;
  --chat-text-backup-error: #b42332;
  --chat-surface-smiley-hover: #dff1fc;
  --chat-focus-information: #1684ba;
  --chat-surface-target: #e3f4ff;
  --chat-border-replacement: #e2edf4;
  --chat-surface-statistics-start: #eef8fd;
  --chat-border-statistics-row: #e5eef4;
  --chat-border-help-example: #dceaf3;
  --chat-surface-help-avatar: #dff1fb;
  --chat-accent-security: #087cad;
  --chat-facebook-button: #4267a9;
  --chat-facebook-button-hover: #34548e;
  --chat-shadow-focus-color: rgba(8, 124, 175, .2);
  --chat-page-banner-stop-strong: rgba(36,118,174,.94);
  --chat-page-banner-stop-muted: rgba(36,118,174,.65);
  --chat-page-banner-stop-clear: rgba(36,118,174,.08);
  --chat-shadow-inset-color: rgba(0,0,0,.12);
  --chat-shadow-banner-text-color: rgba(0,35,65,.3);
  --chat-shadow-chart-color: rgba(28, 64, 89, .05);
  --chat-shadow-message-color: rgba(9,53,78,.05);
}
