/* widgets.css — gs2 restyle of the Analyst chat and Notes widgets (footer.php).
   Loaded after their own stylesheets; only colours, type and shape change, never behaviour. */

/* ── Ask the Analyst ── */
#gsAnalystWidget { font-family: var(--font-sans); }
#gsAnalystWidget .gsw-window { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); color: var(--ink); }
#gsAnalystWidget .gsw-header { background: var(--surface); color: var(--ink); border-bottom: 3px double var(--rule-strong); padding: 10px 10px 10px 16px; }
#gsAnalystWidget .gsw-title { font: 700 12px/1.2 var(--font-sans); letter-spacing: .1em; color: var(--ink); }
#gsAnalystWidget .gsw-clear, #gsAnalystWidget .gsw-icon-btn { color: var(--ink-2); opacity: 1; min-width: 36px; min-height: 36px; border-radius: var(--radius); font-family: var(--font-sans); }
#gsAnalystWidget .gsw-clear { padding: 0 10px; font-size: 11px; }
#gsAnalystWidget .gsw-clear:hover, #gsAnalystWidget .gsw-icon-btn:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
#gsAnalystWidget .gsw-body { background: var(--bg); }
#gsAnalystWidget .gsw-msg { font: 400 14px/1.6 var(--font-sans); }
#gsAnalystWidget .gsw-msg--user { background: var(--surface-2); color: var(--ink); }
#gsAnalystWidget .gsw-msg--bot { background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-left: 3px solid var(--accent); }
#gsAnalystWidget .gsw-msg strong { color: var(--ink); }
#gsAnalystWidget .gsw-msg a { color: var(--link); }
#gsAnalystWidget .gsw-cite { background: var(--ink); color: var(--on-ink) !important; }
#gsAnalystWidget .gsw-cite:hover { background: var(--accent); }
#gsAnalystWidget .gsw-footer { background: var(--surface); border-top: 1px solid var(--rule); }
#gsAnalystWidget .gsw-input { background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); min-height: 44px; font: 400 15px/1.3 var(--font-sans); }
#gsAnalystWidget .gsw-input::placeholder { color: var(--muted); }
#gsAnalystWidget .gsw-input:focus { border-color: var(--focus); }
#gsAnalystWidget .gsw-send { background: var(--ink); color: var(--on-ink); border-radius: var(--radius); min-height: 44px; font: 700 12px/1 var(--font-sans); letter-spacing: .06em; }
#gsAnalystWidget .gsw-send:hover { background: var(--ink-2); }
#gsAnalystWidget .gsw-save-note-btn { border-color: var(--rule); color: var(--muted); font-family: var(--font-sans); font-size: 10px; min-height: 28px; }
#gsAnalystWidget .gsw-save-note-btn:hover { color: var(--ink); border-color: var(--ink-2); background: var(--hover); }
#gsAnalystWidget .gsw-save-note-btn.saved { color: var(--pos); border-color: var(--pos); background: var(--pos-bg); }
#gsAnalystWidget .gsw-context-banner { background: var(--pos-bg); border-bottom: 1px solid var(--rule); color: var(--pos); font-family: var(--font-sans); font-size: 12px; letter-spacing: 0; }
#gsAnalystWidget .gsw-paywall-card { background: var(--surface); border: 1px solid var(--rule); box-shadow: none; }
#gsAnalystWidget .gsw-paywall-card svg { fill: var(--accent); }
#gsAnalystWidget .gsw-paywall-title { font-family: var(--font-serif); color: var(--ink); font-weight: 700; }
#gsAnalystWidget .gsw-paywall-text { color: var(--ink-2); }
#gsAnalystWidget .gsw-paywall-btn { background: var(--ink); color: var(--on-ink); font-family: var(--font-sans); border-radius: var(--radius); min-height: 44px; display: inline-flex; align-items: center; }
#gsAnalystWidget .gsw-paywall-btn:hover { color: var(--on-ink); }
#gsAnalystWidget .gsw-overlay { background: var(--overlay); }

/* ── Notes ── */
#note-widget-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); color: var(--ink); font-family: var(--font-sans); z-index: 2400; }
#note-widget-panel .widget-header { background: var(--surface); border-bottom: 3px double var(--rule-strong); }
#note-widget-panel .widget-header h3 { color: var(--ink) !important; font-family: var(--font-serif); font-size: 1.25rem; }
#note-widget-close { color: var(--ink-2) !important; min-width: 44px; min-height: 44px; border-radius: var(--radius); }
#note-widget-close:hover { color: var(--ink) !important; background: var(--hover) !important; }
#note-widget-panel .widget-list-actions { border-bottom: 1px solid var(--rule); }
#note-widget-new-btn, #note-widget-back-btn, #note-widget-save-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  background: var(--ink); color: var(--on-ink); border-radius: var(--radius); font: 600 14px/1 var(--font-sans);
}
#note-widget-new-btn:hover, #note-widget-back-btn:hover, #note-widget-save-btn:hover { background: var(--ink-2); }
#note-widget-back-btn svg { transform: rotate(180deg); }
#note-widget-save-btn.local { background: var(--ink); }
#note-widget-all-btn { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--rule); border-radius: var(--radius); min-width: 40px; min-height: 40px; }
#note-widget-all-btn:hover { background: var(--hover); color: var(--ink); }
#note-widget-delete-btn { color: var(--neg); min-width: 40px; min-height: 40px; border-radius: var(--radius); }
#note-widget-delete-btn:hover { background: var(--neg-bg); }
#note-widget-panel .widget-list-header-info { background: var(--surface-2); color: var(--ink-2); border-bottom: 1px solid var(--rule); }
#note-widget-panel .widget-list-header-info a { color: var(--link); }
#note-widget-panel .widget-loading, #note-widget-panel .widget-no-drafts { color: var(--muted); }
#note-widget-panel .widget-draft-item { background: transparent; border: 1px solid transparent; color: var(--ink); }
#note-widget-panel .widget-draft-item:hover { background: var(--hover); border-color: var(--rule); }
#note-widget-panel .widget-draft-item h4 { color: var(--ink); font-family: var(--font-serif); font-size: 1rem; }
#note-widget-panel .widget-draft-item p { color: var(--muted); }
#note-widget-title-input, #note-widget-content-input { background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); font-family: var(--font-sans); width: 100%; box-sizing: border-box; }
#note-widget-title-input::placeholder, #note-widget-content-input::placeholder { color: var(--muted); }
#note-widget-title-input:focus, #note-widget-content-input:focus { outline: none; border-color: var(--focus); }
@media (max-width: 899px) {
  #note-widget-panel { bottom: calc(70px + env(safe-area-inset-bottom)); max-height: calc(100vh - 140px); }
}
