@reservi/calendar 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1118 @@
1
+ /**
2
+ * ARCHIVO GENERADO — no editar a mano.
3
+ * Fuente: packages/theme/src · Generador: packages/bundle/scripts/build-css.mjs
4
+ */
5
+ /**
6
+ * Punto de entrada "plain CSS" de Reservi Calendar: sin Tailwind.
7
+ *
8
+ * Uso (Tailwind 3, CSS Modules, PostCSS o un <link> suelto):
9
+ * @import "@reservi/theme/plain";
10
+ *
11
+ * Equivale a `@reservi/theme` pero declara los design tokens en `:root` en
12
+ * lugar de en un bloque `@theme` de TailwindCSS 4. Los estilos de componentes
13
+ * son los mismos: leen los tokens con `var(--color-rsv-*, fallback)`.
14
+ */
15
+ /**
16
+ * ARCHIVO GENERADO — no editar a mano.
17
+ * Fuente: src/theme.css · Generador: scripts/build-plain.mjs
18
+ *
19
+ * Misma lista de design tokens que el bloque `@theme` de Tailwind 4, pero
20
+ * declarados en `:root` para consumidores con Tailwind 3 o sin Tailwind.
21
+ */
22
+
23
+ :root {
24
+ /* Superficies */
25
+ --color-rsv-bg: oklch(1 0 0);
26
+ --color-rsv-surface: oklch(0.98 0 0);
27
+ --color-rsv-border: oklch(0.9 0 0);
28
+ --color-rsv-muted: oklch(0.55 0 0);
29
+ --color-rsv-text: oklch(0.2 0 0);
30
+
31
+ /* Marca / acento */
32
+ --color-rsv-primary: oklch(0.55 0.2 264);
33
+ --color-rsv-primary-fg: oklch(0.99 0 0);
34
+ --color-rsv-today: oklch(0.97 0.04 264);
35
+
36
+ /* Paleta categórica de eventos */
37
+ --color-rsv-event-1: oklch(0.6 0.18 264);
38
+ --color-rsv-event-2: oklch(0.65 0.17 150);
39
+ --color-rsv-event-3: oklch(0.7 0.17 60);
40
+ --color-rsv-event-4: oklch(0.62 0.2 20);
41
+ --color-rsv-event-5: oklch(0.6 0.16 320);
42
+ --color-rsv-event-fg: oklch(0.99 0 0);
43
+
44
+ /* Estados */
45
+ --color-rsv-now: oklch(0.6 0.22 20);
46
+ --color-rsv-selection: oklch(0.9 0.05 264);
47
+ --color-rsv-nonbusiness: oklch(0.96 0 0);
48
+
49
+ /* Tipografía */
50
+ --font-rsv-sans: ui-sans-serif, system-ui, sans-serif;
51
+ --text-rsv-xs: 0.75rem;
52
+ --text-rsv-sm: 0.8125rem;
53
+ --text-rsv-base: 0.875rem;
54
+
55
+ /* Geometría */
56
+ --radius-rsv: 0.5rem;
57
+ --radius-rsv-event: 0.375rem;
58
+ --spacing-rsv-slot: 2.5rem;
59
+ --spacing-rsv-gutter: 0.25rem;
60
+
61
+ /* Sombras y transición */
62
+ --shadow-rsv-pop: 0 4px 20px -4px oklch(0 0 0 / 0.2);
63
+ --ease-rsv: cubic-bezier(0.2, 0, 0, 1);
64
+ }
65
+
66
+ /* Modo oscuro automático */
67
+ @media (prefers-color-scheme: dark) {
68
+ :root {
69
+ --color-rsv-bg: oklch(0.18 0.01 264);
70
+ --color-rsv-surface: oklch(0.22 0.01 264);
71
+ --color-rsv-border: oklch(0.3 0.01 264);
72
+ --color-rsv-text: oklch(0.95 0 0);
73
+ --color-rsv-muted: oklch(0.6 0 0);
74
+ --color-rsv-today: oklch(0.3 0.05 264);
75
+ --color-rsv-nonbusiness: oklch(0.2 0.01 264);
76
+ }
77
+ }
78
+
79
+ /* Modo oscuro por clase (.dark) para toggle manual */
80
+ .dark {
81
+ --color-rsv-bg: oklch(0.18 0.01 264);
82
+ --color-rsv-surface: oklch(0.22 0.01 264);
83
+ --color-rsv-border: oklch(0.3 0.01 264);
84
+ --color-rsv-text: oklch(0.95 0 0);
85
+ --color-rsv-muted: oklch(0.6 0 0);
86
+ --color-rsv-today: oklch(0.3 0.05 264);
87
+ --color-rsv-nonbusiness: oklch(0.2 0.01 264);
88
+ }
89
+
90
+ /**
91
+ * Estilos base de los componentes de Reservi Calendar. Todo usa design tokens
92
+ * (--*-rsv-*) con fallback, de modo que retematizar = sobreescribir tokens.
93
+ * Seleccionamos por [data-rsv] para no depender de clases concretas.
94
+ */
95
+
96
+ [data-rsv="root"] {
97
+ font-family: var(--font-rsv-sans, system-ui, sans-serif);
98
+ font-size: var(--text-rsv-base, 0.875rem);
99
+ color: var(--color-rsv-text, #1a1a1a);
100
+ background: var(--color-rsv-bg, #fff);
101
+ border: 1px solid var(--color-rsv-border, #e5e5e5);
102
+ border-radius: var(--radius-rsv, 0.5rem);
103
+ overflow: hidden;
104
+ display: flex;
105
+ flex-direction: column;
106
+ }
107
+
108
+ /* El area de vista reparte el alto disponible del root (flex column), de modo
109
+ que el cuerpo de timeGrid pueda scrollear cuando el root tiene alto fijo.
110
+ Con `height: "auto"` el calendario crece con su contenido. */
111
+ [data-rsv="view"] {
112
+ display: flex;
113
+ flex-direction: column;
114
+ flex: 1 1 auto;
115
+ min-height: 0;
116
+ }
117
+ [data-rsv="root"][data-rsv-autoheight="true"] [data-rsv="view"] {
118
+ flex: 0 0 auto;
119
+ }
120
+
121
+ /* Hueco donde el framework anfitrion (React/Vue) pinta un render prop: no debe
122
+ introducir una caja propia que rompa el layout del evento o de la celda. */
123
+ [data-rsv="host"] {
124
+ display: contents;
125
+ }
126
+
127
+ /* Toolbar */
128
+ [data-rsv="toolbar-wrap"] {
129
+ display: flex;
130
+ flex-direction: column;
131
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
132
+ }
133
+ [data-rsv="toolbar"] {
134
+ display: flex;
135
+ align-items: center;
136
+ justify-content: space-between;
137
+ gap: 0.5rem;
138
+ padding: 0.625rem 0.75rem;
139
+ }
140
+ [data-rsv="toolbar-section"] {
141
+ display: flex;
142
+ align-items: center;
143
+ gap: 0.375rem;
144
+ }
145
+ /* La zona de navegación se centra; el slot de inicio y el de fin la flanquean. */
146
+ [data-rsv="toolbar-section"][data-rsv-area="nav"] {
147
+ gap: 0.25rem;
148
+ }
149
+ /* El título es el disparador del datepicker. */
150
+ [data-rsv="datepicker-anchor"] {
151
+ position: relative;
152
+ display: inline-flex;
153
+ }
154
+ [data-rsv="title"] {
155
+ appearance: none;
156
+ display: inline-flex;
157
+ align-items: center;
158
+ justify-content: center;
159
+ gap: 0.375rem;
160
+ border: none;
161
+ background: transparent;
162
+ color: inherit;
163
+ font: inherit;
164
+ font-weight: 600;
165
+ text-transform: capitalize;
166
+ margin: 0 0.25rem;
167
+ min-width: 7rem;
168
+ padding: 0.3rem 0.5rem;
169
+ border-radius: calc(var(--radius-rsv, 0.5rem) - 0.25rem);
170
+ cursor: pointer;
171
+ transition: background 0.15s var(--ease-rsv, ease);
172
+ }
173
+ [data-rsv="title"]:hover {
174
+ background: var(--color-rsv-surface, #f3f4f6);
175
+ }
176
+ [data-rsv="title"]:focus-visible {
177
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
178
+ outline-offset: 2px;
179
+ }
180
+ [data-rsv="title-icon"] {
181
+ flex: none;
182
+ opacity: 0.75;
183
+ }
184
+
185
+ /* Datepicker (rejilla mes/año) */
186
+ [data-rsv="datepicker"] {
187
+ position: absolute;
188
+ top: calc(100% + 0.375rem);
189
+ left: 50%;
190
+ transform: translateX(-50%);
191
+ z-index: 50;
192
+ min-width: 15rem;
193
+ padding: 0.625rem;
194
+ background: var(--color-rsv-bg, #fff);
195
+ border: 1px solid var(--color-rsv-border, #e5e5e5);
196
+ border-radius: var(--radius-rsv, 0.5rem);
197
+ box-shadow: var(--shadow-rsv, 0 12px 32px rgba(0, 0, 0, 0.18));
198
+ }
199
+ [data-rsv="dp-head"] {
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: space-between;
203
+ margin-bottom: 0.5rem;
204
+ padding: 0 0.25rem;
205
+ }
206
+ [data-rsv="dp-label"] {
207
+ font-weight: 700;
208
+ text-transform: capitalize;
209
+ }
210
+ [data-rsv="dp-nav"] {
211
+ appearance: none;
212
+ border: none;
213
+ background: transparent;
214
+ color: inherit;
215
+ font: inherit;
216
+ width: 1.75rem;
217
+ height: 1.75rem;
218
+ border-radius: calc(var(--radius-rsv, 0.5rem) - 0.25rem);
219
+ cursor: pointer;
220
+ transition: background 0.15s var(--ease-rsv, ease);
221
+ }
222
+ [data-rsv="dp-nav"]:hover {
223
+ background: var(--color-rsv-surface, #f3f4f6);
224
+ }
225
+ [data-rsv="dp-grid"] {
226
+ display: grid;
227
+ grid-template-columns: repeat(4, 1fr);
228
+ gap: 0.25rem;
229
+ }
230
+ [data-rsv="dp-month"] {
231
+ appearance: none;
232
+ border: none;
233
+ background: transparent;
234
+ color: inherit;
235
+ font: inherit;
236
+ text-transform: capitalize;
237
+ padding: 0.45rem 0.25rem;
238
+ border-radius: calc(var(--radius-rsv, 0.5rem) - 0.25rem);
239
+ cursor: pointer;
240
+ transition:
241
+ background 0.12s var(--ease-rsv, ease),
242
+ color 0.12s var(--ease-rsv, ease);
243
+ }
244
+ [data-rsv="dp-month"]:hover {
245
+ background: var(--color-rsv-surface, #f3f4f6);
246
+ }
247
+ [data-rsv="dp-month"][data-active="true"] {
248
+ background: var(--color-rsv-primary, #4f46e5);
249
+ color: var(--color-rsv-primary-fg, #fff);
250
+ font-weight: 600;
251
+ }
252
+ /* "Hoy" sin estar seleccionado: solo un anillo. */
253
+ [data-rsv="dp-month"][data-today="true"]:not([data-active="true"]),
254
+ [data-rsv="dp-day"][data-today="true"]:not([data-active="true"]) {
255
+ box-shadow: inset 0 0 0 1.5px var(--color-rsv-primary, #4f46e5);
256
+ }
257
+
258
+ /* Rejilla de días (modo DÍA) */
259
+ [data-rsv="dp-days"] {
260
+ display: grid;
261
+ grid-template-columns: repeat(7, 1fr);
262
+ gap: 0.125rem;
263
+ }
264
+ [data-rsv="dp-dow"] {
265
+ display: flex;
266
+ align-items: center;
267
+ justify-content: center;
268
+ padding: 0.25rem 0;
269
+ font-size: 0.75rem;
270
+ font-weight: 600;
271
+ text-transform: capitalize;
272
+ color: var(--color-rsv-text-muted, #6b7280);
273
+ }
274
+ [data-rsv="dp-day"] {
275
+ appearance: none;
276
+ border: none;
277
+ background: transparent;
278
+ color: inherit;
279
+ font: inherit;
280
+ aspect-ratio: 1;
281
+ border-radius: 999px;
282
+ cursor: pointer;
283
+ transition:
284
+ background 0.12s var(--ease-rsv, ease),
285
+ color 0.12s var(--ease-rsv, ease);
286
+ }
287
+ [data-rsv="dp-day"]:hover {
288
+ background: var(--color-rsv-surface, #f3f4f6);
289
+ }
290
+ [data-rsv="dp-day"][data-other="true"] {
291
+ color: var(--color-rsv-text-muted, #9ca3af);
292
+ opacity: 0.6;
293
+ }
294
+ [data-rsv="dp-day"][data-active="true"] {
295
+ background: var(--color-rsv-primary, #4f46e5);
296
+ color: var(--color-rsv-primary-fg, #fff);
297
+ font-weight: 600;
298
+ opacity: 1;
299
+ }
300
+ [data-rsv="dp-nav"]:focus-visible,
301
+ [data-rsv="dp-month"]:focus-visible,
302
+ [data-rsv="dp-day"]:focus-visible {
303
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
304
+ outline-offset: -2px;
305
+ }
306
+ [data-rsv="button"] {
307
+ appearance: none;
308
+ display: inline-flex;
309
+ align-items: center;
310
+ gap: 0.3rem;
311
+ border: 1px solid var(--color-rsv-border, #e5e5e5);
312
+ background: var(--color-rsv-surface, #fafafa);
313
+ color: inherit;
314
+ border-radius: calc(var(--radius-rsv, 0.5rem) - 0.25rem);
315
+ padding: 0.3rem 0.6rem;
316
+ font: inherit;
317
+ cursor: pointer;
318
+ transition: background 0.15s var(--ease-rsv, ease);
319
+ }
320
+ [data-rsv="button"]:hover {
321
+ background: var(--color-rsv-border, #eee);
322
+ }
323
+ [data-rsv="button"][data-active="true"] {
324
+ background: var(--color-rsv-primary, #4f46e5);
325
+ color: var(--color-rsv-primary-fg, #fff);
326
+ border-color: transparent;
327
+ }
328
+ /* Botón "Añadir" (variante primaria, vía onAddClick). */
329
+ [data-rsv="button"][data-rsv-variant="primary"] {
330
+ background: var(--color-rsv-primary, #4f46e5);
331
+ color: var(--color-rsv-primary-fg, #fff);
332
+ border-color: transparent;
333
+ font-weight: 500;
334
+ }
335
+ [data-rsv="button"][data-rsv-variant="primary"]:hover {
336
+ background: var(--color-rsv-primary-hover, var(--color-rsv-primary, #4338ca));
337
+ filter: brightness(0.95);
338
+ }
339
+ [data-rsv="add-icon"] {
340
+ font-size: 1.05em;
341
+ line-height: 1;
342
+ }
343
+ [data-rsv="button"]:focus-visible {
344
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
345
+ outline-offset: 2px;
346
+ }
347
+
348
+ /* Fila de pestañas de vista */
349
+ [data-rsv="toolbar-views"] {
350
+ display: flex;
351
+ align-items: stretch;
352
+ gap: 0.25rem;
353
+ padding: 0.25rem 0.5rem 0.5rem;
354
+ flex-wrap: wrap;
355
+ }
356
+ [data-rsv="view-tab"] {
357
+ appearance: none;
358
+ flex: 1 1 0;
359
+ border: none;
360
+ background: transparent;
361
+ color: var(--color-rsv-text-muted, #6b7280);
362
+ border-radius: calc(var(--radius-rsv, 0.5rem) - 0.25rem);
363
+ padding: 0.5rem 0.75rem;
364
+ font: inherit;
365
+ font-weight: 500;
366
+ cursor: pointer;
367
+ white-space: nowrap;
368
+ transition:
369
+ background 0.15s var(--ease-rsv, ease),
370
+ color 0.15s var(--ease-rsv, ease);
371
+ }
372
+ [data-rsv="view-tab"]:hover {
373
+ background: var(--color-rsv-surface, #f3f4f6);
374
+ color: var(--color-rsv-text, #1a1a1a);
375
+ }
376
+ [data-rsv="view-tab"][data-active="true"] {
377
+ background: var(--color-rsv-primary, #4f46e5);
378
+ color: var(--color-rsv-primary-fg, #fff);
379
+ }
380
+ [data-rsv="view-tab"]:focus-visible {
381
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
382
+ outline-offset: -2px;
383
+ }
384
+
385
+ /* DayGrid */
386
+ [data-rsv="daygrid"] {
387
+ display: flex;
388
+ flex-direction: column;
389
+ }
390
+ [data-rsv="daygrid-header"],
391
+ [data-rsv="daygrid-week"] {
392
+ display: grid;
393
+ grid-template-columns: repeat(var(--rsv-cols, 7), minmax(0, 1fr));
394
+ }
395
+ /* Columna de número de semana (cuando weekNumbers está activo). */
396
+ [data-rsv="daygrid"][data-weeknumbers="true"] [data-rsv="daygrid-header"],
397
+ [data-rsv="daygrid"][data-weeknumbers="true"] [data-rsv="daygrid-week"] {
398
+ grid-template-columns: var(--rsv-weeknum-width, 2.25rem) repeat(
399
+ var(--rsv-cols, 7),
400
+ minmax(0, 1fr)
401
+ );
402
+ }
403
+ [data-rsv="daygrid-weeknum-header"],
404
+ [data-rsv="daygrid-weeknum"] {
405
+ display: flex;
406
+ align-items: center;
407
+ justify-content: center;
408
+ font-size: var(--text-rsv-xs, 0.75rem);
409
+ color: var(--color-rsv-muted, #777);
410
+ background: var(--color-rsv-surface, #fafafa);
411
+ border-right: 1px solid var(--color-rsv-border, #eee);
412
+ font-variant-numeric: tabular-nums;
413
+ }
414
+ [data-rsv="daygrid-weeknum"] {
415
+ align-items: flex-start;
416
+ padding-top: 0.3rem;
417
+ }
418
+ [data-rsv="daygrid-header"] {
419
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
420
+ }
421
+ [data-rsv="daygrid-dow"] {
422
+ padding: 0.4rem 0.5rem;
423
+ font-size: var(--text-rsv-sm, 0.8125rem);
424
+ color: var(--color-rsv-muted, #777);
425
+ text-align: center;
426
+ text-transform: capitalize;
427
+ }
428
+ [data-rsv="day"] {
429
+ min-height: 5.5rem;
430
+ padding: 0.25rem;
431
+ border-right: 1px solid var(--color-rsv-border, #eee);
432
+ border-bottom: 1px solid var(--color-rsv-border, #eee);
433
+ display: flex;
434
+ flex-direction: column;
435
+ gap: var(--spacing-rsv-gutter, 0.25rem);
436
+ }
437
+ [data-rsv="daygrid-week"] [data-rsv="day"]:last-child {
438
+ border-right: none;
439
+ }
440
+ [data-rsv="day"][data-other="true"] {
441
+ background: var(--color-rsv-nonbusiness, #f7f7f7);
442
+ color: var(--color-rsv-muted, #999);
443
+ }
444
+ [data-rsv="day"][data-today="true"] {
445
+ background: var(--color-rsv-today, #eef);
446
+ }
447
+ [data-rsv="day"][data-business="false"] {
448
+ background: var(--color-rsv-nonbusiness, #f7f7f7);
449
+ }
450
+ [data-rsv="day"][data-selected="true"] {
451
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
452
+ outline-offset: -2px;
453
+ background: var(--color-rsv-selection, #e8e8ff);
454
+ }
455
+ [data-rsv="event"]:focus-visible {
456
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
457
+ outline-offset: 1px;
458
+ }
459
+ /* Selección múltiple (bulk ops): ctrl/cmd-click sobre un evento. */
460
+ [data-rsv="event"][data-rsv-selected="true"] {
461
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
462
+ outline-offset: 1px;
463
+ box-shadow: 0 0 0 3px var(--color-rsv-selection, #e8e8ff);
464
+ }
465
+ [data-rsv="day-number"] {
466
+ align-self: flex-end;
467
+ font-size: var(--text-rsv-sm, 0.8125rem);
468
+ font-variant-numeric: tabular-nums;
469
+ padding: 0.1rem 0.25rem;
470
+ }
471
+ [data-rsv="day"][data-today="true"] [data-rsv="day-number"] {
472
+ background: var(--color-rsv-primary, #4f46e5);
473
+ color: var(--color-rsv-primary-fg, #fff);
474
+ border-radius: 999px;
475
+ min-width: 1.5rem;
476
+ text-align: center;
477
+ }
478
+
479
+ /* Eventos */
480
+ [data-rsv="event"] {
481
+ display: flex;
482
+ align-items: center;
483
+ gap: 0.3rem;
484
+ font-size: var(--text-rsv-xs, 0.75rem);
485
+ line-height: 1.3;
486
+ padding: 0.1rem 0.35rem;
487
+ border-radius: var(--radius-rsv-event, 0.375rem);
488
+ background: var(--rsv-event-bg, var(--color-rsv-event-1));
489
+ color: var(--rsv-event-fg, var(--color-rsv-event-fg, #fff));
490
+ border: 1px solid var(--rsv-event-border, transparent);
491
+ cursor: pointer;
492
+ overflow: hidden;
493
+ white-space: nowrap;
494
+ text-overflow: ellipsis;
495
+ }
496
+ [data-rsv="daygrid"] [data-rsv="event"][data-editable="true"] {
497
+ cursor: grab;
498
+ touch-action: none;
499
+ }
500
+ [data-rsv="event"][data-all-day="false"] {
501
+ background: transparent;
502
+ color: var(--color-rsv-text, #1a1a1a);
503
+ }
504
+ [data-rsv="event"][data-all-day="false"]::before {
505
+ content: "";
506
+ width: 0.5rem;
507
+ height: 0.5rem;
508
+ border-radius: 999px;
509
+ background: var(--rsv-event-bg, var(--color-rsv-event-1));
510
+ flex: none;
511
+ }
512
+ [data-rsv="more-anchor"] {
513
+ position: relative;
514
+ }
515
+ [data-rsv="more-link"] {
516
+ appearance: none;
517
+ border: none;
518
+ background: transparent;
519
+ font: inherit;
520
+ text-align: start;
521
+ width: 100%;
522
+ font-size: var(--text-rsv-xs, 0.75rem);
523
+ color: var(--color-rsv-muted, #777);
524
+ cursor: pointer;
525
+ padding: 0.05rem 0.35rem;
526
+ border-radius: calc(var(--radius-rsv, 0.5rem) - 0.3rem);
527
+ }
528
+ [data-rsv="more-link"]:hover {
529
+ color: var(--color-rsv-primary, #4f46e5);
530
+ background: var(--color-rsv-surface, #f3f4f6);
531
+ }
532
+ [data-rsv="more-link"]:focus-visible {
533
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
534
+ outline-offset: -2px;
535
+ }
536
+
537
+ /* Popover "+N more" */
538
+ [data-rsv="more-popover"] {
539
+ position: absolute;
540
+ top: 0;
541
+ left: 0;
542
+ z-index: 60;
543
+ min-width: 12rem;
544
+ max-width: min(18rem, calc(100vw - 1.5rem));
545
+ background: var(--color-rsv-bg, #fff);
546
+ border: 1px solid var(--color-rsv-border, #e5e5e5);
547
+ border-radius: var(--radius-rsv, 0.5rem);
548
+ box-shadow: var(--shadow-rsv, 0 12px 32px rgba(0, 0, 0, 0.18));
549
+ overflow: hidden;
550
+ }
551
+ [data-rsv="more-popover-header"] {
552
+ display: flex;
553
+ align-items: center;
554
+ justify-content: space-between;
555
+ gap: 0.5rem;
556
+ padding: 0.4rem 0.6rem;
557
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
558
+ background: var(--color-rsv-surface, #fafafa);
559
+ }
560
+ [data-rsv="more-popover-title"] {
561
+ font-weight: 600;
562
+ font-size: var(--text-rsv-sm, 0.8125rem);
563
+ text-transform: capitalize;
564
+ }
565
+ [data-rsv="more-popover-close"] {
566
+ appearance: none;
567
+ border: none;
568
+ background: transparent;
569
+ color: var(--color-rsv-muted, #777);
570
+ font: inherit;
571
+ cursor: pointer;
572
+ line-height: 1;
573
+ padding: 0.15rem 0.3rem;
574
+ border-radius: calc(var(--radius-rsv, 0.5rem) - 0.3rem);
575
+ }
576
+ [data-rsv="more-popover-close"]:hover {
577
+ background: var(--color-rsv-border, #eee);
578
+ color: var(--color-rsv-text, #1a1a1a);
579
+ }
580
+ [data-rsv="more-popover-body"] {
581
+ display: flex;
582
+ flex-direction: column;
583
+ gap: var(--spacing-rsv-gutter, 0.25rem);
584
+ padding: 0.4rem;
585
+ max-height: 16rem;
586
+ overflow-y: auto;
587
+ }
588
+
589
+ /* TimeGrid */
590
+ [data-rsv="timegrid"] {
591
+ display: flex;
592
+ flex-direction: column;
593
+ flex: 1 1 auto;
594
+ min-height: 0;
595
+ --rsv-tg-axis-width: 3.5rem;
596
+ }
597
+ [data-rsv="tg-header"],
598
+ [data-rsv="tg-allday"] {
599
+ display: grid;
600
+ grid-template-columns: var(--rsv-tg-axis-width) repeat(var(--rsv-tg-days, 7), minmax(0, 1fr));
601
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
602
+ }
603
+ [data-rsv="tg-col-header"] {
604
+ padding: 0.4rem 0.5rem;
605
+ text-align: center;
606
+ font-size: var(--text-rsv-sm, 0.8125rem);
607
+ color: var(--color-rsv-muted, #777);
608
+ text-transform: capitalize;
609
+ border-left: 1px solid var(--color-rsv-border, #eee);
610
+ }
611
+ [data-rsv="tg-col-header"][data-today="true"] {
612
+ color: var(--color-rsv-primary, #4f46e5);
613
+ font-weight: 600;
614
+ }
615
+ [data-rsv="tg-axis-label"],
616
+ [data-rsv="tg-allday-cell"] {
617
+ padding: 0.25rem 0.4rem;
618
+ font-size: var(--text-rsv-xs, 0.75rem);
619
+ border-left: 1px solid var(--color-rsv-border, #eee);
620
+ min-height: 1.5rem;
621
+ }
622
+ [data-rsv="tg-axis-label"] {
623
+ color: var(--color-rsv-muted, #777);
624
+ border-left: none;
625
+ text-align: right;
626
+ }
627
+ [data-rsv="tg-body"] {
628
+ display: grid;
629
+ grid-template-columns: var(--rsv-tg-axis-width) repeat(var(--rsv-tg-days, 7), minmax(0, 1fr));
630
+ overflow: auto;
631
+ /* Imprescindible para que un grid dentro de un flex column pueda encogerse
632
+ y por tanto scrollear en vez de desbordar al padre. */
633
+ flex: 1 1 auto;
634
+ min-height: 0;
635
+ align-content: start;
636
+ }
637
+ [data-rsv="tg-axis"] {
638
+ display: flex;
639
+ flex-direction: column;
640
+ }
641
+ [data-rsv="tg-slot"] {
642
+ height: var(--spacing-rsv-slot, 2.5rem);
643
+ position: relative;
644
+ border-top: 1px solid transparent;
645
+ }
646
+ [data-rsv="tg-slot"][data-major="true"] {
647
+ border-top: 1px solid var(--color-rsv-border, #eee);
648
+ }
649
+ /**
650
+ * La etiqueta va centrada en su franja, no montada sobre la línea superior.
651
+ *
652
+ * Antes se subía con `top: -0.6em` y se le pintaba detrás un rectángulo opaco
653
+ * de `--color-rsv-bg` para tapar la línea que cruzaba el texto. Ese rectángulo
654
+ * asumía que el fondo real del eje era exactamente `--color-rsv-bg`, y se veía
655
+ * como una mancha en cuanto algo lo teñía (día actual, `surface`, franjas no
656
+ * laborables, o un token sobreescrito por la app).
657
+ *
658
+ * Centrada no cruza ningún borde, así que el rectángulo sobra y el problema
659
+ * desaparece en vez de taparse.
660
+ */
661
+ [data-rsv="tg-slot-label"] {
662
+ position: absolute;
663
+ top: 50%;
664
+ transform: translateY(-50%);
665
+ right: 0.35rem;
666
+ font-size: var(--text-rsv-xs, 0.75rem);
667
+ color: var(--color-rsv-muted, #777);
668
+ }
669
+ [data-rsv="tg-col"] {
670
+ position: relative;
671
+ border-left: 1px solid var(--color-rsv-border, #eee);
672
+ background-image: repeating-linear-gradient(
673
+ var(--color-rsv-bg, #fff) 0,
674
+ var(--color-rsv-bg, #fff) calc(var(--spacing-rsv-slot, 2.5rem) - 1px),
675
+ var(--color-rsv-border, #eee) calc(var(--spacing-rsv-slot, 2.5rem) - 1px),
676
+ var(--color-rsv-border, #eee) var(--spacing-rsv-slot, 2.5rem)
677
+ );
678
+ }
679
+ [data-rsv="tg-col"][data-today="true"] {
680
+ background-color: var(--color-rsv-today, #eef);
681
+ }
682
+ [data-rsv="tg-col"] [data-rsv="event"] {
683
+ position: absolute;
684
+ background: var(--rsv-event-bg, var(--color-rsv-event-1));
685
+ color: var(--rsv-event-fg, #fff);
686
+ border-radius: var(--radius-rsv-event, 0.375rem);
687
+ padding: 0.1rem 0.3rem;
688
+ font-size: var(--text-rsv-xs, 0.75rem);
689
+ overflow: hidden;
690
+ box-sizing: border-box;
691
+ /* `borderColor` del evento si lo hay; si no, un tono del propio fondo. */
692
+ border: 1px solid
693
+ var(--rsv-event-border, color-mix(in oklch, var(--rsv-event-bg) 80%, black));
694
+ align-items: stretch;
695
+ white-space: normal;
696
+ }
697
+
698
+ /* Fantasma del rango que se esta seleccionando (`selectMirror`). */
699
+ [data-rsv="select-mirror"] {
700
+ position: absolute;
701
+ left: 0;
702
+ right: 0;
703
+ background: var(--color-rsv-selection, #e8e8ff);
704
+ border: 1px dashed var(--color-rsv-primary, #4f46e5);
705
+ border-radius: var(--radius-rsv-event, 0.375rem);
706
+ opacity: 0.7;
707
+ pointer-events: none;
708
+ z-index: 4;
709
+ }
710
+ [data-rsv="tg-nonbusiness"] {
711
+ position: absolute;
712
+ left: 0;
713
+ right: 0;
714
+ background: var(--color-rsv-nonbusiness, #f4f4f5);
715
+ opacity: 0.6;
716
+ pointer-events: none;
717
+ }
718
+ [data-rsv="resize-handle"] {
719
+ position: absolute;
720
+ left: 0;
721
+ right: 0;
722
+ bottom: 0;
723
+ height: 6px;
724
+ cursor: ns-resize;
725
+ z-index: 1;
726
+ }
727
+ [data-rsv="resize-handle"][data-edge="start"] {
728
+ top: 0;
729
+ bottom: auto;
730
+ }
731
+ [data-rsv="now-indicator"] {
732
+ position: absolute;
733
+ left: 0;
734
+ right: 0;
735
+ height: 0;
736
+ border-top: 2px solid var(--color-rsv-now, #e11);
737
+ z-index: 5;
738
+ }
739
+ [data-rsv="now-indicator"]::before {
740
+ content: "";
741
+ position: absolute;
742
+ left: -4px;
743
+ top: -4px;
744
+ width: 8px;
745
+ height: 8px;
746
+ border-radius: 999px;
747
+ background: var(--color-rsv-now, #e11);
748
+ }
749
+
750
+ /* List */
751
+ [data-rsv="list"] {
752
+ display: flex;
753
+ flex-direction: column;
754
+ }
755
+ [data-rsv="list-day-header"] {
756
+ display: flex;
757
+ align-items: baseline;
758
+ justify-content: space-between;
759
+ gap: 0.5rem;
760
+ position: sticky;
761
+ top: 0;
762
+ padding: 0.4rem 0.75rem;
763
+ background: var(--color-rsv-surface, #fafafa);
764
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
765
+ font-size: var(--text-rsv-sm, 0.8125rem);
766
+ font-weight: 600;
767
+ text-transform: capitalize;
768
+ color: var(--color-rsv-muted, #555);
769
+ }
770
+ [data-rsv="list-day"][data-today="true"] [data-rsv="list-day-header"] {
771
+ color: var(--color-rsv-primary, #4f46e5);
772
+ }
773
+ [data-rsv="list-day-side-text"] {
774
+ font-weight: 400;
775
+ font-size: var(--text-rsv-xs, 0.75rem);
776
+ color: var(--color-rsv-muted, #777);
777
+ }
778
+ [data-rsv="list-item"] {
779
+ display: flex;
780
+ align-items: center;
781
+ gap: 0.6rem;
782
+ padding: 0.5rem 0.75rem;
783
+ border-bottom: 1px solid var(--color-rsv-border, #eee);
784
+ cursor: pointer;
785
+ }
786
+ [data-rsv="list-item"]:hover {
787
+ background: var(--color-rsv-surface, #fafafa);
788
+ }
789
+ [data-rsv="list-item"]:focus-visible {
790
+ outline: 2px solid var(--color-rsv-primary, #4f46e5);
791
+ outline-offset: -2px;
792
+ }
793
+ [data-rsv="list-item-time"] {
794
+ flex: none;
795
+ width: 5rem;
796
+ font-size: var(--text-rsv-sm, 0.8125rem);
797
+ color: var(--color-rsv-muted, #777);
798
+ font-variant-numeric: tabular-nums;
799
+ }
800
+ [data-rsv="list-item-dot"] {
801
+ flex: none;
802
+ width: 0.6rem;
803
+ height: 0.6rem;
804
+ border-radius: 999px;
805
+ background: var(--rsv-event-bg, var(--color-rsv-event-1));
806
+ }
807
+ [data-rsv="list-empty"] {
808
+ padding: 2rem;
809
+ text-align: center;
810
+ color: var(--color-rsv-muted, #999);
811
+ }
812
+
813
+ /* MultiMonth (vista de año) */
814
+ [data-rsv="multimonth"] {
815
+ display: grid;
816
+ grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
817
+ gap: 1rem;
818
+ padding: 1rem;
819
+ overflow: auto;
820
+ }
821
+ [data-rsv="mm-month"] {
822
+ border: 1px solid var(--color-rsv-border, #e5e5e5);
823
+ border-radius: var(--radius-rsv, 0.5rem);
824
+ overflow: hidden;
825
+ }
826
+ [data-rsv="mm-title"] {
827
+ padding: 0.4rem 0.6rem;
828
+ font-weight: 600;
829
+ text-transform: capitalize;
830
+ background: var(--color-rsv-surface, #fafafa);
831
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
832
+ }
833
+ [data-rsv="mm-month"] [data-rsv="day"] {
834
+ min-height: 2.2rem;
835
+ }
836
+ [data-rsv="mm-month"] [data-rsv="event"] {
837
+ display: none; /* en vista compacta solo se marcan los días con eventos */
838
+ }
839
+ [data-rsv="mm-month"] [data-rsv="day"]:has([data-rsv="event"]) [data-rsv="day-number"] {
840
+ font-weight: 700;
841
+ color: var(--color-rsv-primary, #fff);
842
+ }
843
+
844
+ /* Timeline */
845
+ [data-rsv="timeline"] {
846
+ overflow: auto;
847
+ }
848
+ [data-rsv="tl-axis"] {
849
+ position: relative;
850
+ height: 1.6rem;
851
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
852
+ }
853
+ [data-rsv="tl-slot"] {
854
+ position: absolute;
855
+ top: 0;
856
+ transform: translateX(-50%);
857
+ font-size: var(--text-rsv-xs, 0.75rem);
858
+ color: var(--color-rsv-muted, #777);
859
+ padding: 0.2rem 0;
860
+ border-inline-start: 1px solid var(--color-rsv-border, #eee);
861
+ padding-inline-start: 0.25rem;
862
+ }
863
+ [data-rsv="tl-body"] {
864
+ position: relative;
865
+ background-image: repeating-linear-gradient(
866
+ to right,
867
+ transparent 0,
868
+ transparent calc(100% / 24 - 1px),
869
+ var(--color-rsv-border, #f0f0f0) calc(100% / 24 - 1px),
870
+ var(--color-rsv-border, #f0f0f0) calc(100% / 24)
871
+ );
872
+ }
873
+ [data-rsv="timeline"] [data-rsv="event"],
874
+ [data-rsv="resource-lane"] [data-rsv="event"] {
875
+ position: absolute;
876
+ display: flex;
877
+ align-items: center;
878
+ padding: 0 0.35rem;
879
+ font-size: var(--text-rsv-xs, 0.75rem);
880
+ border-radius: var(--radius-rsv-event, 0.375rem);
881
+ background: var(--rsv-event-bg, var(--color-rsv-event-1));
882
+ color: var(--rsv-event-fg, #fff);
883
+ overflow: hidden;
884
+ white-space: nowrap;
885
+ cursor: pointer;
886
+ box-sizing: border-box;
887
+ }
888
+
889
+ /* Resource timeline (Scheduler) */
890
+ [data-rsv="resource-timeline"] {
891
+ --rsv-resource-area-width: 12rem;
892
+ display: flex;
893
+ flex-direction: column;
894
+ overflow: auto;
895
+ }
896
+ [data-rsv="rt-header"],
897
+ [data-rsv="resource-row"] {
898
+ display: grid;
899
+ grid-template-columns: var(--rsv-resource-area-width) 1fr;
900
+ }
901
+ [data-rsv="rt-header"] {
902
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
903
+ position: sticky;
904
+ top: 0;
905
+ background: var(--color-rsv-bg, #fff);
906
+ z-index: 2;
907
+ }
908
+ [data-rsv="resource-area-header"] {
909
+ padding: 0.3rem 0.5rem;
910
+ font-weight: 600;
911
+ font-size: var(--text-rsv-sm, 0.8125rem);
912
+ border-inline-end: 1px solid var(--color-rsv-border, #e5e5e5);
913
+ }
914
+ [data-rsv="resource-label"] {
915
+ display: flex;
916
+ align-items: center;
917
+ gap: 0.3rem;
918
+ padding: 0.3rem 0.5rem;
919
+ border-inline-end: 1px solid var(--color-rsv-border, #e5e5e5);
920
+ border-bottom: 1px solid var(--color-rsv-border, #eee);
921
+ font-size: var(--text-rsv-sm, 0.8125rem);
922
+ }
923
+ [data-rsv="resource-toggle"] {
924
+ appearance: none;
925
+ border: none;
926
+ background: none;
927
+ cursor: pointer;
928
+ color: var(--color-rsv-muted, #777);
929
+ font-size: 0.7rem;
930
+ padding: 0 0.2rem;
931
+ }
932
+ [data-rsv="resource-lane"] {
933
+ position: relative;
934
+ border-bottom: 1px solid var(--color-rsv-border, #eee);
935
+ }
936
+
937
+ /* Resource day-grid (recursos como columnas) */
938
+ [data-rsv="resource-daygrid"] {
939
+ display: flex;
940
+ flex-direction: column;
941
+ overflow: auto;
942
+ }
943
+ [data-rsv="rdg-header"],
944
+ [data-rsv="rdg-body"] {
945
+ display: grid;
946
+ grid-template-columns: repeat(var(--rsv-rdg-cols, 1), minmax(0, 1fr));
947
+ }
948
+ [data-rsv="rdg-header"] {
949
+ border-bottom: 1px solid var(--color-rsv-border, #e5e5e5);
950
+ }
951
+ [data-rsv="rdg-col-header"] {
952
+ padding: 0.4rem 0.5rem;
953
+ text-align: center;
954
+ font-size: var(--text-rsv-sm, 0.8125rem);
955
+ font-weight: 600;
956
+ border-inline-start: 1px solid var(--color-rsv-border, #eee);
957
+ }
958
+ [data-rsv="rdg-col"] {
959
+ min-height: 6rem;
960
+ padding: 0.25rem;
961
+ display: flex;
962
+ flex-direction: column;
963
+ gap: var(--spacing-rsv-gutter, 0.25rem);
964
+ border-inline-start: 1px solid var(--color-rsv-border, #eee);
965
+ }
966
+ [data-rsv="rdg-col"] [data-rsv="event"] {
967
+ background: var(--rsv-event-bg, var(--color-rsv-event-1));
968
+ color: var(--rsv-event-fg, #fff);
969
+ border-radius: var(--radius-rsv-event, 0.375rem);
970
+ padding: 0.1rem 0.35rem;
971
+ font-size: var(--text-rsv-xs, 0.75rem);
972
+ cursor: pointer;
973
+ }
974
+
975
+ /* Vista mensual con recursos como columnas anidadas por día. */
976
+ [data-rsv="resource-daygrid-month"] {
977
+ display: flex;
978
+ flex-direction: column;
979
+ }
980
+ [data-rsv="rdgm-week"] {
981
+ display: grid;
982
+ grid-template-columns: repeat(var(--rsv-rdgm-cols, 7), minmax(0, 1fr));
983
+ }
984
+ [data-rsv="rdgm-week"] [data-rsv="day"]:last-child {
985
+ border-right: none;
986
+ }
987
+ [data-rsv="rdgm-columns"] {
988
+ display: flex;
989
+ flex-direction: column;
990
+ gap: 0.2rem;
991
+ overflow: hidden;
992
+ }
993
+ [data-rsv="rdgm-col"] {
994
+ display: flex;
995
+ flex-direction: column;
996
+ gap: 0.1rem;
997
+ border-inline-start: 2px solid var(--color-rsv-border, #eee);
998
+ padding-inline-start: 0.2rem;
999
+ }
1000
+ [data-rsv="rdgm-col-label"] {
1001
+ font-size: 0.65rem;
1002
+ font-weight: 600;
1003
+ color: var(--color-rsv-muted, #777);
1004
+ text-transform: uppercase;
1005
+ letter-spacing: 0.02em;
1006
+ }
1007
+ [data-rsv="rdgm-col"] [data-rsv="event"] {
1008
+ background: var(--rsv-event-bg, var(--color-rsv-event-1));
1009
+ color: var(--rsv-event-fg, #fff);
1010
+ border-radius: var(--radius-rsv-event, 0.375rem);
1011
+ padding: 0.05rem 0.3rem;
1012
+ font-size: var(--text-rsv-xs, 0.75rem);
1013
+ cursor: pointer;
1014
+ overflow: hidden;
1015
+ white-space: nowrap;
1016
+ text-overflow: ellipsis;
1017
+ }
1018
+ [data-rsv="rdgm-more"] {
1019
+ font-size: 0.65rem;
1020
+ color: var(--color-rsv-muted, #777);
1021
+ cursor: pointer;
1022
+ }
1023
+
1024
+ /* Eventos de fondo (display: background) */
1025
+ [data-rsv="event"][data-display="background"] {
1026
+ opacity: 0.25;
1027
+ border: none;
1028
+ box-shadow: none;
1029
+ pointer-events: none;
1030
+ }
1031
+ [data-rsv="event"][data-display="background"]::before {
1032
+ display: none;
1033
+ }
1034
+
1035
+ /* Nav links (números y cabeceras de día clicables) */
1036
+ [data-nav-link="true"] {
1037
+ cursor: pointer;
1038
+ }
1039
+ [data-nav-link="true"]:hover {
1040
+ color: var(--color-rsv-primary, #4f46e5);
1041
+ text-decoration: underline;
1042
+ }
1043
+
1044
+ /* RTL */
1045
+ [data-rsv="root"][dir="rtl"] {
1046
+ direction: rtl;
1047
+ }
1048
+
1049
+ @media (prefers-reduced-motion: reduce) {
1050
+ [data-rsv="button"] {
1051
+ transition: none;
1052
+ }
1053
+ }
1054
+
1055
+ /* ───────────────────────── Responsive ───────────────────────── */
1056
+
1057
+ /* Tablet (≤768px): la toolbar se reparte en filas; la navegación baja a su
1058
+ propia línea centrada, dejando arriba el slot de inicio y el botón Añadir. */
1059
+ @media (max-width: 768px) {
1060
+ [data-rsv="toolbar"] {
1061
+ flex-wrap: wrap;
1062
+ row-gap: 0.5rem;
1063
+ }
1064
+ [data-rsv="toolbar-section"][data-rsv-area="start"] {
1065
+ order: 1;
1066
+ }
1067
+ [data-rsv="toolbar-section"][data-rsv-area="end"] {
1068
+ order: 2;
1069
+ margin-inline-start: auto;
1070
+ }
1071
+ [data-rsv="toolbar-section"][data-rsv-area="nav"] {
1072
+ order: 3;
1073
+ flex: 1 1 100%;
1074
+ justify-content: center;
1075
+ }
1076
+ }
1077
+
1078
+ /* Móvil (≤640px): pestañas de vista en scroll horizontal (no en varias filas),
1079
+ título flexible y datepicker que nunca desborda la pantalla. */
1080
+ @media (max-width: 640px) {
1081
+ [data-rsv="toolbar"] {
1082
+ padding: 0.5rem;
1083
+ }
1084
+ [data-rsv="title"] {
1085
+ min-width: 0;
1086
+ }
1087
+ [data-rsv="toolbar-views"] {
1088
+ flex-wrap: nowrap;
1089
+ overflow-x: auto;
1090
+ scrollbar-width: thin;
1091
+ -webkit-overflow-scrolling: touch;
1092
+ }
1093
+ [data-rsv="view-tab"] {
1094
+ flex: 0 0 auto;
1095
+ }
1096
+ [data-rsv="datepicker"] {
1097
+ min-width: min(15rem, calc(100vw - 1.5rem));
1098
+ max-width: calc(100vw - 1.5rem);
1099
+ }
1100
+ [data-rsv="day"] {
1101
+ min-height: 4rem;
1102
+ }
1103
+ [data-rsv="event"] {
1104
+ font-size: 0.7rem;
1105
+ }
1106
+ }
1107
+
1108
+ /* Móvil pequeño (≤420px): controles de navegación y rejilla del datepicker
1109
+ un punto más compactos. */
1110
+ @media (max-width: 420px) {
1111
+ [data-rsv="toolbar-section"][data-rsv-area="nav"] [data-rsv="button"] {
1112
+ padding: 0.3rem 0.45rem;
1113
+ }
1114
+ [data-rsv="day"] {
1115
+ min-height: 3.25rem;
1116
+ }
1117
+ }
1118
+