/* ======================================================================
   11. SHEETS-AND-SETTINGS
   Sheety so zaznamami, nastavenia a destruktivne ovladace

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

/* ======================================================================
   44. [HOME/QWICK]  qwick-move-card-tag-layout
   ====================================================================== */
/* Move tags are physically pinned to one identical inset on the three
   requested edges. Absolute positioning makes the geometry identical on the
   dashboard and inside the MINUS/PLUS detail sheets, regardless of grid text. */
.qwick-surface .move{
  position:relative;
  height:62px;
  min-height:62px;
  padding:var(--move-tag-edge-inset) 14px var(--move-tag-edge-inset) calc(var(--move-tag-edge-inset) + var(--move-tag-width) + 10px);
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  box-sizing:border-box;
}
/* The text beside the tag is the move note now; the tag name lives
   only inside the tag. Date remains the secondary line. */
.qwick-surface .move-note{
  font-size:14px;
  font-weight:750;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.qwick-surface .move-meta.move-meta-only{margin-top:0;}

/* ======================================================================
   45. [RECORD FORMS] Compact tag choices
   ====================================================================== */

/* Portrait-only hard fallback. The Screen Orientation API is attempted by the
   existing lock script; this unconditional landscape rule also keeps the UI in
   portrait geometry on iOS/WebKit when that API is unavailable/refused. */

/* ======================================================================
   46. [HOME/QWICK]  qwick-tag-form-pill-collapse
   [QWICK 15.14] New Tag uses Qwick Moves settled-keyboard status-pill
   reveal
   ====================================================================== */
/* Selected tag/tag in Výdavky / Príjmy uses the canonical pill-shaped
   active-row rule beside the tag-summary component above. */

/* New Tag gets the same black -> red/blue keyboard-status material and the
   same inset/height geometry as the Qwick form. It is absolute, decorative,
   aria-hidden and pointer-inert, so it cannot change focus or form height. */
.qwick-surface .tag-editor-form-panel{
  isolation:isolate;
  z-index:1;
}
.qwick-surface .tag-editor-form-panel > .tag-editor-name-input,
.qwick-surface .tag-editor-form-panel > .tag-editor-color-band{
  position:relative;
  z-index:1;
}
/* The zero-content filler element that used to be styled here is gone. It was
   a flex child, and the scroller is a flex column whose real content grows
   with flex:1 to center an empty state -- that grow just re-absorbed whatever
   height the filler asked for, so it never actually produced scroll range.
   The collapse range is now guaranteed with padding-bottom instead (see
   ensureCollapseRange in qwick-v1507-short-sheet-collapse-and-tag-pill),
   which sits outside flex distribution and cannot be reclaimed. */

/* ======================================================================
   47. [GLOBAL]  qwick-landscape-guard
   [QWICK 15.10] New Tag repair + landscape blocker without orientation
   lock
   ====================================================================== */
@media (orientation:landscape){
  html,body{
    width:100vw;
    min-width:100vw;
    max-width:100vw;
    height:100vh;
    min-height:100vh;
    max-height:100vh;
    overflow:hidden;
    transform:none;
    -webkit-transform:none;
    background:#000;
  }
  body{
    position:fixed;
    inset:0;
  }
  body > *:not(#qwickPortraitOnlyGuard){
    visibility:hidden;
    pointer-events:none;
  }
  #qwickPortraitOnlyGuard{
    display:flex;
    visibility:visible;
    pointer-events:auto;
    position:fixed;
    inset:0;
    width:100vw;
    height:100vh;
    transform:none;
    -webkit-transform:none;
    z-index:2147483647;
    background:#000;
  }
}

/* ======================================================================
   48. [HOME/QWICK]  qwick-summary-status-pill-tuning
   [QWICK 15.13] Portrait brand font, summary-tag parity, status-pill
   offsets
   ====================================================================== */
/* In the landscape blocker only the Qwick brand switches to Fredoka ExtraBold.
   The instruction copy keeps the existing Nunito treatment. Fredoka's loaded
   heaviest face is 700, which is the ExtraBold appearance used elsewhere. */
#qwickPortraitOnlyGuard .qwick-portrait-brand{
  font-family:'Fredoka','Nunito','SF Pro Text',-apple-system,BlinkMacSystemFont,sans-serif;
  font-weight:700;
}

/* Príjmy/Výdavky podľa tagov: compact copies of the real 148:70 Qwick tags.
   The tag name now lives inside the pill; the former duplicate name beside it
   is no longer rendered. */
.qwick-surface .tag-summary-row{
  grid-template-columns:72px minmax(0,1fr) 94px;
}
.qwick-surface .tag-summary-head.tag-summary-head-share-only{
  justify-content:flex-end;
}

/* ======================================================================
   49. [HOME/QWICK]  qwick-decorative-pill-geometry
   [QWICK 15.15] Decorative status-pill geometry trim
   ====================================================================== */
/* Ozdobná klávesnicová pilulka zanikla spolu s natívnou klávesnicou.
   Vlastnú klávesnicu nesie `scripts/13-qwick-keyboard.js`. */

/* ======================================================================
   50. [SHEETS/MODALS]  qwick-sheet-matte-surfaces
   ====================================================================== */
/* --card-glass-fill je v styles/00-tokens/01-semantic.css. */

/* ---- Move cards + summary container: keep their colour, matte --------
   Hlavicky a #detailScroll tu KEDYSI stali tiez -- nesli sivy nadych
   (--expandable-sheet-white), ktory ich vsak o par sto riadkov nizsie
   prepisal na priehladny, takze sa nikdy nekreslil. Zoznam sa zrusil aj
   s tokenom; material hlavicky a tela vlastni styles/15-sheet.css. */
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #tagSummary{
  background:var(--card-fill);
  box-shadow:none;
}

/* ---- 3. Moves Tags visible neutral containers: own colour, matte ------
   Vynulovane rozostrenie tu uz nestoji: garantuje ho zdielany material
   ovladacieho prvku (styles/21-control-material.css) pre vsetky tlacidla
   naraz, takze tu bol druhy zdroj tej istej hodnoty. */


/* ======================================================================
   51. [SHEETS/MODALS]  qwick-borderless-surfaces
   QWICK: borderless UI surfaces — added 2026-08-15
   ====================================================================== */
/*
   Remove visual outlines from dashboard/sheet surfaces while preserving the
   existing box geometry and all behavior.  Transparent border colours are
   intentional: they avoid 1–2 px layout shifts that border:none could cause.
*/
/* Priehladne okraje (--line, --glass-edge, --glass-field-edge) su teraz
   definovane raz, v styles/00-tokens/01-semantic.css, a bez !important:
   farebne hodnoty, ktore tento blok prebijal, su zmazane. */

/* Dashboard + shared surface cards. */
.qwick-surface .card:not(#expenseCard):not(#incomeCard),
.qwick-surface .tag-summary,
.qwick-surface .move{
  border-color:transparent;
}

/* Karty, riadky a sumárne kontajnery ostávajú bez okraja. Sheet a jeho
   hlavičku tento historický blok už nesmie prepisovať: ich spoločný povrch
   vlastní výhradne komponent styles/15-sheet.css. */
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #tagSummary{
  border-color:transparent;
  border-top-color:transparent;
  border-right-color:transparent;
  border-bottom-color:transparent;
  border-left-color:transparent;
}

/* ======================================================================
   52. [SHEETS/MODALS]  qwick-sheet-period-nav-visibility-guarantee
   ====================================================================== */
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailPeriodNav:not([hidden]){
  display:flex;
  align-items:center;
  visibility:visible;
  opacity:1;
  pointer-events:auto;
}
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailPeriodPrev,
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #detailPeriodNext{
  display:flex;
  visibility:visible;
  /* opacity is intentionally left alone here: the disabled state (at the
     newest end of a period range) still needs to dim to .28, which is
     handled by the existing .period-nav-btn:disabled rule. */
}

/* ======================================================================
   53. [SHEETS/MODALS]  qwick-data-sheets
   Professional data-sheet hierarchy — Moves / Trips / Overview
   ====================================================================== */
/* Only the three data-heavy sheets are affected. Settings, Moves Tags,
   detail/edit and keyboard forms deliberately keep their existing glass language. */

/* ---------- Shared: remove the heavy 'card header over card body' feeling.
   This one rule is now the sole, authoritative source for these three split-
   sheet headers -- it used to be six separate declarations spread across
   qwick-sheet-glass-parity, qwick-dashboard-sheet-scroll-
   system-final, qwick-glass-sheets, qwick-brand-additions,
   qwick-sheet-header-body-blur-parity-v1 and qwick-trips-sheet-periods-
   overview-monthly-portrait-v1, most of which only ever restated a value the
   next one immediately overrode again. Border width/style (1px solid) still
   comes from the very first of those (the colour is the only part any later
   rule ever touched, always to the same transparent). ---------- */

/* ---------- Všetky pohyby: total becomes the hero of the header. ---------- */
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) .detail-sheet .sheet-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:12px;
  padding-left:4px;
  padding-right:4px;
}
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) .detail-sheet .sheet-title{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  line-height:1.05;
}
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) .detail-total{
  font-size:31px;
  font-weight:900;
  letter-spacing:-1.1px;
  line-height:.95;
  text-align:right;
}
.qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) #tagSummary{
  margin:0 0 14px;
  padding:14px;
  border:0;
  /* Intentionally NOT the shared card surface. This container is meant to read
     as a lighter tint over the sheet, distinct from the move cards below
     it, so it deliberately does not follow --surface. */
  background:rgba(255,255,255,.035);
  box-shadow:none;
}

@media (max-width:370px){
  .qwick-surface :is(#detailOverlay,.qwick-record-sheet-scope) .detail-total{font-size:28px;}
}

/* ======================================================================
   54. [HOME/QWICK]  qwick-settings-and-config
   Settings + Trips configuration professional hierarchy
   ====================================================================== */
/* Moves Tags, Nastavenia and Karta Qwick Trips have no header shield at all.
   The fixed header remains only as layout space for the title/navigation text. */
/* Material tejto plochy vlastni styles/15-sheet.css -- tu ostava iba
   odsadenie, ktore je geometria, nie vzhlad. */
.qwick-surface .tag-editor-overlay #tagSettingsBlock{
  padding:14px 14px calc(env(safe-area-inset-bottom,0px) + 20px);
}
.qwick-surface .tag-editor-overlay #backupSettingsSection{
  margin-top:22px;
  padding:0 2px;
  background:transparent;
  border:0;
  box-shadow:none;
}
.qwick-surface .tag-editor-overlay #backupSettingsTitle{
  margin:0 2px 10px;
  color:var(--muted);
  font-size:10.5px;
  font-weight:850;
  letter-spacing:1.05px;
  line-height:1;
  text-transform:uppercase;
}
.qwick-surface .tag-editor-overlay .backup-settings-actions{
  width:100%;
  margin:0;
  gap:8px;
}
/* Výplň a okraj vlastní spoločný materiál ovládacieho prvku
   (`styles/21-control-material.css`). Horná hrana aj odlesk sú odstránené
   tam, takže sheet si nevytvára lokálnu výnimku. */

/* Destructive sections remain at the bottom, but do not gain an extra card shell. */
.qwick-surface .tag-editor-overlay #moveDeleteSection{
  background:transparent;
  border:0;
  box-shadow:none;
}

/* ======================================================================
   55. [HOME/QWICK]  qwick-destructive-controls
   Destructive controls parity — logo delete + settings bulk delete
   ====================================================================== */
.qwick-surface .tag-editor-overlay #moveDeleteTrigger{
  border:1.5px solid var(--qwick-delete);
  border-radius:999px;
  background:linear-gradient(165deg,
    color-mix(in srgb,var(--surface3) 68%,var(--qwick-delete) 32%),
    color-mix(in srgb,var(--surface3) 82%,var(--qwick-delete) 18%));
  color:var(--qwick-delete);
  -webkit-text-fill-color:var(--qwick-delete);
  box-shadow:none;
  text-shadow:none;
  filter:none;
  transition:transform .24s cubic-bezier(.34,1.56,.64,1),filter .16s ease,background .16s ease;
}

/* Cancel is a neutral escape action, never destructive red. */
.qwick-surface .tag-editor-overlay #moveDeleteCancel{
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  background:linear-gradient(165deg,rgba(255,255,255,.065),rgba(255,255,255,.035));
  color:rgba(235,235,242,.68);
  -webkit-text-fill-color:rgba(235,235,242,.68);
  box-shadow:none;
  text-shadow:none;
  filter:none;
  transition:transform .24s cubic-bezier(.34,1.56,.64,1),filter .16s ease,background .16s ease;
}
.qwick-surface .tag-editor-overlay #moveDeleteCancel.is-pressed,
.qwick-surface .tag-editor-overlay #moveDeleteCancel:active{
  transform:scale(.96);
  filter:brightness(1.08);
  transition:transform .08s cubic-bezier(.4,0,1,1),filter .10s ease;
}
.qwick-surface .tag-editor-overlay #moveDeleteTrigger.is-pressed,
.qwick-surface .tag-editor-overlay #moveDeleteTrigger:active{
  transform:scale(.96);
  filter:brightness(1.08);
  transition:transform .08s cubic-bezier(.4,0,1,1),filter .10s ease;
  box-shadow:none;
}

/* Both Qwick Moves Settings and Karta Qwick Trips use one drag-to-confirm
   destructive surface derived from the same red material. Geometry/gesture
   ownership are untouched. */
.qwick-surface .tag-editor-overlay #moveDeleteTrack{
  border:1.5px solid var(--qwick-delete);
  background:linear-gradient(165deg,
    color-mix(in srgb,var(--surface3) 73%,var(--qwick-delete) 27%),
    color-mix(in srgb,var(--surface3) 88%,var(--qwick-delete) 12%));
  box-shadow:none;
}
.qwick-surface .tag-editor-overlay #moveDeleteTrack::before{
  background:linear-gradient(90deg,rgba(255,51,77,.24),rgba(255,51,77,0));
}
.qwick-surface .tag-editor-overlay #moveDeleteTrack .swipe-delete-track-label{
  color:#ff6a7d;
  font-weight:800;
}
.qwick-surface .tag-editor-overlay #moveDeleteThumb{
  color:#fff;
  border:1.5px solid var(--qwick-delete);
  background:linear-gradient(165deg,
    color-mix(in srgb,var(--surface3) 52%,var(--qwick-delete) 48%),
    color-mix(in srgb,var(--surface3) 67%,var(--qwick-delete) 33%));
  box-shadow:none;
}
.qwick-surface .tag-editor-overlay #moveDeleteThumb:focus-visible{
  box-shadow:none;
}

@media(prefers-reduced-motion:reduce){
  .qwick-surface .tag-editor-overlay #moveDeleteTrigger,
  .qwick-surface .tag-editor-overlay #moveDeleteCancel{
    transition-duration:.01ms;
  }
}

/* ======================================================================
   56. [HOME/QWICK]  qwick-move-detail-amount
   Detail/edit amount weight parity with Qwick amount form
   ====================================================================== */
.qwick-surface #entryOverlay.move-detail-mode #amount,
.qwick-surface #entryOverlay.move-edit-mode #amount{
  font-weight:850;
}
