/* ============================================================
   VIDRIO (GLASS) · SHEETS, DROPDOWNS AND DIALOGS (2.8.83): idea “1b · Glass over mist”
   ============================================================
   The panel (every sheet's and the Settings one), the «¿Borrar…?» dialog and the dropdowns (also a task's menu and
   its days panel, the calendar and the time wheel) are made of the same glass as the boxes, a bit lighter.
   When a panel or a dialog opens, the photo behind is blurred all over, without darkening. Inside: translucent fields
   with the label above, capsule buttons, the bin in a circle and the title's icon in an olive circle.
   Hangs from html.glass. 2.8.105: also the feedback sheet (#fbOverlay, with «Lo que has enviado»), with its own rules
   at the end. The bell's list doesn't: it belongs to its section.
   2.8.89: at night, even with the light theme, it goes dark like the rest of the app (html.gl-night, see glass.css).
   New tokens carry the name: --vd-fichas-*.
   Detail in docs/design.md, “Sheets, dropdowns and dialogs in glass”. */

/* ---------- the tokens ---------- */
html.glass{
  --vd-fichas-hoja:rgba(255,255,255,.66);--vd-fichas-pop:rgba(255,255,255,.80);--vd-fichas-blur:blur(30px) saturate(1.7);
  --vd-fichas-filo:rgba(255,255,255,.72);--vd-fichas-brillo:rgba(255,255,255,.95);
  --vd-fichas-campo:rgba(255,255,255,.62);--vd-fichas-campo-borde:rgba(26,22,17,.11);--vd-fichas-anillo:rgba(138,169,120,.30);
  --vd-fichas-niebla:rgba(255,255,255,.06);--vd-fichas-sel:rgba(138,169,120,.26);--vd-fichas-encima:rgba(26,22,17,.06);
  --vd-fichas-sombra:0 20px 60px rgba(8,12,10,.16);--vd-fichas-sombra-pop:0 30px 80px rgba(8,12,10,.30),0 2px 10px rgba(8,12,10,.10)}
:is(:root[data-theme="dark"].glass,html.glass.gl-night){
  --vd-fichas-hoja:rgba(18,22,20,.62);--vd-fichas-pop:rgba(18,22,20,.74);--vd-fichas-blur:blur(30px) saturate(1.5);
  --vd-fichas-filo:rgba(255,255,255,.14);--vd-fichas-brillo:rgba(255,255,255,.22);
  --vd-fichas-campo:rgba(255,255,255,.075);--vd-fichas-campo-borde:rgba(255,255,255,.13);--vd-fichas-anillo:rgba(157,190,134,.26);
  --vd-fichas-niebla:rgba(0,0,0,.12);--vd-fichas-sel:rgba(157,190,134,.22);--vd-fichas-encima:rgba(255,255,255,.07);
  --vd-fichas-sombra:0 20px 60px rgba(0,0,0,.35);--vd-fichas-sombra-pop:0 18px 50px rgba(0,0,0,.5)}

/* ---------- behind the panel and the dialog: the photo blurred all over, not darkened ----------
   The blur goes on a layer of its own: if it were on the layer that holds the panel, the panel's glass would no longer
   see the photo */
html.glass :is(#sheetOverlay,#fbOverlay,#dlgOverlay).open{background:transparent}
html.glass :is(#sheetOverlay,#fbOverlay,#dlgOverlay).open::before{content:"";position:absolute;inset:0;background:var(--vd-fichas-niebla);
  -webkit-backdrop-filter:blur(24px) saturate(1.3);backdrop-filter:blur(24px) saturate(1.3);animation:fichasNiebla .22s ease both}
html.glass :is(#sheetBox,#fbBox,#dlgBox){position:relative}
@keyframes fichasNiebla{from{opacity:0}to{opacity:1}}
@keyframes fichasVentana{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@keyframes fichasAviso{from{opacity:0;transform:scale(1.06)}to{opacity:1;transform:none}}

/* ---------- the material: the panel, the dialog and the dropdowns ---------- */
html.glass :is(#sheetBox,#fbBox,#dlgBox,#pkPop:not(:has(.notices-list)),#pkSub){
  -webkit-backdrop-filter:var(--vd-fichas-blur);backdrop-filter:var(--vd-fichas-blur);border:0;
  /* inside, translucent lines and backgrounds instead of the beiges; in dark, white text */
  --bg:var(--vd-fichas-campo);--surface-2:rgba(26,22,17,.05);--border:rgba(26,22,17,.12);--border-soft:rgba(26,22,17,.08);--track:rgba(26,22,17,.10);--ctrl:rgba(26,22,17,.16)}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) :is(#sheetBox,#fbBox,#dlgBox,#pkPop:not(:has(.notices-list)),#pkSub){
  --text:#fff;--muted:rgba(255,255,255,.76);--faint:rgba(255,255,255,.6);--surface:rgba(255,255,255,.08);--surface-2:rgba(255,255,255,.07);
  --border:rgba(255,255,255,.14);--border-soft:rgba(255,255,255,.10);--track:rgba(255,255,255,.14);--ctrl:rgba(255,255,255,.24)}
html.glass :is(#sheetBox,#fbBox,#dlgBox){background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,0) 32%),var(--vd-fichas-hoja);
  box-shadow:inset 0 0 0 1px var(--vd-fichas-filo),inset 0 1px 0 var(--vd-fichas-brillo),var(--vd-fichas-sombra)}
html.glass :is(#pkPop:not(:has(.notices-list)),#pkSub){background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,0) 32%),var(--vd-fichas-pop);
  box-shadow:inset 0 0 0 1px var(--vd-fichas-filo),inset 0 1px 0 var(--vd-fichas-brillo),var(--vd-fichas-sombra-pop)}

/* ---------- the panel: slides up from the bottom on the iPhone (26 corners on top); on desktop, centred like a window ---------- */
html.glass :is(#sheetBox,#fbBox){border-radius:26px 26px 0 0;padding:22px 20px calc(22px + env(safe-area-inset-bottom))}
@media(min-width:680px){html.glass :is(#sheetBox,#fbBox){border-radius:26px;padding:24px 24px 22px;animation:fichasVentana .24s cubic-bezier(.2,.8,.2,1)}}
/* the title, a bit larger, with its icon in an olive circle (like the review's) */
html.glass :is(#sheetBox,#fbBox) h3{font-size:19px;gap:11px;margin:0 0 18px;letter-spacing:-.01em}
html.glass #sheetBox h3.set-h3{gap:4px}   /* Settings, inside a section: the back arrow sits right against the title */
html.glass :is(#sheetBox,#fbBox) h3 > .glyph{box-sizing:content-box;width:16px;height:16px;padding:7px;border-radius:50%;background:var(--olive-fill);color:var(--on-olive);text-shadow:var(--on-olive-sombra);font-size:16px}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) :is(#sheetBox,#fbBox) h3 > .glyph{color:#17191A}
html.glass #sheetBox h3 .sheet-copy{border-radius:50%}
@media(hover:hover){html.glass #sheetBox h3 .sheet-copy:hover{background:var(--vd-fichas-encima)}}

/* ---------- the fields: translucent, no beige, with the label flush with the text ---------- */
html.glass :is(#sheetBox,#fbBox) .f-row{margin-bottom:14px}
html.glass :is(#sheetBox,#fbBox) .f-row label{font-size:12.5px;font-weight:600;letter-spacing:0;color:var(--muted);margin:0 0 6px 15px}
html.glass #sheetBox .switch-row{padding-left:15px}   /* «Todo el día» (All day), flush with the labels */
html.glass :is(#sheetBox,#fbBox) :is(.f-row input[type=text],.f-row input[type=number],.f-row input[type=url],.f-row textarea,.pk-field){
  background:var(--vd-fichas-campo);border:0;box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde);border-radius:15px;padding:12px 15px;transition:box-shadow .15s}
html.glass :is(#sheetBox,#fbBox) :is(.f-row input,.f-row textarea):focus,html.glass #sheetBox .pk-field.pk-open{box-shadow:inset 0 0 0 1.5px var(--olive-soft),0 0 0 4px var(--vd-fichas-anillo)}
@media(hover:hover){html.glass #sheetBox .pk-field:hover{box-shadow:inset 0 0 0 1px var(--olive-soft)}}
/* the «Importante» switch, centred with the field next to it; the knob, always white */
html.glass #sheetBox .f-2col > .f-row:has(.sw){display:flex;flex-direction:column}
html.glass #sheetBox .f-2col > .f-row > div:has(> .sw){flex:1;height:auto!important}
html.glass #sheetBox .sw::after{background:#fff}
/* a goal's «Nueva tarea…» box and what the date reader marks while typing */
html.glass #sheetBox .add-box input{background:var(--vd-fichas-campo);border-color:transparent;box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde)}
html.glass #sheetBox .add-box input:not(:placeholder-shown){box-shadow:inset 0 0 0 1.5px var(--olive-soft)}
html.glass #sheetBox .fx-chip{background:var(--vd-fichas-sel)}
html.glass #sheetBox .fx-m{background:rgba(138,169,120,.36)}
/* 2.8.93: the notice of an event that clashes with another, shaped like the fields and with an amber veil instead of
   the beige; at night, the dark theme's amber */
html.glass #sheetBox .ev-overlap{border-radius:15px;padding:11px 15px;background:rgba(154,107,30,.13);box-shadow:inset 0 0 0 1px rgba(154,107,30,.20)}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) #sheetBox .ev-overlap{background:rgba(217,164,65,.14);box-shadow:inset 0 0 0 1px rgba(217,164,65,.22)}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) #sheetBox .ev-overlap > .glyph{color:#D9A441}

/* ---------- the buttons: capsules; the bin, a circle ---------- */
html.glass :is(#sheetBox,#fbBox,#dlgBox) .btn{border-radius:999px;padding:14px 18px;font-size:15px}
html.glass :is(#sheetBox,#fbBox,#dlgBox) .btn.primary{box-shadow:inset 0 1px 0 rgba(255,255,255,.2)}
html.glass :is(#sheetBox,#fbBox,#dlgBox) .btn.ghost{background:var(--vd-fichas-campo);color:var(--text);border:0;box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde)}
html.glass :is(#sheetBox,#dlgBox) .btn.danger{background:rgba(176,73,47,.13)}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) :is(#sheetBox,#dlgBox) .btn.danger{background:rgba(217,140,115,.16)}
html.glass :is(#sheetBox,#fbBox) .f-actions{gap:10px;margin-top:20px}
html.glass #sheetBox .f-actions .btn.danger{flex:0 0 49px!important;width:49px;height:49px;padding:0!important;border-radius:50%;display:grid;place-items:center}
/* 2.9.2: the round bin is for the icon-only button; «Borrar la cuenta» has words, so it stays a capsule. 2.10.24: the same
   for the code sheet's red button (two-step.js, «Borrar la cuenta» after the email code) */
html.glass #sheetBox .f-actions .btn.danger:is(.account-delete,.two-step-save){flex:1 1 auto!important;width:auto;height:auto;padding:14px 18px!important;border-radius:999px;display:inline-flex;align-items:center;justify-content:center}
html.glass :is(#sheetBox,#fbBox) .mini{border:0;border-radius:999px;padding:7px 14px;background:var(--vd-fichas-campo);box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde);color:var(--text)}
html.glass #sheetBox .mini.olive{background:var(--olive-fill);box-shadow:none;color:var(--on-olive);text-shadow:var(--on-olive-sombra)}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) #sheetBox .mini.olive{color:#17191A}
html.glass #sheetBox .daypick button{border:0;border-radius:999px;background:var(--vd-fichas-campo);box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde)}
html.glass #sheetBox .daypick button.on{background:var(--olive-fill);box-shadow:none}
/* on a narrow iPhone, the buttons at the bottom always on one line */
@media(max-width:430px){html.glass :is(#sheetBox,#fbBox) .f-actions .btn{flex:1 1 auto;white-space:nowrap;padding-left:12px;padding-right:12px}}

/* ---------- the «¿Borrar…?» dialog: centred box, buttons one below the other ---------- */
html.glass #dlgBox{border-radius:26px;padding:24px 20px 18px;animation:fichasAviso .2s ease}
html.glass #dlgBox h4{font-size:17px;margin-bottom:6px}
html.glass #dlgBox p{font-size:14px;margin-bottom:18px}
html.glass #dlgBox .btn{margin-bottom:9px}

/* ---------- the dropdowns and a task's menu (what's open, in neutral: never in green) ---------- */
html.glass #pkPop:not(:has(.notices-list)){border-radius:22px;padding:8px}
html.glass #pkSub{border-radius:17px;padding:6px}
/* the title in normal case (not uppercase), like the section titles */
html.glass :is(#pkPop:not(:has(.notices-list)),#pkSub) .pk-h{font-family:var(--font-body);font-size:12.5px;font-weight:600;text-transform:none;letter-spacing:0;color:var(--muted);margin:6px 10px 6px}
html.glass :is(#pkPop:not(:has(.notices-list)),#pkSub) .pk-opt{border-radius:14px;padding:10px 11px}
html.glass #pkSub .pk-opt{border-radius:11px;padding:8px 9px}   /* the days panel, tighter than its menu (rows of 35 against 46): the usual feel */
@media(hover:hover){html.glass :is(#pkPop:not(:has(.notices-list)),#pkSub) .pk-opt:hover{background:var(--vd-fichas-encima)}}
html.glass :is(#pkPop:not(:has(.notices-list)),#pkSub) .pk-opt.sel{background:var(--vd-fichas-sel)}
html.glass #pkPop .pk-opt.expanded{background:var(--vd-fichas-encima)}
/* the calendar: round days; several days, in translucent light olive */
html.glass #pkPop .pk-cnav{border:0;border-radius:50%;background:var(--vd-fichas-campo);box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde)}
html.glass #pkPop .pk-day{border-radius:50%}
@media(hover:hover){html.glass #pkPop .pk-cmon-btn:hover{background:var(--vd-fichas-encima)}}   /* 2.10.16: the month's title */
html.glass #pkPop .pk-day.pk-in,html.glass #pkPop .pk-day.pk-in:hover:not(:disabled){background:var(--vd-fichas-sel);border-radius:9px}
html.glass #pkPop .pk-actions button{border:0;border-radius:999px;background:var(--vd-fichas-campo);box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde)}
html.glass #pkPop .pk-actions button.go{background:var(--olive-fill);box-shadow:none}
/* the time wheel: the centre band, as a capsule */
html.glass #pkPop .pk-tband{background:var(--vd-fichas-sel);border:0;opacity:1;border-radius:999px}

/* ---------- 2.8.105: the feedback sheet (S1, “Like the sheets”) ----------
   The panel, the title, the fields and the buttons are the ones above. Here, its own: the four types in glass tiles
   (the chosen one, olive), the screenshot, the «Lo que has enviado» row and that list, with its messages */
html.glass #fbBox .fb-intro{margin:-8px 2px 16px}
html.glass #fbBox .fb-note{margin:2px 15px 0}
html.glass #fbBox .fb-types{gap:8px}
html.glass #fbBox .fb-types button{border:0;border-radius:16px;padding:12px 4px 10px;background:var(--vd-fichas-campo);box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde);color:var(--text);transition:background .12s,box-shadow .12s}
@media(hover:hover){html.glass #fbBox .fb-types button:not(.on):hover{box-shadow:inset 0 0 0 1px var(--olive-soft)}}
html.glass #fbBox .fb-types button .glyph{color:var(--olive)}
html.glass #fbBox .fb-types button.on{background:var(--olive-fill);box-shadow:none;color:var(--on-olive);text-shadow:var(--on-olive-sombra)}
html.glass #fbBox .fb-types button.on .glyph{color:inherit}
:is(:root[data-theme="dark"].glass,html.glass.gl-night) #fbBox .fb-types button.on{color:#17191A}
html.glass #fbBox .fb-add-img{padding:9px 15px}
html.glass #fbBox .fb-img img{border:0;border-radius:15px;outline:1px solid var(--vd-fichas-campo-borde);outline-offset:-1px}
html.glass #fbBox .fb-img .del{border:0;border-radius:50%;background:var(--vd-fichas-pop);-webkit-backdrop-filter:var(--vd-fichas-blur);backdrop-filter:var(--vd-fichas-blur);
  box-shadow:inset 0 0 0 1px var(--vd-fichas-filo),0 4px 14px rgba(0,0,0,.18)}
/* «Lo que has enviado ›»: a glass row, like a field, with the number in a badge */
html.glass #fbBox .sent-link{margin-top:16px;padding:13px 15px;border:0;border-radius:15px;background:var(--vd-fichas-campo);box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde)}
html.glass #fbBox .sent-n{min-width:22px;padding:2px 7px;border-radius:999px;background:var(--vd-fichas-sel);color:var(--text);text-align:center}
/* the notice of a new message, above the form */
html.glass #fbBox .msg-notice-form{border:0;border-radius:15px;background:var(--vd-fichas-sel);box-shadow:inset 0 0 0 1px var(--olive-soft)}
/* the list: the back link in a capsule and the feedback items in a translucent box */
html.glass #fbBox .sent-back{display:inline-flex;align-items:center;gap:4px;margin:0 0 12px;padding:7px 13px 7px 8px;border-radius:999px;
  background:var(--vd-fichas-campo);box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde);color:var(--muted);font-size:13px;font-weight:600}
html.glass #fbBox .sent-list{background:var(--vd-fichas-campo);border:0;border-radius:18px;box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde);overflow:hidden}
html.glass #fbBox .sent-row.open{background:var(--vd-fichas-encima)}
html.glass #fbBox .sent-step-dot{background:transparent}
html.glass #fbBox .sent-img img{border:0;border-radius:15px}
html.glass #fbBox .msg-m.theirs .msg-bubble{background:var(--vd-fichas-campo);border:0;box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde)}
html.glass #fbBox .msg-m.mine .msg-bubble{background:var(--vd-fichas-sel)}
html.glass #fbBox .msg-box{border:0;border-radius:15px;background:var(--vd-fichas-campo);box-shadow:inset 0 0 0 1px var(--vd-fichas-campo-borde);transition:box-shadow .15s}
html.glass #fbBox .msg-box:focus-within{box-shadow:inset 0 0 0 1.5px var(--olive-soft),0 0 0 4px var(--vd-fichas-anillo)}
