Rewild Your Web
web
browser
dweb
1/* SPDX-License-Identifier: AGPL-3.0-or-later */
2
3:host {
4 display: flex;
5 font-family: var(--font-family-base);
6 box-sizing: border-box;
7}
8
9:host .wrapper {
10 background: var(--bg-webview);
11 border-radius: var(--radius-md) var(--radius-md) 0 0;
12 display: flex;
13 flex-direction: column;
14 flex: 1;
15 min-width: 0;
16 min-height: 0;
17 box-shadow: 0 4px 4px var(--color-shadow);
18 transition: box-shadow var(--transition-fast);
19 position: relative; /* Needed for absolutely positioned menu overlay */
20}
21
22:host .wrapper.active {
23 box-shadow:
24 0 0 0 3px var(--color-focus-ring),
25 0 4px 4px var(--color-shadow);
26}
27
28/* Container for iframe and dialog overlay */
29:host .iframe-container {
30 flex: 1;
31 position: relative;
32 min-width: 0;
33 min-height: 0;
34 display: flex;
35}
36
37:host iframe {
38 flex: 1;
39 border: none;
40 min-width: 0;
41 min-height: 0;
42 position: relative;
43}
44
45:host .bar {
46 display: flex;
47 align-items: center;
48 gap: var(--spacing-sm);
49 padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-xs)
50 var(--spacing-sm);
51 border-radius: var(--radius-md) var(--radius-md) 0 0;
52 box-shadow: 0 4px 4px var(--color-shadow);
53 position: relative;
54 transition:
55 opacity var(--transition-fast),
56 max-height var(--transition-fast),
57 padding var(--transition-fast);
58 max-height: 3em;
59 overflow: hidden;
60}
61
62:host .bar.hidden {
63 opacity: 0;
64 max-height: 0;
65 padding-top: 0;
66 padding-bottom: 0;
67 pointer-events: none;
68 transition-delay: 0.5s;
69}
70
71:host .bar img {
72 width: var(--size-icon);
73}
74
75:host .icon {
76 cursor: pointer;
77}
78
79:host .icon.enabled-false {
80 cursor: not-allowed;
81 opacity: 0.4;
82}
83
84:host .title {
85 flex: 1;
86 white-space: nowrap;
87 overflow: hidden;
88 text-overflow: ellipsis;
89 cursor: pointer;
90}
91
92:host .menu-container {
93 position: relative;
94 display: flex;
95 align-items: center;
96}
97
98/* Dialog overlay styles - positioned within iframe-container */
99:host .dialog-overlay {
100 position: absolute;
101 top: 0;
102 left: 0;
103 right: 0;
104 bottom: 0;
105 background: var(--color-backdrop);
106 display: flex;
107 align-items: center;
108 justify-content: center;
109 z-index: var(--z-dialog);
110}
111
112:host .dialog-box {
113 background: var(--bg-surface);
114 border-radius: var(--radius-md);
115 padding: var(--spacing-lg);
116 min-width: 280px;
117 max-width: 80%;
118 box-shadow: 0 8px 32px var(--color-shadow);
119 font-family: var(--font-family-base);
120}
121
122:host .dialog-message {
123 margin-bottom: var(--spacing-md);
124 color: var(--color-text);
125 font-size: var(--font-size-menu);
126 line-height: 1.5;
127 white-space: pre-wrap;
128 word-wrap: break-word;
129}
130
131:host .dialog-input {
132 width: 100%;
133 padding: var(--spacing-sm) var(--spacing-md);
134 margin-bottom: var(--spacing-md);
135 border: 1px solid var(--color-border);
136 border-radius: var(--radius-sm);
137 font-size: var(--font-size-menu);
138 background: var(--bg-surface);
139 color: var(--color-text);
140 box-sizing: border-box;
141}
142
143:host .dialog-input:focus {
144 outline: none;
145 border-color: var(--color-primary);
146 box-shadow: 0 0 0 2px var(--color-focus-ring);
147}
148
149:host .dialog-buttons {
150 display: flex;
151 justify-content: flex-end;
152 gap: var(--spacing-sm);
153}
154
155:host .dialog-button {
156 padding: var(--spacing-sm) var(--spacing-md);
157 border-radius: var(--radius-sm);
158 font-size: var(--font-size-menu);
159 font-weight: var(--font-weight-bold);
160 cursor: pointer;
161 border: 1px solid var(--color-border);
162 background: var(--bg-surface);
163 color: var(--color-text);
164 transition:
165 background var(--transition-fast),
166 border-color var(--transition-fast);
167}
168
169:host .dialog-button:hover {
170 background: var(--bg-hover);
171}
172
173:host .dialog-button.primary {
174 background: var(--color-primary);
175 color: var(--color-text-on-header);
176 border-color: var(--color-primary);
177}
178
179:host .dialog-button.primary:hover {
180 filter: brightness(0.9);
181}
182
183:host .permission-prompt {
184 text-align: center;
185}
186
187:host .permission-icon {
188 width: var(--size-logo);
189 height: var(--size-logo);
190 margin: 0 auto var(--spacing-sm);
191 display: flex;
192 align-items: center;
193 justify-content: center;
194 background: var(--bg-icon);
195 border-radius: 50%;
196 color: var(--color-primary);
197}
198
199:host .permission-icon lucide-icon {
200 width: var(--size-notification-icon);
201 height: var(--size-notification-icon);
202}
203
204:host .permission-title {
205 font-size: var(--font-size-menu);
206 font-weight: var(--font-weight-bold);
207 color: var(--color-text);
208 margin-bottom: var(--spacing-sm);
209}
210
211:host .permission-prompt .dialog-message {
212 text-align: center;
213}
214
215:host .permission-prompt .dialog-buttons {
216 justify-content: center;
217}
218
219/* Loading progress bar */
220:host .load-progress {
221 position: absolute;
222 top: 0;
223 left: 0;
224 height: 3px;
225 background: var(--color-primary);
226 transition:
227 width 0.3s ease-out,
228 opacity 0.3s ease;
229 opacity: 0;
230 width: 0;
231 z-index: var(--z-base);
232}
233
234:host .load-progress.load-started {
235 width: 30%;
236 opacity: 1;
237 animation: load-shimmer 1.5s infinite;
238}
239
240:host .load-progress.load-headparsed {
241 width: 65%;
242 opacity: 1;
243 animation: load-shimmer 1.5s infinite;
244}
245
246:host .load-progress.load-complete {
247 width: 100%;
248 opacity: 0;
249 transition:
250 width 0.2s ease-out,
251 opacity 0.4s ease 0.2s;
252}
253
254@keyframes load-shimmer {
255 0%,
256 100% {
257 filter: brightness(1);
258 }
259 50% {
260 filter: brightness(1.3);
261 }
262}
263
264/* ============================================================================
265 Mobile-specific styles
266 ============================================================================ */
267
268/* When mobile-mode is detected, adjust the wrapper */
269:host(.mobile-mode) .wrapper {
270 border-radius: 0;
271 box-shadow: none;
272}
273
274:host(.mobile-mode) .wrapper.active {
275 box-shadow: none;
276}
277
278/* Hide the title bar completely on mobile */
279:host(.mobile-mode) .bar {
280 display: none !important;
281}
282
283/* Make iframe container fill entire space */
284:host(.mobile-mode) .iframe-container {
285 border-radius: 0;
286}