-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.css
More file actions
134 lines (115 loc) · 4.58 KB
/
popup.css
File metadata and controls
134 lines (115 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
:root {
--primary: #3347d6;
--primary-hover: #2637b8;
--bg: #f7f8fb;
--surface: #ffffff;
--text: #1f2937;
--muted: #6b7280;
--border: #dbe1ea;
--success: #0f9d58;
--warning: #b45309;
--danger: #b91c1c;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0f172a;
--surface: #111b2f;
--text: #f8fafc;
--muted: #a6b3c3;
--border: #334155;
}
}
* { box-sizing: border-box; }
body {
margin: 0;
width: 340px;
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: var(--bg);
color: var(--text);
font-size: 13px;
}
.app-container { min-height: 500px; display: flex; flex-direction: column; }
header { background: var(--surface); padding: 10px 12px 0; border-bottom: 1px solid var(--border); }
.header-top { display: flex; align-items: center; justify-content: space-between; }
.logo-area h1 { margin: 0; color: var(--primary); font-size: 1rem; }
.subtitle { margin: 2px 0 8px; color: var(--muted); font-size: .75rem; }
.icon-btn-sm,
.icon-btn,
.tool-btn,
.text-btn,
.tab-btn,
.primary-btn,
.rate-btn,
.close-rate-btn { cursor: pointer; }
.icon-btn-sm,
.icon-btn,
.tool-btn { border: 1px solid transparent; background: transparent; color: var(--muted); }
.icon-btn-sm:hover,
.icon-btn:hover,
.tool-btn:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.tabs { display: flex; gap: 8px; }
.tab-btn {
border: 0;
border-bottom: 2px solid transparent;
background: transparent;
color: var(--muted);
padding: 8px 10px;
font-weight: 600;
}
.tab-btn.active { color: var(--primary); border-color: var(--primary); }
.review-banner { background: var(--primary); color: #fff; padding: 8px 10px; }
.review-banner p { margin: 0 0 6px; font-size: .82rem; }
.review-actions { display: flex; gap: 8px; }
.rate-btn,.close-rate-btn { border-radius: 6px; padding: 4px 8px; font-size: .8rem; }
.rate-btn { border: 0; background: #fff; color: var(--primary); font-weight: 700; }
.close-rate-btn { border: 1px solid #fff; background: transparent; color: #fff; }
main.view { display: none; padding: 10px; gap: 10px; flex-direction: column; }
main.view.active { display: flex; }
.language-selector,
.textarea-container,
.history-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.language-selector { display: flex; gap: 8px; align-items: center; padding: 4px; }
.select-group { flex: 1; }
select,textarea { width: 100%; background: transparent; color: var(--text); border: 0; outline: none; font-family: inherit; }
select { padding: 6px; }
textarea { resize: vertical; min-height: 76px; max-height: 140px; margin-bottom: 24px; }
.textarea-container { padding: 8px; position: relative; }
.tools { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; align-items: center; }
.voice-select { max-width: 106px; border: 1px solid var(--border); border-radius: 6px; font-size: .78rem; padding: 3px 6px; background: var(--surface); }
.primary-btn {
width: 100%;
border: 0;
background: var(--primary);
color: #fff;
border-radius: 10px;
padding: 11px;
font-weight: 700;
}
.primary-btn:hover { background: var(--primary-hover); }
.primary-btn:disabled { opacity: .65; cursor: not-allowed; }
.status-message { margin: 0; min-height: 18px; color: var(--muted); font-size: .82rem; }
.status-message.success { color: var(--success); }
.status-message.error { color: var(--danger); }
.status-message.info { color: var(--warning); }
.privacy-hint { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.history-header { display: flex; justify-content: space-between; align-items: center; }
.history-header h2 { margin: 0; font-size: .95rem; }
.text-btn { border: 0; background: transparent; color: var(--danger); font-size: .82rem; }
.history-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 390px; overflow: auto; }
.history-item { padding: 8px; }
.history-item button { border: 0; background: transparent; color: inherit; width: 100%; text-align: left; padding: 0; }
.history-lang { font-size: .73rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.history-original,.history-translated { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-translated { color: var(--muted); }
.empty-state { color: var(--muted); font-style: italic; }
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }