/* ======================================================================
   06. FORMS
   Formulare pohybu: polia, datumy, klavesnica

   Poradie suborov v index.html je zavazne -- kaskada od neho zavisi.
   Tento subor obsahuje povodne sekcie 20-26.
   ====================================================================== */

/* ======================================================================
   20. [HOME/QWICK]  qwick-precision-fixes
   Tag picker press-state static-position fix
   ====================================================================== */
/* Dashboard Kategórie button grows like the other small controls.
   Matches .press-up-lg.is-pressed's current effective value (1.145,
   boosted by qwick-button-cosmetics-c above) rather than its old base
   value, so it scales the same amount as periodPrev/periodNext etc. */
.qwick-surface #tagsBtn.is-pressed{--tap-scale:var(--tap-scale-press-lg);}

/* ======================================================================
   21. [MIXED]  qwick-logo-and-field-fixes
   Entry-detail and trip-detail edit/delete button press states
   ====================================================================== */
/* Entry title stays white. Amount and its placeholder are driven by the actual move type. */
.qwick-surface #entryTitle{
  color:var(--text);
}
.qwick-surface #entryOverlay[data-entry-type="expense"] #amount{
  color:var(--danger)!important;
  -webkit-text-fill-color:var(--danger);
}
.qwick-surface #entryOverlay[data-entry-type="income"] #amount{
  color:var(--mint)!important;
  -webkit-text-fill-color:var(--mint);
}
.qwick-surface #entryOverlay[data-entry-type="expense"] #amount::placeholder{
  color:rgba(255,107,107,.52);
  -webkit-text-fill-color:rgba(255,107,107,.52);
  opacity:1;
}
.qwick-surface #entryOverlay[data-entry-type="income"] #amount::placeholder{
  color:rgba(61,220,151,.52);
  -webkit-text-fill-color:rgba(61,220,151,.52);
  opacity:1;
}


/* ======================================================================
   22. [HOME/QWICK]  qwick-date-action-spacing
   Move detail date-to-action spacing
   ====================================================================== */
/* Equal spacing from Dátum to the primary action in move detail/edit. */
.qwick-surface #entryOverlay.move-detail-mode .field:has(.date-control),
.qwick-surface #entryOverlay.move-edit-mode .field:has(.date-control){
  margin-bottom:0;
}
.qwick-surface #entryOverlay .qwick-action-row{
  margin-top:16px;
}

/* ======================================================================
   23. [HOME/QWICK]  qwick-new-move-date
   Move date field unification
   ====================================================================== */
/* New expense/income: spacing only. Date/amount geometry is defined once in qwick-detail-entry-layout. */
.qwick-surface #entryOverlay:not(.move-detail-mode):not(.move-edit-mode) .field:has(.date-control){
  margin-bottom:0;
}

/* ======================================================================
   24. [HOME/QWICK]  qwick-placeholder-height
   Trip detail address field placeholder height
   ====================================================================== */
/* Move create/detail/edit: note uses the same vertical size as amount; no standalone Note/Tag labels. */
.qwick-surface #entryOverlay .entry-note-field{margin-bottom:14px;}
/* Geometria pola zaznamoveho formulara -- MOVES aj TRIPS.

   Predtym boli tie iste rozmery napisane dvakrat: raz viazane na
   `#entryOverlay .entry-note-field .input` a raz tu, s komentarom "same
   geometry as the effective Moves detail fields". Dve kopie tych istych
   48px. Dnes obe plochy nesu rolu `qwick-record-input` a plati jedno
   pravidlo. Material vlastni styles/17-field.css. */
/* Datumova pilulka zaznamoveho formulara -- MOVES aj TRIPS. Tych istych
   48px bolo predtym napisanych dvakrat: raz viazane na
   `#entryOverlay .entry-amount-date-row .date-control`, raz v module. */
.qwick-surface .qwick-record-date{
  height:48px;
  min-height:48px;
  box-sizing:border-box;
  border-radius:999px;
}
.qwick-surface .qwick-record-input{
  width:100%;
  height:48px;
  min-height:48px;
  max-height:48px;
  /* Pravy odsadok je token, aby pole, ktore nesie jednotku (KM, MIN, €), malo
     kde ju ukazat -- bez druhej deklaracie vypchavky niekde inde. */
  padding-left:14px;
  padding-right:var(--qwick-record-pad-right,14px)!important;
  box-sizing:border-box;
  border-radius:999px;
  color:var(--text);
  font-family:inherit;
  font-size:16px!important;
  font-weight:400!important;
  line-height:normal;
  outline:none;
}
.qwick-surface .qwick-record-input:disabled{
  opacity:1;
  color:inherit;
  -webkit-text-fill-color:currentColor;
  cursor:default;
}
/* Detail/edit move fields deliberately reuse the Ride detail/edit input
   material and typography. The amount keeps extra right padding only for its
   existing € suffix; everything visible about the control matches the Ride fields.
   Glass material (background/border-color/box-shadow/opacity/
   will-change) is NOT repeated here -- it's identical to, and already
   guaranteed by, the mode-unrestricted rule near qwick-glass-sheets
   below (#entryOverlay #amount/#note incl. :disabled). Border WIDTH/STYLE
   (1px solid) come from the base .input rule, unchanged by either. */
.qwick-surface #entryOverlay.move-detail-mode #note,
.qwick-surface #entryOverlay.move-edit-mode #note,
.qwick-surface #entryOverlay.move-detail-mode #amount,
.qwick-surface #entryOverlay.move-edit-mode #amount{
  width:100%;
  height:48px;
  min-height:48px;
  max-height:48px;
  box-sizing:border-box;
  border-radius:999px;
  color:var(--text);
  font-family:inherit;
  font-size:16px;
  font-weight:400;
  line-height:normal;
  outline:none;
}
.qwick-surface #entryOverlay.move-detail-mode #note,
.qwick-surface #entryOverlay.move-edit-mode #note{
  padding:0 14px;
}
.qwick-surface #entryOverlay.move-detail-mode #amount,
.qwick-surface #entryOverlay.move-edit-mode #amount{
  padding:0 44px 0 14px;
}
.qwick-surface .qwick-record-tag-field{margin-bottom:14px;}

/* ======================================================================
   25. [SHEETS/MODALS]  qwick-sheet-scroll-system
   "Final" cross-scope sheet-header/scroll system -- canonical source
   for :is(#detailOverlay,.qwick-record-sheet-scope), #exportSheet, #moreTripsSheet head+scroll
   behavior
   ====================================================================== */
.qwick-surface .moves-section > .moves-list .move{width:100%!important;margin-left:0!important;margin-right:0!important;}

.app-screen-moves{-webkit-overflow-scrolling:auto;overscroll-behavior:none;}
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailMovesList .move{width:100%;margin-left:0;margin-right:0;}

/* The Home + controls live outside the translated page plane. */
/* JEDNO TLACIDLO QWICK PRE CELU APLIKACIU.
   Vrstva uz nepatri obrazovke MOVES -- je to zdielany chrome (nesie aj
   triedu `.qwick-shared-chrome`, cez ktoru ju prelinanie ploch vynecha),
   takze musi stat NAD kazdym runtime modulu (`z-index:1500`). Preto 1600
   a nie povodnych 50: keby ostala pod nim, tlacidlo by v TRIPS zmizlo. */
#homeFabLayer{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:var(--app-viewport-height,100dvh);
  z-index:1600;
  pointer-events:none;
  opacity:1;
  transition:var(--qwick-fade-in);
}
/* Tmavy zavoj pod volbami QWICK tlacidla je PREC. Bola to jedina vec, ktoru
   `.qwick-fab-layer-scope::before` kreslila -- cierna .72 cez celu vrstvu,
   ktora sa nasadzovala cez body.fab-choice-open (zaklad) alebo
   .qwick-choices-open (modul) a zhadzovala sa tromi blur-out stavmi.
   Vsetky tri stavy su zrusene spolu s nou.

   Rola `.qwick-fab-layer-scope` ostava: nesie ju #homeFabLayer aj vrstva
   modulu a `scripts/22-qwick-module-crossfade.js` sa cez nu pyta, ci su
   volby otvorene. Je to teda znacka stavu, nie vlastnik vzhladu. */
#homeFabLayer > #fab{pointer-events:auto;}

.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailScroll.detail-empty-period{display:flex;flex-direction:column;padding-bottom:0;}
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailScroll.detail-empty-period #detailMovesList{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;}.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailScroll.detail-empty-period #detailMovesList .detail-empty-shield{flex:1 1 auto;min-height:0;padding-bottom:calc(28px + env(safe-area-inset-bottom,0px));}

@media (prefers-reduced-motion:reduce){
 /* Hlavicka detailu tu uz nie je: jej deti ziadny prechod nemaju. */
 #homeFabLayer{transition-duration:.01ms;}
}

/* ======================================================================
   26. [HOME/QWICK]  qwick-keyboard-dismiss-visual
   Qwick form keyboard-dismiss visual state
   ====================================================================== */
/* Qwick and New Ride use the same keyboard-dismiss visual language. The panel
   remains mounted for this fade; the canonical reset happens only afterwards. */
@media (prefers-reduced-motion:reduce){
}
