/* ════════════════════════════════════════════════════════════ sidebar.css — styles for the extension sidebar ════════════════════════════════════════════════════════════ */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { --bg: #0f1117; --bg-card: #1a1d2e; --bg-input: #12141f; --border: #2a2d3e; --accent: #6366f1; --accent-d: #4f46e5; --text: #e2e8f0; --muted: #94a3b8; --dim: #64748b; } html, body { height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; overflow: hidden; } .sidebar { display: flex; flex-direction: column; height: 100vh; } /* ── Header ── */ .sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; background: var(--bg-card); border-bottom: 1px solid var(--border); } .brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; } .brand-icon { font-size: 1.2rem; } .icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: .25rem .5rem; border-radius: 6px; transition: background .15s; } .icon-btn:hover { background: rgba(255,255,255,.08); color: var(--text); } /* ── Product info ── */ .product-info { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--bg-input); border-bottom: 1px solid var(--border); font-size: .82rem; } .status-indicator { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; flex-shrink: 0; } .status-text { color: var(--muted); } .status-text strong { color: var(--text); } /* ── Ask box ── */ .ask-box { padding: .9rem 1rem .5rem; display: flex; gap: .5rem; } #questionInput { flex: 1; min-height: 38px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; padding: .55rem .75rem; color: var(--text); font-family: inherit; font-size: .9rem; resize: none; outline: none; } #questionInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.2); } #questionInput::placeholder { color: var(--dim); } .primary-btn { background: var(--accent); color: #fff; border: none; padding: 0 1rem; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background .15s; white-space: nowrap; } .primary-btn:hover:not(:disabled) { background: var(--accent-d); } .primary-btn:disabled { opacity: .4; cursor: not-allowed; } /* ── Quick prompts ── */ .quick-prompts { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 1rem .75rem; } .chip { background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--muted); padding: .3rem .65rem; border-radius: 99px; font-size: .78rem; cursor: pointer; transition: all .15s; } .chip:hover { background: rgba(255,255,255,.12); color: var(--text); } /* ── Answer area ── */ .answer-container { flex: 1; overflow-y: auto; padding: .5rem 1rem 1rem; display: flex; flex-direction: column; gap: .75rem; } .answer-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: .85rem; } .qa-question { font-weight: 600; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); } .qa-answer { font-size: .92rem; line-height: 1.5; margin-bottom: .5rem; } .badge-row { display: flex; flex-wrap: wrap; gap: .3rem; } .badge { display: inline-block; padding: .15rem .55rem; border-radius: 99px; font-size: .7rem; font-weight: 600; } .badge-high { background: rgba(34,197,94,.15); color: #22c55e; } .badge-medium { background: rgba(245,158,11,.15); color: #f59e0b; } .badge-low { background: rgba(239,68,68,.15); color: #ef4444; } .badge-source { background: rgba(99,102,241,.15); color: #a5b4fc; } /* ── Sentiment ── */ .sentiment-block { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--border); } .sentiment-stars { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; color: #f59e0b; } .sentiment-num { font-size: .85rem; color: var(--text); } .sentiment-summary { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; } .aspects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .5rem; } .aspect-pill { background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; padding: .4rem .5rem; } .aspect-name { font-size: .78rem; font-weight: 600; margin-bottom: .25rem; } .aspect-bar { display: flex; gap: 1px; height: 4px; border-radius: 2px; overflow: hidden; margin-bottom: .25rem; } .aspect-dom { font-size: .7rem; font-weight: 600; } /* ── Loading / error ── */ .loading-row { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; } .spinner-sm { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .error-box { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; padding: .6rem .8rem; border-radius: 8px; font-size: .85rem; } /* ── Meta ── */ .meta-line { font-size: .72rem; color: var(--dim); margin-top: .5rem; } /* ── Footer ── */ .sidebar-footer { display: flex; align-items: center; gap: .4rem; padding: .5rem 1rem; background: var(--bg-card); border-top: 1px solid var(--border); font-size: .72rem; } .backend-indicator { color: #f59e0b; font-size: 1rem; line-height: 1; } .backend-url { color: var(--dim); } /* ── Scrollbar ── */ .answer-container::-webkit-scrollbar { width: 6px; } .answer-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; } .answer-container::-webkit-scrollbar-track { background: transparent; } /* ── Tabs ── */ .tab-bar { display: flex; background: var(--bg-card); border-bottom: 1px solid var(--border); } .tab-btn { flex: 1; padding: .7rem; background: none; border: none; color: var(--muted); cursor: pointer; font-size: .85rem; font-weight: 600; border-bottom: 2px solid transparent; transition: all .15s; } .tab-btn:hover { color: var(--text); } .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); } .tab-pane { display: none; flex: 1; flex-direction: column; overflow: hidden; } .tab-pane.active{ display: flex; } .badge-count { display: inline-block; background: var(--accent); color: #fff; font-size: .7rem; padding: 0 .35rem; border-radius: 99px; min-width: 18px; text-align: center; margin-left: .25rem; } /* ── Save button ── */ .save-btn { margin: 0 1rem .75rem; padding: .5rem; background: rgba(99,102,241,.12); border: 1px dashed var(--accent); color: #a5b4fc; border-radius: 8px; font-size: .82rem; cursor: pointer; font-weight: 600; transition: all .15s; } .save-btn:hover:not(:disabled) { background: rgba(99,102,241,.2); } .save-btn:disabled { opacity: .5; cursor: not-allowed; } /* ── Saved list ── */ .saved-list-header { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem .35rem; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; } .link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: .75rem; text-decoration: underline; } .saved-list { padding: 0 1rem .5rem; max-height: 200px; overflow-y: auto; } .saved-item { display: flex; align-items: center; gap: .5rem; padding: .55rem .65rem; margin-bottom: .35rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; } .saved-info { flex: 1; min-width: 0; } .saved-name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .saved-site { font-size: .7rem; color: var(--dim); } .empty-msg { text-align: center; padding: 1rem .5rem; color: var(--dim); font-size: .82rem; line-height: 1.4; } /* ── Compare ask box ── */ .compare-ask-box { padding: .75rem 1rem; display: flex; gap: .5rem; } .compare-ask-box textarea { flex: 1; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .7rem; color: var(--text); font-family: inherit; font-size: .88rem; resize: none; outline: none; } .compare-ask-box textarea:focus { border-color: var(--accent); } /* ── Compare results ── */ .winner-banner { background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(79,70,229,.08)); border: 1px solid rgba(99,102,241,.3); padding: .65rem .8rem; border-radius: 8px; font-size: .85rem; margin-bottom: .5rem; } .compare-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: .7rem .8rem; margin-bottom: .5rem; } .compare-card.winner { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); } .compare-card-header { display: flex; align-items: center; gap: .4rem; margin-bottom: .5rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); } .compare-num { font-size: .72rem; color: var(--dim); font-weight: 700; } .compare-name { flex: 1; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .winner-pill { font-size: .85rem; } .compare-answer { font-size: .85rem; line-height: 1.45; margin-bottom: .4rem; } .compare-sentiment { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; font-size: .8rem; } .sentiment-stars-sm { color: #f59e0b; }