/* ======================================================================
   08. FAB-AND-TAG-SURFACES
   FAB dashboardu a celoobrazovkova plocha tagov

   Poradie suborov v index.html je zavazne -- kaskada od neho zavisi.
   ====================================================================== */

/* ======================================================================
   28. [HOME/QWICK]  dashboard-fab-scroll-fade
   Dashboard FAB fade-on-scroll visual state
   ====================================================================== */
/* During native dashboard scrolling the + pill fades away quickly but smoothly.
   Keep transform untouched so this is independent from the existing qwick-add animation. */
#fab.dashboard-scroll-fading{
  opacity:0;
  pointer-events:none;
  transition:transform .34s cubic-bezier(.32,.72,.35,1),var(--qwick-fade-out),box-shadow .2s ease-out;
}
@media (prefers-reduced-motion:reduce){
  #fab.dashboard-scroll-fading{transition-duration:.01ms;}
}

/* ======================================================================
   29. [HOME/QWICK]  qwick-dashboard-fab-width
   Dashboard FAB width + related UI fixes
   ====================================================================== */
/* Dashboard +: narrower only; height remains the existing 70px. */
.qwick-surface #fab.fab{width:120px;}

/* Explicitna spatna strana skryvania +: z scale(.1)/0 spat na plnu velkost.
   Ziva rola qwick-fab-scope zachovava specificitu voci starsim #fab
   pravidlam a zaroven pripaja zaklad k rovnakemu FAB kontraktu ako modul. */
#fab.fab.qwick-fab-scope:not(.fab-hide){
  transform:translateX(-50%) scale(var(--tap-scale,1));
  opacity:1!important;
  pointer-events:auto;
  z-index:60;
  transition:transform .34s cubic-bezier(.32,.72,.35,1),
             var(--qwick-fade-in),
             box-shadow .2s ease-out!important;
}
/* FARBA TLACIDLA NEMA PRECHOD -- OKREM DOSADNUTIA.
   Tlacidlo QWICK je jedno pre celu aplikaciu, takze pri prechode medzi
   plochami meni identitu. Farbu mu pocas tahu zapisuje kazdy snimok
   (`scripts/22-qwick-module-crossfade.js` ju miesa tym istym `progress`
   ako priehladnost a rozostrenie), a prechod by ju za prstom iba
   onenskoroval. Pri DOSADNUTI sa vsak dobehne cely zvysok cesty naraz --
   a to musi doplavat, nie preskocit, aby farba dosadla spolu s plochou.
   Preto sa prechod zapina vylucne na `qwick-module-settling` a jeho
   trvanie sedi s dosadnutim ploch (340 ms v tom istom skripte).

   Pravidlo stoji TU, a nie v zdroji materialu, lebo `transition` tlacidla
   vlastni pravidlo o par riadkov vyssie a vlastni ho s `!important`.
   Prebit sa da len odtialto; `styles/21-control-material.css` `!important`
   nepouziva a nesmie. */
body.qwick-module-settling #fab.fab.qwick-fab-scope:not(.fab-hide){
  transition:transform .34s cubic-bezier(.32,.72,.35,1),
             var(--qwick-fade-in),
             box-shadow .2s ease-out,
             color .34s cubic-bezier(.22,1,.36,1),
             border-color .34s cubic-bezier(.22,1,.36,1),
             background-color .34s cubic-bezier(.22,1,.36,1)!important;
}
/* Datum v detaile zaznamu sa necita -- je to hodnota, nie ovladaci prvok.
   Vypln a okraj mu prepisuje material ovladaciho prvku
   (`styles/21-control-material.css`), aby material ostal jednym zdrojom;
   tu ostava iba stlmeny text, tien pola a to, ze sa neda stlacit. */
.qwick-surface :is(#entryOverlay.move-detail-mode,.qwick-record-detail-mode) .date-control{
  color:var(--muted);
  cursor:default;
}
.qwick-surface :is(#entryOverlay.move-detail-mode,.qwick-record-detail-mode) .date-control > span{
  color:var(--muted);
  -webkit-text-fill-color:var(--muted);
}

/* ======================================================================
   30. [MIXED]  qwick-keyboard-sheet-date-tag
   Keyboard, sheet, date-control, and tag fixes spanning both
   screens
   ====================================================================== */
/* Every registered date control has one value-colour rule:
   today = white; any other selected date = the existing QWICK blue. */
.qwick-surface [data-date-picker-input] > span{
  color:var(--ice);
  -webkit-text-fill-color:var(--ice);
}
.qwick-surface [data-date-picker-input].is-today-date > span{
  color:var(--text);
  -webkit-text-fill-color:var(--text);
}
.qwick-surface .tag-editor-overlay .sheet-fixed-head::before{display:none!important;}
.qwick-surface .tag-editor-overlay #tagsTitle{
  top:auto;
  margin:0 14px;
  line-height:normal;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  transform:none;
  transition:none;
}
.qwick-surface .tag-editor-overlay #tagSettingsBlock{
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:none;
  touch-action:pan-y;
}

/* ======================================================================
   31. [HOME/QWICK]  qwick-moves-tags-fullscreen-actions
   Tags overlay fullscreen actions + header fixes
   ====================================================================== */
/* Tags + Settings use a full-screen interaction carrier only. The carrier
   must stay visually invisible: no sheet surface, edge, radius or backdrop.
   It still owns the slide/drag gesture and dismissal geometry. */
.qwick-surface .tag-editor-overlay > .tags-fullscreen-sheet{
  display:flex;
  flex-direction:column;
  gap:0;
  height:calc(var(--app-viewport-height,100dvh) - env(safe-area-inset-top,0px) - 8px);
  max-height:calc(var(--app-viewport-height,100dvh) - env(safe-area-inset-top,0px) - 8px);
  min-height:0;
  padding:0;
  overflow:hidden;
  box-sizing:border-box;
  border-radius:0;
  box-shadow:none;
}
/* There is deliberately no header container. This is just a normal title in
   the sheet content. Settings/Trips reparent it into their own scroll surface. */
.qwick-surface .tag-editor-overlay .tags-standalone-title{
  position:relative;
  flex:0 0 auto;
  width:auto;
  height:auto;
  min-height:0;
  max-height:none;
  margin:18px 14px 12px;
  padding:0;
  box-sizing:border-box;
  display:block;
  line-height:1.08;
  background:transparent;
  border-radius:0;
  box-shadow:none;
  overflow:visible;
  transform:none;
  transition:none;
  will-change:auto;
}
.qwick-surface .tag-editor-overlay #tagSettingsBlock > .tags-standalone-title{
  margin:4px 0 18px!important;
}
.qwick-surface .tag-editor-overlay .tags-legacy-header-control{display:none;}
.qwick-surface .tag-editor-overlay #tagSettingsBlock{
  flex:1 1 auto;
  min-height:0;
  box-sizing:border-box;
}
.qwick-surface .tag-editor-overlay #tagSettingsBlock:not([hidden]){
  display:flex!important;
  flex-direction:column!important;
}
.qwick-surface .tag-editor-overlay #tagSettingsBlock[hidden],
.qwick-surface .tag-editor-overlay #tagSettingsMainView[hidden]{display:none;}
.qwick-surface .tag-editor-overlay #tagSettingsMainView:not([hidden]){
  display:flex;
  flex-direction:column;
  flex:1 0 auto;
  min-height:100%;
  box-sizing:border-box;
}
.qwick-surface .tag-editor-overlay #moveDeleteSection{
  margin-top:auto;
  margin-bottom:0;
  flex:0 0 auto;
}

/* Detail a uprava pohybu aj jazdy nesu jednu rolu a rovnaku hlavicku. */
.qwick-surface .qwick-record-detail-overlay > .sheet{
  padding-top:8px;
}
.qwick-surface .qwick-record-detail-overlay .sheet-head{
  min-height:52px;
  margin-top:0;
  padding-top:6px;
  padding-bottom:6px;
  align-items:center;
  position:relative;
}
.qwick-surface .qwick-record-detail-overlay .sheet-head > .sheet-title{
  top:0;
  margin-top:0;
  margin-bottom:0;
  line-height:1;
  align-self:center;
}

/* Vlastné obdobie: rovnaký horný odsadok a riadok s názvom ako ostatné
   sheety.

   Komentár tu roky tvrdil "shared verbatim by both screens" -- lenže
   selektor bol viazaný na #customOverlay, teda na ID jednej plochy.
   Sheet vlastného obdobia v module (#tripsCustomOverlay) má rovnaké
   značky, ale tieto tri pravidlá nikdy nedostal. Rovnaká chyba ako pri
   zaoblení štítu: ROLA, nie ID. */
.qwick-surface .qwick-custom-period-scope > .sheet{
  padding-top:8px;
}
.qwick-surface .qwick-custom-period-scope .sheet-head{
  min-height:52px;
  margin:0;
  padding:6px 3px;
  align-items:center;
}
.qwick-surface .qwick-custom-period-scope .sheet-title{
  top:0;
  margin:0;
  line-height:1;
  align-self:center;
}

/* ======================================================================
   32. [HOME/QWICK]  qwick-ui-refinements
   Rate/commission sheet header geometry refinements
   ====================================================================== */

/* One placeholder language across QWICK.
   Amount placeholders deliberately keep their current independent styling. */
.qwick-surface input:not(#amount):not(#qwickEntryAmount)::placeholder{
  color:var(--muted);
  -webkit-text-fill-color:var(--muted);
  opacity:.78;
  font-family:inherit;
  font-size:16px;
  font-weight:750;
  font-style:normal;
  letter-spacing:normal;
}

/* ======================================================================
   33. [HOME/QWICK]  qwick-move-tag-outline
   Selected tag outline clipping fix
   ====================================================================== */

/* ======================================================================
   34. [HOME/QWICK]  qwick-fab-hold-morph-fix
   Qwick FAB hold-to-morph interaction fix
   ====================================================================== */
/* Hold+glide keeps the finger physically down on + while the hold opens.
   The global press-feedback therefore leaves #fab.is-pressed active at the
   same time as .fab-hide. Its later transform rule used to win and keep the
   + at scale(.96), suppressing the original shrink part of the morph.
   Once the chooser is open, .fab-hide must own the whole visual state even
   while the source finger is still down: shrink + fade in the same 0.34 s
   choreography as the normal tap path. */
body.fab-choice-open:not(.modal-open) #homeFabLayer > #fab.fab-hide,
body.fab-choice-open:not(.modal-open) #homeFabLayer > #fab.fab-hide.is-pressed{
  transform:translateX(-50%) scale(.1);
  opacity:0;
  pointer-events:none;
  transition:transform .34s cubic-bezier(.32,.72,.35,1),
             var(--qwick-fade-out),
             box-shadow .2s ease-out;
}
