Savyasaachin commited on
Commit
14181cd
·
verified ·
1 Parent(s): ca78225

Please remove anything that is blue and use these colours for the UI

Browse files

--cream-100: #fffdf9; /* almost white */
--cream-200: #fdf6e9; /* vanilla icing */
--cream-300: #faedd2; /* rich custard */
--cream-400: #f6e3bb; /* crème brûlée */
--brown-600: #7c5836; /* caramel text / accents */
--brown-700: #5e4229; /* hover */
#c7a24d /* buttons */

components/doc-uploader.js CHANGED
@@ -13,10 +13,9 @@ class DocUploader extends HTMLElement {
13
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
14
 
15
  * { box-sizing: border-box; font-family: 'Inter', sans-serif; }
16
-
17
  .card {
18
- background: white;
19
- border: 1px solid #e2e8f0;
20
  border-radius: 0.75rem;
21
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
22
  padding: 1.5rem;
@@ -32,22 +31,21 @@ class DocUploader extends HTMLElement {
32
  .header h3 {
33
  font-size: 1.125rem;
34
  font-weight: 600;
35
- color: #1e293b;
36
  }
37
-
38
  .drop-zone {
39
- border: 2px dashed #cbd5e1;
40
  border-radius: 0.5rem;
41
  padding: 2rem;
42
  text-align: center;
43
  cursor: pointer;
44
  transition: all 0.2s ease;
45
- background: #f8fafc;
46
  }
47
 
48
  .drop-zone:hover, .drop-zone.drag-active {
49
- border-color: #3b82f6;
50
- background: #eff6ff;
51
  }
52
 
53
  .drop-zone-content {
@@ -55,22 +53,20 @@ class DocUploader extends HTMLElement {
55
  flex-direction: column;
56
  align-items: center;
57
  gap: 0.5rem;
58
- color: #64748b;
59
  }
60
 
61
  .drop-zone-content svg {
62
- color: #94a3b8;
63
  }
64
-
65
  .file-info {
66
  display: none; /* Hidden by default */
67
  margin-top: 1rem;
68
  padding: 1rem;
69
- background: #f1f5f9;
70
  border-radius: 0.5rem;
71
  }
72
-
73
- .file-info.active {
74
  display: flex;
75
  align-items: center;
76
  justify-content: space-between;
@@ -81,23 +77,21 @@ class DocUploader extends HTMLElement {
81
  align-items: center;
82
  gap: 0.75rem;
83
  }
84
-
85
  .file-icon {
86
- color: #3b82f6;
87
  }
88
 
89
  .file-text h4 {
90
  font-size: 0.875rem;
91
  font-weight: 600;
92
- color: #0f172a;
93
  }
94
 
95
  .file-text p {
96
  font-size: 0.75rem;
97
- color: #64748b;
98
  }
99
-
100
- .btn-remove {
101
  color: #ef4444;
102
  background: white;
103
  border: 1px solid #fee2e2;
@@ -110,11 +104,10 @@ class DocUploader extends HTMLElement {
110
  .btn-remove:hover {
111
  background: #fef2f2;
112
  }
113
-
114
  .progress-container {
115
  margin-top: 0.75rem;
116
  height: 0.5rem;
117
- background: #e2e8f0;
118
  border-radius: 9999px;
119
  overflow: hidden;
120
  display: none;
@@ -122,12 +115,11 @@ class DocUploader extends HTMLElement {
122
 
123
  .progress-bar {
124
  height: 100%;
125
- background: #3b82f6;
126
  width: 0%;
127
  transition: width 0.3s ease;
128
  }
129
-
130
- .download-area {
131
  margin-top: 1rem;
132
  display: none;
133
  text-align: right;
@@ -136,12 +128,11 @@ class DocUploader extends HTMLElement {
136
  .download-area.active {
137
  display: block;
138
  }
139
-
140
  .btn-download {
141
  display: inline-flex;
142
  align-items: center;
143
  gap: 0.5rem;
144
- background: #10b981;
145
  color: white;
146
  padding: 0.5rem 1rem;
147
  border-radius: 0.375rem;
@@ -153,10 +144,9 @@ class DocUploader extends HTMLElement {
153
  }
154
 
155
  .btn-download:hover {
156
- background: #059669;
157
  }
158
-
159
- </style>
160
  <div class="card">
161
  <div class="header">
162
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>
 
13
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
14
 
15
  * { box-sizing: border-box; font-family: 'Inter', sans-serif; }
 
16
  .card {
17
+ background: #fffdf9;
18
+ border: 1px solid #f6e3bb;
19
  border-radius: 0.75rem;
20
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
21
  padding: 1.5rem;
 
31
  .header h3 {
32
  font-size: 1.125rem;
33
  font-weight: 600;
34
+ color: #7c5836;
35
  }
 
36
  .drop-zone {
37
+ border: 2px dashed #f6e3bb;
38
  border-radius: 0.5rem;
39
  padding: 2rem;
40
  text-align: center;
41
  cursor: pointer;
42
  transition: all 0.2s ease;
43
+ background: #fdf6e9;
44
  }
45
 
46
  .drop-zone:hover, .drop-zone.drag-active {
47
+ border-color: #c7a24d;
48
+ background: #faedd2;
49
  }
50
 
51
  .drop-zone-content {
 
53
  flex-direction: column;
54
  align-items: center;
55
  gap: 0.5rem;
56
+ color: #7c5836;
57
  }
58
 
59
  .drop-zone-content svg {
60
+ color: #7c5836;
61
  }
 
62
  .file-info {
63
  display: none; /* Hidden by default */
64
  margin-top: 1rem;
65
  padding: 1rem;
66
+ background: #fdf6e9;
67
  border-radius: 0.5rem;
68
  }
69
+ .file-info.active {
 
70
  display: flex;
71
  align-items: center;
72
  justify-content: space-between;
 
77
  align-items: center;
78
  gap: 0.75rem;
79
  }
 
80
  .file-icon {
81
+ color: #c7a24d;
82
  }
83
 
84
  .file-text h4 {
85
  font-size: 0.875rem;
86
  font-weight: 600;
87
+ color: #5e4229;
88
  }
89
 
90
  .file-text p {
91
  font-size: 0.75rem;
92
+ color: #7c5836;
93
  }
94
+ .btn-remove {
 
95
  color: #ef4444;
96
  background: white;
97
  border: 1px solid #fee2e2;
 
104
  .btn-remove:hover {
105
  background: #fef2f2;
106
  }
 
107
  .progress-container {
108
  margin-top: 0.75rem;
109
  height: 0.5rem;
110
+ background: #f6e3bb;
111
  border-radius: 9999px;
112
  overflow: hidden;
113
  display: none;
 
115
 
116
  .progress-bar {
117
  height: 100%;
118
+ background: #c7a24d;
119
  width: 0%;
120
  transition: width 0.3s ease;
121
  }
122
+ .download-area {
 
123
  margin-top: 1rem;
124
  display: none;
125
  text-align: right;
 
128
  .download-area.active {
129
  display: block;
130
  }
 
131
  .btn-download {
132
  display: inline-flex;
133
  align-items: center;
134
  gap: 0.5rem;
135
+ background: #c7a24d;
136
  color: white;
137
  padding: 0.5rem 1rem;
138
  border-radius: 0.375rem;
 
144
  }
145
 
146
  .btn-download:hover {
147
+ background: #b89144;
148
  }
149
+ </style>
 
150
  <div class="card">
151
  <div class="header">
152
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>
components/top-bar.js CHANGED
@@ -33,29 +33,26 @@ class TopBar extends HTMLElement {
33
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
34
 
35
  * { box-sizing: border-box; font-family: 'Inter', sans-serif; }
36
-
37
  .container {
38
  display: flex;
39
  flex-direction: column;
40
  gap: 1rem;
41
- background: white;
42
  padding: 1rem;
43
  border-radius: 0.75rem;
44
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
45
  }
46
-
47
- .header-top {
48
  display: flex;
49
  align-items: center;
50
  justify-content: space-between;
51
  flex-wrap: wrap;
52
  gap: 1rem;
53
  }
54
-
55
  .app-name {
56
  font-size: 1.25rem;
57
  font-weight: 700;
58
- color: #0f172a;
59
  display: flex;
60
  align-items: center;
61
  gap: 0.5rem;
@@ -63,13 +60,12 @@ class TopBar extends HTMLElement {
63
 
64
  .model-selector {
65
  display: inline-flex;
66
- background: #f1f5f9;
67
  padding: 0.25rem;
68
  border-radius: 0.5rem;
69
  position: relative;
70
  }
71
-
72
- .radio-input {
73
  position: absolute;
74
  opacity: 0;
75
  cursor: pointer;
@@ -77,7 +73,6 @@ class TopBar extends HTMLElement {
77
  width: 100%;
78
  z-index: 10;
79
  }
80
-
81
  .radio-label {
82
  display: inline-flex;
83
  align-items: center;
@@ -85,50 +80,46 @@ class TopBar extends HTMLElement {
85
  border-radius: 0.375rem;
86
  font-size: 0.875rem;
87
  font-weight: 500;
88
- color: #64748b;
89
  cursor: pointer;
90
  transition: all 0.2s ease;
91
  }
92
 
93
  .radio-input:checked + .radio-label {
94
- background: white;
95
- color: #0f172a;
96
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
97
  }
98
-
99
  .lang-controls {
100
  display: flex;
101
  align-items: center;
102
  gap: 1rem;
103
  flex-wrap: wrap;
104
  padding-top: 0.5rem;
105
- border-top: 1px solid #e2e8f0;
106
  }
107
-
108
- .control-group {
109
  display: flex;
110
  flex-direction: column;
111
  gap: 0.25rem;
112
  }
113
-
114
  label {
115
  font-size: 0.75rem;
116
  font-weight: 600;
117
  text-transform: uppercase;
118
  letter-spacing: 0.05em;
119
- color: #64748b;
120
  }
121
-
122
  select {
123
  appearance: none;
124
  background-color: white;
125
- border: 1px solid #cbd5e1;
126
  border-radius: 0.375rem;
127
  padding: 0.5rem 2rem 0.5rem 0.75rem;
128
  font-size: 0.875rem;
129
- color: #0f172a;
130
  cursor: pointer;
131
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
132
  background-position: right 0.5rem center;
133
  background-repeat: no-repeat;
134
  background-size: 1.5em 1.5em;
@@ -136,11 +127,10 @@ class TopBar extends HTMLElement {
136
  }
137
 
138
  select:focus {
139
- outline: 2px solid #3b82f6;
140
  outline-offset: 1px;
141
  }
142
-
143
- .hidden { display: none !important; }
144
 
145
  @media (min-width: 768px) {
146
  .container { flex-direction: row; align-items: center; justify-content: space-between; }
@@ -171,17 +161,16 @@ class TopBar extends HTMLElement {
171
  <!-- Source Language -->
172
  <div class="control-group" id="source-group">
173
  <label for="source-lang">Source</label>
174
- <div id="source-indic" class="${!isIndic ? 'hidden' : ''} bg-gray-100 border border-gray-200 rounded px-3 py-2 text-sm text-gray-600 flex items-center h-[38px]">
175
  English (Hardcoded)
176
  </div>
177
- <select id="source-m2m" class="${!isM2M ? 'hidden' : ''}">
178
  ${m2mOptions}
179
  </select>
180
  </div>
181
-
182
  <!-- Swap Button (Only visible for M2M) -->
183
- <button id="swap-btn" class="${!isM2M ? 'hidden' : ''} mt-4 p-2 text-gray-500 hover:text-blue-600 hover:bg-blue-50 rounded-full transition-colors" aria-label="Swap Languages">
184
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>
185
  </button>
186
 
187
  <!-- Target Language -->
 
33
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
34
 
35
  * { box-sizing: border-box; font-family: 'Inter', sans-serif; }
 
36
  .container {
37
  display: flex;
38
  flex-direction: column;
39
  gap: 1rem;
40
+ background: #fffdf9;
41
  padding: 1rem;
42
  border-radius: 0.75rem;
43
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
44
  }
45
+ .header-top {
 
46
  display: flex;
47
  align-items: center;
48
  justify-content: space-between;
49
  flex-wrap: wrap;
50
  gap: 1rem;
51
  }
 
52
  .app-name {
53
  font-size: 1.25rem;
54
  font-weight: 700;
55
+ color: #7c5836;
56
  display: flex;
57
  align-items: center;
58
  gap: 0.5rem;
 
60
 
61
  .model-selector {
62
  display: inline-flex;
63
+ background: #faedd2;
64
  padding: 0.25rem;
65
  border-radius: 0.5rem;
66
  position: relative;
67
  }
68
+ .radio-input {
 
69
  position: absolute;
70
  opacity: 0;
71
  cursor: pointer;
 
73
  width: 100%;
74
  z-index: 10;
75
  }
 
76
  .radio-label {
77
  display: inline-flex;
78
  align-items: center;
 
80
  border-radius: 0.375rem;
81
  font-size: 0.875rem;
82
  font-weight: 500;
83
+ color: #7c5836;
84
  cursor: pointer;
85
  transition: all 0.2s ease;
86
  }
87
 
88
  .radio-input:checked + .radio-label {
89
+ background: #fffdf9;
90
+ color: #5e4229;
91
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
92
  }
 
93
  .lang-controls {
94
  display: flex;
95
  align-items: center;
96
  gap: 1rem;
97
  flex-wrap: wrap;
98
  padding-top: 0.5rem;
99
+ border-top: 1px solid #f6e3bb;
100
  }
101
+ .control-group {
 
102
  display: flex;
103
  flex-direction: column;
104
  gap: 0.25rem;
105
  }
 
106
  label {
107
  font-size: 0.75rem;
108
  font-weight: 600;
109
  text-transform: uppercase;
110
  letter-spacing: 0.05em;
111
+ color: #7c5836;
112
  }
 
113
  select {
114
  appearance: none;
115
  background-color: white;
116
+ border: 1px solid #f6e3bb;
117
  border-radius: 0.375rem;
118
  padding: 0.5rem 2rem 0.5rem 0.75rem;
119
  font-size: 0.875rem;
120
+ color: #5e4229;
121
  cursor: pointer;
122
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%237c5836' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
123
  background-position: right 0.5rem center;
124
  background-repeat: no-repeat;
125
  background-size: 1.5em 1.5em;
 
127
  }
128
 
129
  select:focus {
130
+ outline: 2px solid #c7a24d;
131
  outline-offset: 1px;
132
  }
133
+ .hidden { display: none !important; }
 
134
 
135
  @media (min-width: 768px) {
136
  .container { flex-direction: row; align-items: center; justify-content: space-between; }
 
161
  <!-- Source Language -->
162
  <div class="control-group" id="source-group">
163
  <label for="source-lang">Source</label>
164
+ <div id="source-indic" class="${!isIndic ? 'hidden' : ''} bg-[#fdf6e9] border border-[#f6e3bb] rounded px-3 py-2 text-sm text-[#7c5836] flex items-center h-[38px]">
165
  English (Hardcoded)
166
  </div>
167
+ <select id="source-m2m" class="${!isM2M ? 'hidden' : ''}">
168
  ${m2mOptions}
169
  </select>
170
  </div>
 
171
  <!-- Swap Button (Only visible for M2M) -->
172
+ <button id="swap-btn" class="${!isM2M ? 'hidden' : ''} mt-4 p-2 text-[#7c5836] hover:text-[#5e4229] hover:bg-[#faedd2] rounded-full transition-colors" aria-label="Swap Languages">
173
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line></svg>
174
  </button>
175
 
176
  <!-- Target Language -->
components/translator-workspace.js CHANGED
@@ -25,13 +25,12 @@ class TranslatorWorkspace extends HTMLElement {
25
  @media (min-width: 1024px) {
26
  .workspace { flex-direction: row; }
27
  }
28
-
29
  .pane {
30
  flex: 1;
31
- background: white;
32
  border-radius: 0.75rem;
33
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
34
- border: 1px solid #e2e8f0;
35
  display: flex;
36
  flex-direction: column;
37
  overflow: hidden;
@@ -39,35 +38,33 @@ class TranslatorWorkspace extends HTMLElement {
39
  }
40
 
41
  .pane:focus-within {
42
- border-color: #3b82f6;
43
- box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
44
  }
45
 
46
  .pane-header {
47
  padding: 0.75rem 1rem;
48
- border-bottom: 1px solid #f1f5f9;
49
  display: flex;
50
  justify-content: space-between;
51
  align-items: center;
52
- background: #f8fafc;
53
  }
54
 
55
  .pane-title {
56
  font-weight: 600;
57
- color: #475569;
58
  font-size: 0.875rem;
59
  text-transform: uppercase;
60
  }
61
-
62
- .actions {
63
  display: flex;
64
  gap: 0.5rem;
65
  }
66
-
67
  .icon-btn {
68
  background: none;
69
  border: none;
70
- color: #64748b;
71
  cursor: pointer;
72
  padding: 0.25rem;
73
  border-radius: 0.25rem;
@@ -78,15 +75,13 @@ class TranslatorWorkspace extends HTMLElement {
78
  }
79
 
80
  .icon-btn:hover {
81
- color: #0f172a;
82
- background: #e2e8f0;
83
  }
84
-
85
- .textarea-wrapper {
86
  flex-grow: 1;
87
  position: relative;
88
  }
89
-
90
  textarea {
91
  width: 100%;
92
  height: 100%;
@@ -95,7 +90,7 @@ class TranslatorWorkspace extends HTMLElement {
95
  padding: 1rem;
96
  font-size: 1rem;
97
  line-height: 1.6;
98
- color: #334155;
99
  background: transparent;
100
  outline: none;
101
  min-height: 250px;
@@ -106,36 +101,34 @@ class TranslatorWorkspace extends HTMLElement {
106
  bottom: 0.75rem;
107
  right: 0.75rem;
108
  font-size: 0.75rem;
109
- color: #94a3b8;
110
  pointer-events: none;
111
- background: rgba(255,255,255,0.8);
112
  padding: 0.125rem 0.25rem;
113
  border-radius: 0.25rem;
114
  }
115
-
116
  .empty-state {
117
  display: flex;
118
  flex-direction: column;
119
  align-items: center;
120
  justify-content: center;
121
  height: 100%;
122
- color: #94a3b8;
123
  text-align: center;
124
  padding: 2rem;
125
  }
126
 
127
  .output-area {
128
- background-color: #f8fafc;
129
- color: #475569;
130
  }
131
-
132
- /* Action Bar */
133
  .action-bar {
134
  position: sticky;
135
  bottom: 0;
136
- background: white;
137
  padding: 1rem;
138
- border-top: 1px solid #e2e8f0;
139
  display: flex;
140
  justify-content: flex-end;
141
  align-items: center;
@@ -143,8 +136,7 @@ class TranslatorWorkspace extends HTMLElement {
143
  border-radius: 0 0 0.75rem 0.75rem;
144
  z-index: 10;
145
  }
146
-
147
- .btn {
148
  display: inline-flex;
149
  align-items: center;
150
  justify-content: center;
@@ -156,14 +148,13 @@ class TranslatorWorkspace extends HTMLElement {
156
  cursor: pointer;
157
  border: 1px solid transparent;
158
  }
159
-
160
  .btn-secondary {
161
  background: white;
162
- border-color: #cbd5e1;
163
- color: #475569;
164
  }
165
  .btn-secondary:hover {
166
- background: #f1f5f9;
167
  }
168
  .btn-secondary:disabled {
169
  opacity: 0.5;
@@ -171,34 +162,33 @@ class TranslatorWorkspace extends HTMLElement {
171
  }
172
 
173
  .btn-primary {
174
- background: #2563eb;
175
  color: white;
176
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
177
  }
178
  .btn-primary:hover:not(:disabled) {
179
- background: #1d4ed8;
180
  }
181
  .btn-primary:disabled {
182
- background: #93c5fd;
 
183
  cursor: not-allowed;
184
  }
185
-
186
- .loading-spinner {
187
  animation: spin 1s linear infinite;
188
  }
189
 
190
  @keyframes spin {
191
  100% { transform: rotate(360deg); }
192
  }
193
-
194
  .skeleton {
195
  height: 1rem;
196
- background: #e2e8f0;
197
  border-radius: 0.25rem;
198
  margin-bottom: 0.5rem;
199
  width: 100%;
200
  }
201
- .skeleton.short { width: 60%; }
202
  .skeleton.long { width: 90%; }
203
 
204
  </style>
@@ -386,23 +376,23 @@ class TranslatorWorkspace extends HTMLElement {
386
 
387
  renderOutputLoading() {
388
  const wrapper = this.shadowRoot.getElementById('output-wrapper');
389
- wrapper.innerHTML = `
390
  <div style="padding: 1.5rem; display:flex; flex-direction:column; gap:0.5rem; height:100%; justify-content:center;">
391
- <div class="skeleton long"></div>
392
- <div class="skeleton short"></div>
393
- <div class="skeleton long"></div>
394
- <div class="skeleton short"></div>
395
- <div class="skeleton medium"></div>
396
  </div>
397
- `;
398
- }
399
 
400
  renderOutputText(text) {
401
  const wrapper = this.shadowRoot.getElementById('output-wrapper');
402
  wrapper.innerHTML = `
403
- <textarea readonly style="cursor:text; background:transparent; color:#334155;">${text}</textarea>
404
  `;
405
- }
406
  }
407
 
408
  customElements.define('translator-workspace', TranslatorWorkspace);
 
25
  @media (min-width: 1024px) {
26
  .workspace { flex-direction: row; }
27
  }
 
28
  .pane {
29
  flex: 1;
30
+ background: #fffdf9;
31
  border-radius: 0.75rem;
32
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
33
+ border: 1px solid #f6e3bb;
34
  display: flex;
35
  flex-direction: column;
36
  overflow: hidden;
 
38
  }
39
 
40
  .pane:focus-within {
41
+ border-color: #c7a24d;
42
+ box-shadow: 0 0 0 2px rgba(199, 162, 77, 0.2);
43
  }
44
 
45
  .pane-header {
46
  padding: 0.75rem 1rem;
47
+ border-bottom: 1px solid #f6e3bb;
48
  display: flex;
49
  justify-content: space-between;
50
  align-items: center;
51
+ background: #fdf6e9;
52
  }
53
 
54
  .pane-title {
55
  font-weight: 600;
56
+ color: #7c5836;
57
  font-size: 0.875rem;
58
  text-transform: uppercase;
59
  }
60
+ .actions {
 
61
  display: flex;
62
  gap: 0.5rem;
63
  }
 
64
  .icon-btn {
65
  background: none;
66
  border: none;
67
+ color: #7c5836;
68
  cursor: pointer;
69
  padding: 0.25rem;
70
  border-radius: 0.25rem;
 
75
  }
76
 
77
  .icon-btn:hover {
78
+ color: #5e4229;
79
+ background: #f6e3bb;
80
  }
81
+ .textarea-wrapper {
 
82
  flex-grow: 1;
83
  position: relative;
84
  }
 
85
  textarea {
86
  width: 100%;
87
  height: 100%;
 
90
  padding: 1rem;
91
  font-size: 1rem;
92
  line-height: 1.6;
93
+ color: #5e4229;
94
  background: transparent;
95
  outline: none;
96
  min-height: 250px;
 
101
  bottom: 0.75rem;
102
  right: 0.75rem;
103
  font-size: 0.75rem;
104
+ color: #7c5836;
105
  pointer-events: none;
106
+ background: rgba(255,253,249,0.8);
107
  padding: 0.125rem 0.25rem;
108
  border-radius: 0.25rem;
109
  }
 
110
  .empty-state {
111
  display: flex;
112
  flex-direction: column;
113
  align-items: center;
114
  justify-content: center;
115
  height: 100%;
116
+ color: #7c5836;
117
  text-align: center;
118
  padding: 2rem;
119
  }
120
 
121
  .output-area {
122
+ background-color: #fdf6e9;
123
+ color: #5e4229;
124
  }
125
+ /* Action Bar */
 
126
  .action-bar {
127
  position: sticky;
128
  bottom: 0;
129
+ background: #fffdf9;
130
  padding: 1rem;
131
+ border-top: 1px solid #f6e3bb;
132
  display: flex;
133
  justify-content: flex-end;
134
  align-items: center;
 
136
  border-radius: 0 0 0.75rem 0.75rem;
137
  z-index: 10;
138
  }
139
+ .btn {
 
140
  display: inline-flex;
141
  align-items: center;
142
  justify-content: center;
 
148
  cursor: pointer;
149
  border: 1px solid transparent;
150
  }
 
151
  .btn-secondary {
152
  background: white;
153
+ border-color: #f6e3bb;
154
+ color: #7c5836;
155
  }
156
  .btn-secondary:hover {
157
+ background: #fdf6e9;
158
  }
159
  .btn-secondary:disabled {
160
  opacity: 0.5;
 
162
  }
163
 
164
  .btn-primary {
165
+ background: #c7a24d;
166
  color: white;
167
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
168
  }
169
  .btn-primary:hover:not(:disabled) {
170
+ background: #b89144;
171
  }
172
  .btn-primary:disabled {
173
+ background: #f6e3bb;
174
+ color: #7c5836;
175
  cursor: not-allowed;
176
  }
177
+ .loading-spinner {
 
178
  animation: spin 1s linear infinite;
179
  }
180
 
181
  @keyframes spin {
182
  100% { transform: rotate(360deg); }
183
  }
 
184
  .skeleton {
185
  height: 1rem;
186
+ background: #f6e3bb;
187
  border-radius: 0.25rem;
188
  margin-bottom: 0.5rem;
189
  width: 100%;
190
  }
191
+ .skeleton.short { width: 60%; }
192
  .skeleton.long { width: 90%; }
193
 
194
  </style>
 
376
 
377
  renderOutputLoading() {
378
  const wrapper = this.shadowRoot.getElementById('output-wrapper');
379
+ wrapper.innerHTML = `
380
  <div style="padding: 1.5rem; display:flex; flex-direction:column; gap:0.5rem; height:100%; justify-content:center;">
381
+ <div class="skeleton long" style="background: #f6e3bb;"></div>
382
+ <div class="skeleton short" style="background: #f6e3bb;"></div>
383
+ <div class="skeleton long" style="background: #f6e3bb;"></div>
384
+ <div class="skeleton short" style="background: #f6e3bb;"></div>
385
+ <div class="skeleton medium" style="background: #f6e3bb;"></div>
386
  </div>
387
+ `;
388
+ }
389
 
390
  renderOutputText(text) {
391
  const wrapper = this.shadowRoot.getElementById('output-wrapper');
392
  wrapper.innerHTML = `
393
+ <textarea readonly style="cursor:text; background:transparent; color:#5e4229;">${text}</textarea>
394
  `;
395
+ }
396
  }
397
 
398
  customElements.define('translator-workspace', TranslatorWorkspace);
index.html CHANGED
@@ -10,9 +10,8 @@
10
  <script src="https://unpkg.com/feather-icons"></script>
11
  <link rel="stylesheet" href="style.css">
12
  </head>
13
- <body class="bg-slate-50 text-slate-800 font-sans antialiased min-h-screen flex flex-col">
14
-
15
- <!-- Main Container -->
16
  <main class="flex-grow w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-6">
17
 
18
  <!-- App Header / Top Bar -->
 
10
  <script src="https://unpkg.com/feather-icons"></script>
11
  <link rel="stylesheet" href="style.css">
12
  </head>
13
+ <body class="bg-[#fffdf9] text-[#7c5836] font-sans antialiased min-h-screen flex flex-col">
14
+ <!-- Main Container -->
 
15
  <main class="flex-grow w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-6">
16
 
17
  <!-- App Header / Top Bar -->
style.css CHANGED
@@ -1,3 +1,4 @@
 
1
  /* Custom Styles & Tailwind Overrides */
2
 
3
  /* Smooth scrolling */
@@ -11,16 +12,15 @@ html {
11
  height: 8px;
12
  }
13
  ::-webkit-scrollbar-track {
14
- background: #f1f5f9;
15
  }
16
  ::-webkit-scrollbar-thumb {
17
- background: #cbd5e1;
18
  border-radius: 4px;
19
  }
20
  ::-webkit-scrollbar-thumb:hover {
21
- background: #94a3b8;
22
  }
23
-
24
  /* Loading Spinner Animation */
25
  @keyframes spin {
26
  to { transform: rotate(360deg); }
@@ -28,18 +28,16 @@ html {
28
  .spinner {
29
  animation: spin 1s linear infinite;
30
  }
31
-
32
  /* Skeleton Loading Animation */
33
  @keyframes shimmer {
34
  0% { background-position: -200% 0; }
35
  100% { background-position: 200% 0; }
36
  }
37
  .skeleton {
38
- background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
39
  background-size: 200% 100%;
40
  animation: shimmer 1.5s infinite;
41
  }
42
-
43
  /* Toast Notifications */
44
  .toast-enter {
45
  transform: translateY(100%);
@@ -59,15 +57,14 @@ html {
59
  opacity: 0;
60
  transition: all 0.3s ease-in;
61
  }
62
-
63
  /* Focus Ring Overrides for Accessibility */
64
  *:focus-visible {
65
- outline: 2px solid #3b82f6;
66
  outline-offset: 2px;
67
  }
68
 
69
  /* File Drop Zone Active State */
70
  .drag-active {
71
- border-color: #3b82f6 !important;
72
- background-color: #eff6ff !important;
73
- }
 
1
+
2
  /* Custom Styles & Tailwind Overrides */
3
 
4
  /* Smooth scrolling */
 
12
  height: 8px;
13
  }
14
  ::-webkit-scrollbar-track {
15
+ background: #fdf6e9;
16
  }
17
  ::-webkit-scrollbar-thumb {
18
+ background: #f6e3bb;
19
  border-radius: 4px;
20
  }
21
  ::-webkit-scrollbar-thumb:hover {
22
+ background: #c7a24d;
23
  }
 
24
  /* Loading Spinner Animation */
25
  @keyframes spin {
26
  to { transform: rotate(360deg); }
 
28
  .spinner {
29
  animation: spin 1s linear infinite;
30
  }
 
31
  /* Skeleton Loading Animation */
32
  @keyframes shimmer {
33
  0% { background-position: -200% 0; }
34
  100% { background-position: 200% 0; }
35
  }
36
  .skeleton {
37
+ background: linear-gradient(90deg, #fdf6e9 25%, #f6e3bb 50%, #fdf6e9 75%);
38
  background-size: 200% 100%;
39
  animation: shimmer 1.5s infinite;
40
  }
 
41
  /* Toast Notifications */
42
  .toast-enter {
43
  transform: translateY(100%);
 
57
  opacity: 0;
58
  transition: all 0.3s ease-in;
59
  }
 
60
  /* Focus Ring Overrides for Accessibility */
61
  *:focus-visible {
62
+ outline: 2px solid #c7a24d;
63
  outline-offset: 2px;
64
  }
65
 
66
  /* File Drop Zone Active State */
67
  .drag-active {
68
+ border-color: #c7a24d !important;
69
+ background-color: #faedd2 !important;
70
+ }