File size: 6,962 Bytes
39a9177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e15897
 
39a9177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e15897
 
 
 
 
 
 
 
 
39a9177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e15897
39a9177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e15897
 
 
 
 
 
39a9177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e15897
39a9177
 
 
 
9e15897
39a9177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
/* ---------------------------------------------------------------------------
   styles/wave51/kit.css β€” W51-T01, the wave-51 base kit.

   The ONE confirm dialog's surface, plus the labelled switch row its bodies use.

   ⚠ IMPORTED FROM index.css, NOT FROM THE COMPONENT, and that breaks with the
   convention every wave since 43 has followed. The reason is that this sheet is
   consumed by three lanes on pages that have nothing else in common: a
   per-component `import "../styles/wave51/kit.css"` lands the rules in whichever
   lazy chunk happens to pull it first, so a dialog opened from any other chunk
   paints an unstyled <div> over the app while tsc, the build and every source
   check stay green. A globally imported sheet cannot fail that way.

   ⚠ EVERY SELECTOR IS TOP-LEVEL. The dialog renders through `BodyPortal`, so it
   is a direct child of <body>; a descendant-scoped rule would simply never match
   and would fail with no error at all (`.cg-pop` shipped transparent this way).

   β›” NO LITERAL `font-size` ANYWHERE IN THIS FILE. `--lp-fs-*` or nothing β€”
   verify_ui.py goes red on a literal, and 32 accumulated sizes is how that rule
   was earned (DESIGN.md section 5).
   --------------------------------------------------------------------------- */

@import "../sdlc81/dialog-size.css";

/* The scrim. Covering everything is its whole job, so it also carries the layer:
   `--cg-z-overlay` is the top of the --cg-z-* ladder declared in index.css. */
.lp-dialog-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--cg-z-overlay);
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* Two radii on this surface at most (DESIGN.md section 2): --lp-r-lg for the
   dialog, --lp-r-md for the buttons inside it. */
.lp-dialog {
  /* Shared geometry must beat legacy :has() rules and ordinary inline sizes. */
  width: var(--lp-dialog-w) !important;
  height: var(--lp-dialog-h) !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  max-height: none !important;
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--lp-surface);
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-lg);
  /* A tinted shadow, and shadows are allowed here because this IS an overlay
     (DESIGN.md section 2: hairlines, not shadows; shadows only on overlays). */
  box-shadow: 0 12px 34px rgba(20, 24, 40, 0.17);
  padding: 16px;
  font: inherit;
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
  color: var(--lp-ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lp-dialog-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lp-dialog-title {
  margin: 0;
  font-size: var(--lp-fs-md);
  font-weight: 600;
  line-height: var(--lp-lh-tight);
  color: var(--lp-ink);
}

.lp-dialog-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  margin: 0;
  color: var(--lp-muted);
}

/* β›” THE CHROME RESET. A native <button> brings its own border, background, font
   and colour from the user agent, and the app's type stops at its edge. Every
   button rule in this file resets all four in its BASE declaration. */
.lp-dialog-x,
.lp-dialog-btn,
.lp-switch {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.lp-dialog-x {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--lp-r-md);
  color: var(--lp-muted);
}

.lp-dialog-x:hover {
  background: var(--lp-surface-2);
  color: var(--lp-ink);
}

.lp-dialog-x:disabled {
  opacity: 0.5;
  cursor: default;
}

.lp-dialog-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
}

.lp-dialog-btn {
  font-size: var(--lp-fs-sm);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--lp-r-md);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lp-dialog-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.lp-dialog-btn:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: 2px;
}

/* Quiet, because the safe choice does not need to shout. A hairline, not a fill. */
.lp-dialog-btn-quiet {
  border: 1px solid var(--lp-line);
  color: var(--lp-ink);
}

.lp-dialog-btn-quiet:hover:not(:disabled) {
  background: var(--lp-surface-2);
}

/* β›” `--lp-red-deep`, NOT `--lp-red`. DESIGN.md section 8 measures the pair:
   --lp-red is a FILL at 1.94:1, so white text on it is unreadable; --lp-red-deep
   carries the contrast that makes the label legible. */
.lp-dialog-btn-destructive {
  background: var(--lp-red-deep);
  color: #ffffff;
}

.lp-dialog-btn-destructive:hover:not(:disabled) {
  opacity: 0.9;
}

/* `--lp-primary` at 7.71:1 against white, and `--lp-primary-hover` at 9.47:1.
   β›” Never `--cg-primary-hover`: it derives from --lp-blue-solid, the wrong hue. */
.lp-dialog-btn-primary {
  background: var(--lp-primary);
  color: #ffffff;
}

.lp-dialog-btn-primary:hover:not(:disabled) {
  background: var(--lp-primary-hover);
}

/* --- the labelled switch row -------------------------------------------------
   ⚠ SAME SHAPE AS `.conn-db-switch`, declaration for declaration. It is repeated
   rather than reused because styles/wave49/connectors.css is imported from the
   connectors components, so its rules reach only the chunks those pages pull in;
   a dialog opened elsewhere would show a bare button with no track and no knob.
   β›” If the switch shape changes, change it in BOTH files. One shape, two homes. */
.lp-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lp-toggle-label {
  font-size: var(--lp-fs-sm);
  color: var(--lp-ink);
}

.lp-switch {
  border: 1px solid var(--lp-line);
  background: var(--lp-surface-2);
  flex: 0 0 auto;
  width: 34px;
  height: 20px;
  padding: 2px;
  border-radius: var(--lp-r-pill);
  display: inline-flex;
  align-items: center;
  /* ⚠ NO TRANSITION ON THE TRACK: DESIGN.md section 4 allows motion on opacity and
     transform only, so the knob's translate carries the change and the fill swaps. */
}

.lp-switch.is-on {
  border-color: var(--lp-primary);
  background: var(--lp-primary);
}

.lp-switch:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: 2px;
}

.lp-switch:disabled {
  opacity: 0.55;
  cursor: default;
}

.lp-switch-knob {
  width: 14px;
  height: 14px;
  border-radius: var(--lp-r-pill);
  background: var(--lp-surface);
  transform: translateX(0);
  transition: transform 0.12s ease;
}

.lp-switch.is-on .lp-switch-knob {
  transform: translateX(14px);
  background: #ffffff;
}