/* Suggestion Overlay — 입력 인텔리전스 ghost text * * 팝업 스타일은 injectPopupTheme() 의 CSS 변수(--d3-*)로 테마를 따라간다. * 토큰이 주입되지 않는 상황(개발 초기 로드)을 위해 :root 폴백을 둔다. * * 구조: [후보 3개 — 고정 높이] / 가는 선 / [진행률 · 출처] / [키 안내] * 창 높이(WindowManager SUGGESTION_OVERLAY_HEIGHT)는 이 고정 치수에서 나온다. */ :root { --d3-bg-result: #111a30; --d3-border-result: rgba(148, 180, 255, 0.12); --d3-text-result: #eef2fb; --d3-text-secondary: #93a4c8; --d3-accent-main: #3b82f6; --d3-accent-dim: rgba(59, 130, 246, 0.14); --d3-shadow-popup: 0 8px 32px rgba(3, 7, 18, 0.5); } * { margin: 0; padding: 0; box-sizing: border-box; } [hidden] { display: none !important; } html, body { background: transparent; overflow: hidden; user-select: none; -webkit-app-region: no-drag; font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; } #root { width: 100%; height: 100%; padding: 4px; } .suggestion-panel { position: relative; display: flex; flex-direction: column; padding: 6px; border-radius: 10px; background: var(--d3-bg-result); border: 1px solid var(--d3-border-result); box-shadow: var(--d3-shadow-popup); opacity: 0; transform: translateY(-2px); transition: opacity 90ms ease-out, transform 90ms ease-out; } .suggestion-panel.visible { opacity: 1; transform: translateY(0); } /* ── 닫기 — 구석에 떠 있는 작은 버튼 (빈 헤더 줄을 두지 않는다) ── */ .close { position: absolute; top: 6px; right: 6px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 0; border-radius: 5px; background: transparent; color: var(--d3-text-secondary); cursor: pointer; opacity: 0.7; transition: background 90ms ease-out, color 90ms ease-out, opacity 90ms ease-out; } .close:hover { background: var(--d3-accent-dim); color: var(--d3-text-result); opacity: 1; } /* ── 상태 (후보가 아직 없을 때만: 준비 중 / 생성 중) ── */ .status { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 28px 0 8px; } .spinner { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--d3-accent-dim); border-top-color: var(--d3-accent-main); animation: d3-spin 720ms linear infinite; } @keyframes d3-spin { to { transform: rotate(360deg); } } .status-text { color: var(--d3-text-secondary); font-size: 12px; } /* ── 후보 (한 페이지 = 3개, 각 최대 2줄, 고정 높이라 채워져도 창이 흔들리지 않는다) ── */ .candidates { display: flex; flex-direction: column; gap: 2px; } .candidates:empty { display: none; } .suggestion-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 44px; padding: 0 28px 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--d3-text-result); font: inherit; text-align: left; cursor: pointer; transition: background 90ms ease-out; } .suggestion-item:hover { background: var(--d3-accent-dim); } .suggestion-item.active { background: var(--d3-accent-dim); box-shadow: inset 2px 0 0 var(--d3-accent-main); } .suggestion-num { flex: 0 0 16px; color: var(--d3-text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; } .suggestion-item.active .suggestion-num { color: var(--d3-accent-main); font-weight: 600; } .suggestion-text { display: -webkit-box; flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: 13px; font-weight: 400; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .suggestion-item.active .suggestion-text { font-weight: 500; } /* 첫 후보가 스트리밍으로 도착하는 중 — 도착한 만큼 보여주고 커서를 붙인다 */ .suggestion-item.streaming { cursor: default; opacity: 0.85; } .suggestion-item.streaming .suggestion-text::after { content: '\258C'; animation: d3-caret-blink 1s steps(1) infinite; color: var(--d3-accent-main); } @keyframes d3-caret-blink { 50% { opacity: 0; } } /* ── 아래쪽: 진행률·출처 한 줄 + 키 안내 한 줄 ── */ .footer { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; padding: 6px 8px 2px; border-top: 1px solid var(--d3-border-result); color: var(--d3-text-secondary); font-size: 10.5px; line-height: 14px; } .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; white-space: nowrap; } .progress { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; } .progress-more { display: inline-flex; align-items: center; gap: 5px; } .progress-more .spinner { width: 8px; height: 8px; border-width: 1.5px; } .provenance { overflow: hidden; text-overflow: ellipsis; opacity: 0.8; } .key-hints { display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; } .key-hint { display: inline-flex; align-items: center; gap: 4px; } .key-hint.shared { gap: 3px; } .key-hint.close-hint { margin-left: auto; } kbd { display: inline-flex; align-items: center; height: 16px; padding: 0 4px; border: 1px solid var(--d3-border-result); border-bottom-width: 2px; border-radius: 4px; color: var(--d3-text-result); font-family: inherit; font-size: 10px; line-height: 1; }