/* Phase-02 reskin (DEC-127): files screens. Tokens come from app.css :root.
   app/app.css keeps its own phase-01 component rules (a.frow, ul.decks, a.deck, .deckbar…) —
   this file only overrides the SHAPE those draw (padding, radius, row height, icons) to match
   the approved design; the phase-01 colours already read the new tokens and are left alone.
   Design references: blocks 11 ("File folders (Games-Library rows)") and 12 ("Ask button on a
   file"), rules .frow/.frow2/.doc/.appbar2/.post.full/.askpill, and the Files/file-view phone
   screens (S11-S14). */

/* ---------------------------------------------------------------------------------------------
   Files tab — one blurred-scene row per project (design block 11, S11). `a.frow`/`.thumb`/`.bgs`/
   `.nophoto` keep app.css's own colours and gradients; only the row's own shape, spacing and end
   cap (a chevron, missing before) are fixed here.
--------------------------------------------------------------------------------------------- */
ul.decks:has(a.frow) {
  gap: 12px; /* the design's own `.frow + .frow{margin-top:12px}`, as a list gap instead */
}
ul.decks:has(a.frow) li + li { border-top: 0; }

/* `height`, not `min-height`: the row already carries its own `style.minHeight = '44px'`
   (files.mjs, kept for the same locked-test reason as list.mjs's rows) — an explicit `height`
   sets the design's own 84px regardless, since nothing inline competes with that property. */
a.frow {
  height: 84px;
  padding: 0 16px; gap: 16px;
  border-radius: var(--r-row);
  border: 0;
}
a.frow .thumb { width: 52px; height: 52px; border-radius: 14px; }
/* "Other" (DEC-110/DEC-103): no project, so no scene — the design's own small blue placeholder
   circle (S11's last row), not the generic violet `.thumb` fallback meant for elsewhere. */
a.frow .thumb.nophoto { background: radial-gradient(circle at 30% 30%, #9DB0FF, #3346C8); }
a.frow .tx { gap: 2px; }
a.frow .tx b { font-size: 17px; }
a.frow .tx small { font-size: 13px; }
a.frow .end {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; color: rgba(255,255,255,.9);
}
/* v5 critique fix (design line ~554): a darker gradient so a light thumbnail still leaves the
   title and chevron readable — app.css still carries only the original, lighter v1 wash. */
a.frow::after {
  background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,.75) 70%);
}

/* ---------------------------------------------------------------------------------------------
   A project's own Folder (design block 11, second stage; S12) and the legacy multi-part Folder
   (`renderFolder`, app/list.mjs — same row language, unchanged screen): the design's `.list`/
   `.row` card, a `.doc` file-type tile in front of the title, a meta line, and a trailing
   chevron, in place of the plain divided rows app.css's phase-01 `a.deck` still draws.
--------------------------------------------------------------------------------------------- */
ul.decks:not(:has(a.frow)) {
  background: var(--card);
  border-radius: var(--r-card);
  overflow: hidden;
}
ul.decks:not(:has(a.frow)) li + li { border-top: 0; }
ul.decks:not(:has(a.frow)) li { position: relative; }
ul.decks:not(:has(a.frow)) li + li::before {
  content: ""; position: absolute; top: 0; left: 68px; right: 0; height: 1px; background: var(--line);
}

/* Height comes from the padding around the 48px `.doc` tile, not a `min-height` override here:
   each row already carries its own `style.minHeight = '44px'` (list.mjs, kept — a locked test
   reads the inline floor directly), and an inline style always outranks a class rule anyway. */
a.deck {
  align-items: center; gap: 12px;
  padding: 12px 16px;
}
.doc {
  width: 40px; height: 48px; border-radius: 8px;
  background: var(--card-2); flex: none; position: relative;
  display: grid; place-items: center; color: var(--text-3);
}
/* Sized directly, not through `svg.i`'s 1em rule: the folder mark (`svg.mark`, drawn with its
   own hand-picked path, not the sprite) carries no `.i` class to catch that rule at all. */
.doc svg { width: 20px; height: 20px; }

a.deck .tx, a.deck .col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
a.deck .tx .t, a.deck .col .t { font-size: 17px; font-weight: 600; }
a.deck .tx .w { display: block; font-size: 13px; color: var(--text-2); font-weight: 400; }
a.deck .end {
  flex: none; color: var(--text-3); font-size: 15px; display: flex; align-items: center;
}

/* ---------------------------------------------------------------------------------------------
   The file/deck view top bar (design's `.appbar2`/`.appbar`) and the Folder screens' own back
   strip — one slim glass bar, a back control in the accent colour with its own chevron, the
   title, and (added by app.js's attachFileMenu) a file-actions icon button.
--------------------------------------------------------------------------------------------- */
.deckbar {
  min-height: 48px; padding: 0 4px 0 8px; gap: 4px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-line);
}
.deckbar a { color: var(--accent); font-size: 15px; font-weight: 400; }
.deckbar a svg.i { font-size: 22px; margin-right: -2px; }
.deckbar .t { font-size: 15px; font-weight: 600; color: var(--text); text-align: center; }
.deckbar .t.mid { color: var(--text); }
.deckbar a.next { color: var(--accent); font-weight: 600; }

.menu-trigger { color: var(--accent); }
.menu-trigger svg.i { font-size: 22px; }

/* ---------------------------------------------------------------------------------------------
   The file actions menu (FILE-2) — Share and Copy link, each with the design's own icon
   (`#i-share`/`#i-link`) beside the label; app.css already gives the popover its glass-card look.
--------------------------------------------------------------------------------------------- */
[role="menuitem"] { display: flex; align-items: center; gap: 12px; }
[role="menuitem"] svg.i { color: var(--text-2); font-size: 18px; flex: none; }

/* ---------------------------------------------------------------------------------------------
   Ask pill on a post (design block 12, v5 flat accent) — app.css's own `.askpill` rule already
   carries the design's exact v5 numbers (flat --accent-fill, 48px, 24px radius); nothing here
   needs to differ from it.
--------------------------------------------------------------------------------------------- */

/* The "Ask needs a newer upload" note sits over the page itself, so it gets a card behind it. */
.msg.quiet.askhint { background: var(--card); color: var(--text-2); padding: 8px 12px; border-radius: var(--r-ctl); box-shadow: 0 6px 18px rgba(0,0,0,.18); font-size: 13px; }
