/* ======================================================================
   04. SHEETS
   Prekryvne panely: geometria, swipe-delete, hlavicky

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

/* ======================================================================
   10. [GLOBAL]  qwick-pill-fields
   Shared pill-shaped input/date-control geometry used by both screens
   ====================================================================== */
/* Shared pill geometry. */
.qwick-surface .input,
.qwick-surface .date-control{
  border-radius:999px;
}
.qwick-surface #entryOverlay #note::placeholder{
  color:rgba(255,180,84,.62);
  -webkit-text-fill-color:rgba(255,180,84,.62);
  opacity:1;
}

/* ======================================================================
   11. [HOME/QWICK]  qwick-detail-entry-layout
   Trip detail/entry field layout
   ====================================================================== */
/* Novy/detail/uprava pohybu: poznamka hore, kategorie v strede, suma + datum dole. */
.qwick-surface #entryOverlay .entry-amount-date-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:10px;align-items:end;}
.qwick-surface #entryOverlay .entry-amount-date-row .field{margin-bottom:0;min-width:0;}
/* Raster dvojstlpca suma+datum je vlastnostou MOVES; polomer pilulky
   nesu role .qwick-record-input / .qwick-record-date v 06-forms.css. */
.qwick-surface #entryOverlay .entry-amount-date-row .input,
.qwick-surface #entryOverlay .entry-amount-date-row .date-control{width:100%;max-width:none;margin:0;padding:0 10px;display:grid;place-items:center;}
.qwick-surface #entryOverlay .entry-amount-date-row .date-control>span{height:100%;min-height:0;display:grid;place-items:center;white-space:nowrap;}

/* ======================================================================
   12. [HOME/QWICK]  qwick-moves-layout
   Move detail overlay (:is(#detailOverlay,.qwick-record-sheet-scope)) layout, independent of
   period nav
   ====================================================================== */
.qwick-surface .moves-section > .moves-list{
  width:100%;
  margin:0;
  padding:0;
}
.qwick-surface .moves-section > .moves-list .move-wrap{
  width:100%;
  margin-left:0!important;
  margin-right:0!important;
  margin-bottom:9px;
  /* Tien tu UZ NIE JE. Nosi ho `.move-wrap` v styles/19-record-card.css,
     pretoze plati pre kazdu pilulku pohybu, nielen pre zoznam na
     dashboarde -- a v sheete ostavala karta bez tieňa, hoci material ma
     mat rovnaky. Dovod, preco tien patri obalu a nie karte, je popisany
     tam. */
}
.qwick-surface .moves-section .moves-more-hint{
  margin-top:1px;
}
/* .detail-periods .period design used to be duplicated here (matching
   values, but its own separate copy). It now falls through to the
   canonical .period/.period.active rule near the top of the stylesheet. */
/* A rounded-rect 42x36 .period-nav-btn override used to live here. It never
   actually rendered (the canonical !important rule in
   period-arrows-match-period-buttons always won regardless of source
   order), confirmed via computed-style snapshot before removing it. */
.qwick-surface .moves-section .move,
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailMovesList .move{
  touch-action:pan-y;
}
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailMovesList{
  width:100%;
  margin:0;
  padding:0;
  background:transparent;
}
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailMovesList .move-wrap,
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailMovesList .detail-empty-shield,
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #tagSummary{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  box-sizing:border-box;
}.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailMovesList .move-wrap{margin-bottom:9px;}

/* ======================================================================
   13. [MIXED]  qwick-history-header-parity
   Keeps the Home moves header and Route Log trip-history header
   visually matched
   ====================================================================== */
.qwick-surface .moves-section{grid-column:1/-1;width:100%;min-width:0;margin:0;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible;margin-top:10px;}

/* ======================================================================
   14. [SHEETS/MODALS]  qwick-period-navigation-restore
   Trip list month navigation + stacked-overlay parent restore
   ====================================================================== */
/* ZAVOJ POD OTVORENYM SHEETOM.

   Plocha za sheetom ustupuje dvoma vecami naraz: rozostrenim 10 px
   (`styles/03-controls.css`) a touto ciernou vrstvou.

   Hlbku nesie `--qwick-veil` a je to VLASTNA hodnota, nie zdielana
   s ovladacim prvkom. Zavoj a prvok stoja v obraze NAD SEBOU: prvok lezi
   na zavoji, takze cim hlbsi je zavoj, tym vacsi rozdiel prvok potrebuje,
   aby z neho nezmizol. Jedno cislo pre oboje by ich viazalo presne opacne,
   nez ich viaze obraz.

   QWICK MENU zavoj NEMA. Volby stoja nad plochou len na okamih a samy su
   z cierneho skla; zavoj pod nimi by ich zdvojil. Preto nesie zavoj prekryv
   (`.overlay`), nie `body.modal-open` -- prekryv existuje iba pre sheety
   a menu ziadny nema. Kalendar ho nema z toho isteho dovodu: jeho prekryv
   triedu `.overlay` nenesie.

   `:not(.stacked-parent)`: ked detail otvori nad zoznamom, su otvorene OBA
   prekryvy. Bez tohto by sa dve davky scitali a plocha by stmavla
   dvojnasobne. Zavoj preto vzdy kresli iba TEN prekryv, ktory je navrchu. */
.qwick-surface .overlay.open:not(.stacked-parent){
  background:var(--qwick-veil);
}

/* A parent list sheet never closes when a child detail/edit opens. It stays
   mounted at the exact same transform, expansion state and scroll position;
   only its opacity fades to zero and pointer input is suspended. Removing
   .stacked-parent fades the very same sheet back in, so there is no close/open
   lifecycle and therefore no visual or scroll reset on return.

   Zavoj rodic NENESIE. Ked dieta otvori, su otvorene OBA prekryvy, takze by
   sa dve davky tej istej hlbky scitali a plocha by pod detailom stmavla
   dvojnasobne. Nerobi sa to vynulovanim na rodicovi -- zavoj rovno vynecha
   stacked-parent (pravidlo nizsie), takze niet co prebijat. */
.qwick-surface .overlay.stacked-parent > .sheet{
  transform:translate3d(0,0,0);
  -webkit-transform:translate3d(0,0,0);
  opacity:0;
  pointer-events:none;
  transition:var(--qwick-fade-out);
  will-change:opacity;
}
.qwick-surface .overlay.open:not(.stacked-parent) > .sheet{
  transition:transform .36s cubic-bezier(.22,1,.36,1),var(--qwick-fade-in);
}
/* ======================================================================
   15. [SHEETS/MODALS]  qwick-swipe-delete-confirm
   Slide-to-confirm bulk-delete control (used by both trips and
   moves)
   ====================================================================== */
/* ============================================================
   ONE BULK-DELETE SYSTEM
   The old overscroll reveal docks and inline two-button confirmations are gone.
   Both bulk actions now use the same right-to-left swipe confirmation.
   ============================================================ */
.swipe-delete-section{
  position:relative;
  box-sizing:border-box;
  padding-top:82px; /* permanent reserve: the base button never moves when track appears */
}
.qwick-surface .settings-delete-section{
  margin:24px 0 4px;
}
.swipe-delete-section[hidden]{display:none;}
.swipe-delete-base{
  display:flex;
  align-items:center;
  justify-content:center;
  width:95%;
  height:52px;
  min-height:52px;
  margin:0 auto;
  padding:0 18px;
  border-radius:999px;
  box-sizing:border-box;
  font:800 13px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,sans-serif;
  letter-spacing:.01em;
  -webkit-appearance:none;
  appearance:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}
/* Vypln a okraj oboch nesie zdielany material ovladaciho prvku
   (`styles/21-control-material.css`) -- tint si beru z `currentColor`,
   teda z farby textu o riadok nizsie. Cervena Vymazat a neutralna
   Zrusit tak stoja na tom istom materiali ako Ulozit alebo QWICK. */
.swipe-delete-trigger{
  color:var(--danger);
}
.swipe-delete-cancel{
  color:#b8b8c2;
}
.swipe-delete-base[hidden]{display:none;}
.swipe-delete-track{
  position:absolute;
  top:0;
  left:2.5%;
  width:95%;
  height:62px;
  box-sizing:border-box;
  overflow:hidden;
  border-radius:999px;
  border:1px solid rgba(255,107,107,.30);
  background:linear-gradient(165deg,rgba(55,25,29,.94),rgba(31,25,28,.98));
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}
.swipe-delete-track[hidden]{display:none;}
.swipe-delete-track::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(255,95,103,.18),rgba(255,95,103,0));
  opacity:calc(.15 + var(--swipe-delete-progress,0) * .85);
  pointer-events:none;
}
.swipe-delete-track-label{
  position:absolute;
  inset:0 66px 0 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#c9a4a7;
  font-size:12px;
  font-weight:760;
  letter-spacing:.01em;
  white-space:nowrap;
  pointer-events:none;
}
.swipe-delete-thumb{
  position:absolute;
  top:50%;
  right:5px;
  translate:0 -50%; /* exact vertical centering inside the swipe groove; independent of drag transform */
  width:52px;
  height:52px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  color:#2a0003;
  background:linear-gradient(135deg,#ff9898 0%,#ef7474 62%,#d95f5f 100%);
  touch-action:none;
  cursor:grab;
  will-change:transform;
  z-index:2;
  outline:none;
}
.swipe-delete-thumb:active{cursor:grabbing;}
.swipe-delete-thumb:focus-visible{box-shadow:none;}
.swipe-delete-thumb span{
  /* Draw the arrow geometrically instead of relying on the font glyph's uneven side bearings. */
  display:block;
  width:11px;
  height:11px;
  box-sizing:border-box;
  border-right:3px solid currentColor;
  border-bottom:3px solid currentColor;
  transform:rotate(135deg);
  font-size:0;
  line-height:0;
}
/* Tags → Settings: while bulk move delete is armed, freeze the
   settings sheet completely. Only the confirmation section owns drag/swipe;
   the Cancel button inside it remains tappable so the lock can always be left. */
body.move-delete-swipe-active #movesTagsOverlay,
body.move-delete-swipe-active #movesTagsOverlay .sheet,
body.move-delete-swipe-active #movesTagsOverlay #tagSettingsBlock{
  overflow:hidden;
  overscroll-behavior:none;
  touch-action:none;
}
body.move-delete-swipe-active #movesTagsOverlay #moveDeleteSection{
  touch-action:none;
}
@media (prefers-reduced-motion:reduce){
  .swipe-delete-thumb{transition-duration:.01ms;}
}

/* ======================================================================
   16. [SHEETS/MODALS]  qwick-sheet-blur-shields
   Cross-scope sheet content blur shields + edit/back button geometry
   ====================================================================== */
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailMovesList .detail-empty-shield{box-sizing:border-box;margin:0;padding:30px 12px;text-align:center;color:var(--muted);font-size:13px;border-bottom:0;}
/* ======================================================================
   17. [SHEETS/MODALS]  qwick-sheet-glass-parity
   Cross-scope sheet glass-blur backgrounds and scroll-shield geometry
   ====================================================================== */
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #tagSummary{margin-top:0;margin-bottom:12px;border-radius:30px;}

/* Empty copy remains part of the common glass instead of becoming a separate
   card; only the tag summary gets its own inner shield. */
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailMovesList .detail-empty-shield{
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}

/* ======================================================================
   18. [GLOBAL]  qwick-global-native-scrollbar-hide
   Hides native scrollbars app-wide
   ====================================================================== */
/* Native scroll physics stay untouched; only every browser scrollbar/indicator is hidden. */
html, body, *{
  scrollbar-width:none;
  -ms-overflow-style:none;
}
*::-webkit-scrollbar,
*::-webkit-scrollbar:horizontal,
*::-webkit-scrollbar:vertical{
  width:0;
  height:0;
  display:none;
  background:transparent;
  -webkit-appearance:none;
}
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-corner{
  background:transparent;
  border:0;
  box-shadow:none;
}
