/* The 2026-11 look refresh — files. Every rule starts with body.rf (see refresh-base.css). */

/* «קבצים» = option 1 «כמו בתכנון» + strip «fb5» (approved 11-10):
   - the summary on top is a grey capsule like the tabs; «ייבוא תיקייה» in teal
   - each kind is a white card; its header is like «סרטונים» on the shots screen
     (name, plain count, actions as teal text, no divider)
   - the files sit on ONE grey surface as white soft cards; empty = dashed white frame
   - under each file a thin grey capsule: «✨ AI» in teal text, the other actions as
     icons, «מחיקה» alone at the far end after a thin line.
   Scoped to .files-panel so the project-load skeleton (utils.js) keeps its look. */

/* ── the summary row ─────────────────────────────────────────────────────── */
body.rf .files-panel .files-top-row {
  margin: 0 0 -4px;
  padding: 0 4px 0 0;
}

body.rf .files-panel .files-jump-nav {
  flex: 0 1 auto;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--rf-grey);
}

body.rf .files-panel .files-jump-sep {
  display: none;
}

body.rf .files-panel .files-jump-btn {
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
}

body.rf .files-panel .files-jump-btn:hover {
  background: var(--rf-card);
  color: var(--text);
}

body.rf .files-panel .files-jump-btn.is-active {
  background: var(--rf-card);
  color: var(--text);
  box-shadow: var(--rf-raise);
}

body.rf .files-panel .files-jump-count {
  font-size: inherit;
  font-weight: 500;
  color: var(--text-3);
  opacity: 1;
}

body.rf .files-panel .folder-import-pick {
  gap: 5px;
  padding: 4px;
  color: var(--accent);
  font-weight: 600;
}

body.rf .files-panel .folder-import-pick svg {
  width: 13px;
  height: 13px;
}

body.rf .files-panel .folder-import-pick:hover,
body.rf .files-panel .folder-import-pick:focus-visible {
  background: transparent;
  color: var(--accent-hover);
}

/* ── each kind: a white card ─────────────────────────────────────────────── */
body.rf .files-panel .files-section {
  padding: 14px 16px 16px;
  border: 0;
  border-radius: 16px;
  background: var(--rf-card);
  box-shadow: var(--rf-shadow);
}

body.rf .files-panel .files-section.is-drop-over {
  outline: 1.5px dashed var(--accent);
  outline-offset: -1.5px;
  background: color-mix(in srgb, var(--accent) 5%, var(--rf-card));
}

body.rf .files-panel .files-section.is-jump-flash {
  animation: rf-files-jump-flash 0.7s ease;
}

@keyframes rf-files-jump-flash {
  0%,
  100% {
    box-shadow: var(--rf-shadow);
  }
  40% {
    box-shadow:
      0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent),
      var(--rf-shadow);
  }
}

/* header like «סרטונים»: no divider, plain count, teal text actions */
body.rf .files-panel .files-section-head {
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: 0;
}

body.rf .files-panel .files-section-head.files-section-head--collapsed {
  margin-bottom: 0;
}

body.rf .files-panel .files-section-toggle {
  gap: 8px;
}

body.rf .files-panel .files-section-caret {
  color: var(--text-muted);
}

body.rf .files-panel .files-section-title {
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
}

body.rf .files-panel .files-section-count {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}

body.rf .files-panel .files-section-actions {
  align-items: center;
  gap: 14px;
}

body.rf .files-panel .files-section-actions > .btn {
  gap: 5px;
  height: auto;
  padding: 2px 0;
  border: 0;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

body.rf .files-panel .files-section-actions > .btn:hover:not(:disabled) {
  background: none;
  color: var(--accent-hover);
}

body.rf .files-panel .files-section-actions > .btn svg {
  width: 13px;
  height: 13px;
}

/* ── one grey surface inside, white things on it ─────────────────────────── */
body.rf .files-panel .files-section-body {
  padding: 10px;
  border-radius: 14px;
  background: var(--rf-grey);
}

body.rf .files-panel .files-library-body {
  gap: 12px;
}

body.rf .files-panel .files-empty {
  padding: 18px;
  border: 1.5px dashed var(--rf-line-2);
  border-radius: 12px;
  background: var(--rf-card);
  color: var(--text-3);
  font-size: 12.5px;
}

body.rf .files-panel .files-export-sub {
  padding: 0 4px;
}

body.rf .files-panel .files-export-sub:empty {
  display: none;
}

/* folder filters + folder groups (folder imports) on the grey */
body.rf .files-panel .files-folder-chip {
  border-color: transparent;
  background: var(--rf-card);
}

body.rf .files-panel .files-folder-chip.is-active {
  border-color: transparent;
  background: var(--rf-card);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

body.rf .files-panel .files-folder-chip-count {
  background: var(--rf-grey);
}

body.rf .files-panel .files-folder-group-head {
  border-radius: 10px;
  background: var(--rf-card);
}

body.rf .files-panel .files-folder-group-head:hover {
  background: var(--rf-card);
  box-shadow: var(--rf-raise);
}

body.rf .files-panel .files-folder-group-count {
  background: var(--rf-grey);
}

/* ── a file: white soft card, picture inset and rounded ──────────────────── */
body.rf .files-panel .file-item {
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--rf-card);
  box-shadow: none;
}

body.rf .files-panel .file-item:hover {
  border-color: transparent;
  box-shadow: var(--rf-raise);
}

body.rf .files-panel .file-item-thumb {
  border-radius: 10px;
}

body.rf .files-panel .file-item-info {
  padding: 8px 4px 2px;
}

body.rf .files-panel .file-item-name,
body.rf .files-panel .file-item-name-input {
  font-size: 12px;
}

/* the one in the editor: white + teal ring (like «א · רך») */
body.rf .files-panel .audio-item.is-main {
  border-color: transparent;
  background: var(--rf-card);
  box-shadow: 0 0 0 1.5px var(--accent);
}

body.rf .files-panel .audio-thumb,
body.rf .files-panel .audio-item.is-main .audio-thumb {
  background: var(--rf-grey);
}

/* ── the strip under each file («fb5») ───────────────────────────────────── */
body.rf .files-panel .file-item-actions {
  justify-content: flex-start;
  gap: 2px;
  margin: 6px 2px 0;
  padding: 3px 4px;
  border-top: 0;
  border-radius: 10px;
  background: var(--rf-grey);
}

body.rf .files-panel .file-item-actions > .btn {
  gap: 4px;
  width: auto;
  height: 26px;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--text-3);
}

body.rf .files-panel .file-item-actions > .btn:hover:not(:disabled),
body.rf .files-panel .file-item-actions > .btn.is-open {
  background: var(--rf-card);
  color: var(--text);
}

body.rf .files-panel .file-item-actions > .btn svg {
  width: 14px;
  height: 14px;
}

/* «✨ AI»: the word in teal text, no coloured background */
body.rf .files-panel .file-item-actions > .files-act-ai,
body.rf .files-panel .file-item-actions > .files-act-ai:hover:not(:disabled) {
  color: var(--accent);
}

body.rf .files-panel .file-item-actions > .files-act-ai::after {
  content: "AI";
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* «מחיקה» alone at the far end, after a thin line */
body.rf .files-panel .file-item-actions > .files-act-del,
body.rf .files-panel .files-export-item .file-item-actions > .btn:last-child:not(:only-child) {
  position: relative;
  margin-inline-start: auto;
}

body.rf .files-panel .file-item-actions > .files-act-del::before,
body.rf
  .files-panel
  .files-export-item
  .file-item-actions
  > .btn:last-child:not(:only-child)::before {
  content: "";
  position: absolute;
  inset-inline-start: -1px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--rf-line-2);
}

body.rf .files-panel .file-item-actions > .files-act-del:hover:not(:disabled) {
  color: var(--red);
}

/* audio: «פס קול ראשי» keeps its place first; ON = chosen = white raised + teal */
body.rf .files-panel .file-item-actions > .files-audio-main-btn {
  margin-inline-end: 0;
}

body.rf .files-panel .file-item-actions > .files-audio-main-btn.is-active,
body.rf .files-panel .file-item-actions > .files-audio-main-btn[aria-pressed="true"],
body.rf .files-panel .file-item-actions > .files-audio-main-btn.is-active:hover,
body.rf
  .files-panel
  .file-item-actions
  > .files-audio-main-btn[aria-pressed="true"]:hover {
  background: var(--rf-card);
  box-shadow: var(--rf-raise);
  color: var(--accent);
}

/* exports: the status word sits in the strip like an icon */
body.rf .files-panel .file-item-actions > .files-export-status {
  padding: 0 8px;
}

/* phones: keep today's tighter card padding */
@media (max-width: 768px) {
  body.rf .files-panel .files-section {
    padding: 12px;
  }

  body.rf .files-panel .files-section-body {
    padding: 8px;
  }

  /* the header actions are teal words, not stretched buttons */
  body.rf .files-panel .files-section-actions {
    gap: 6px 14px;
  }

  body.rf .files-panel .files-section-actions > .btn {
    flex: 0 0 auto;
    justify-content: flex-start;
  }
}

/* ── like «הפרויקטים שלי» (the user, 11-11: «תעשה עיצוב כמו כאן גם בחלון
   קבצים») ── no big grey box inside a kind's card: every file is its own soft
   tinted card straight on the white, its buttons strip white so it still
   reads on the tint. */
body.rf .files-panel .files-section-body {
  padding: 0;
  border-radius: 0;
  background: transparent;
}
body.rf .files-panel .file-item {
  padding: 8px;
  background: var(--rf-grey);
  box-shadow: none;
}
body.rf .files-panel .file-item:hover {
  background: var(--rf-grey-2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
body.rf .files-panel .file-item-actions {
  background: var(--rf-card);
}
body.rf .files-panel .files-empty {
  border-color: transparent;
  background: var(--rf-grey);
}
/* the folder filters and folder headings were white on the grey box — now on
   the white card they take the tint */
body.rf .files-panel .files-folder-chip,
body.rf .files-panel .files-folder-group-head,
body.rf .files-panel .files-folder-group-head:hover {
  background: var(--rf-grey);
}
body.rf .files-panel .files-folder-chip.is-active {
  background: var(--rf-card);
}
body.rf .files-panel .files-folder-chip-count,
body.rf .files-panel .files-folder-group-count {
  background: var(--rf-card);
}

/* ── calmer, like «הפרויקטים שלי» (the user, 11-11: still «סלט ובלאגן בצבעים»
   in «קבצים») ── the kind's card plain white (no tint at its top); a file's
   buttons sit straight on its tinted card — no white strip — quiet grey,
   teal (or red for delete) only under the mouse; the counts plain words. (.workspace-root: stronger than refresh-colour.css,
   which is linked after this file.) */
body.rf .workspace-root .files-panel .files-section,
body.rf .workspace-root .files-panel .files-section:hover {
  background: var(--rf-card);
}
body.rf .files-panel .file-item-actions {
  margin: 4px 0 0;
  padding: 0 2px;
  background: transparent;
}
body.rf .files-panel .file-item-actions .btn,
body.rf .files-panel .file-item-actions .files-act-ai {
  background: transparent;
  color: var(--text-muted);
}
body.rf .files-panel .file-item-actions .btn:hover:not(:disabled),
body.rf .files-panel .file-item-actions .files-act-ai:hover:not(:disabled) {
  background: var(--rf-card);
  color: var(--accent);
}
body.rf .files-panel .file-item-actions .files-act-del:hover:not(:disabled) {
  color: var(--red);
}
body.rf .workspace-root .files-panel .files-jump-count,
body.rf .workspace-root .files-panel .files-section-count {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--text-3);
  font-weight: 600;
}

/* the jump bar («תמונות · סרטונים · שמע · ייצואים») with no background at all
   (the user, 11-11: «פשוט בלי רקע» — the tinted capsule sank into the tinted
   page): plain words on the page, the part you are in bold teal */
body.rf .workspace-root .files-panel .files-jump-nav {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.rf .workspace-root .files-panel .files-jump-btn,
body.rf .workspace-root .files-panel .files-jump-btn:hover {
  background: transparent;
  box-shadow: none;
}
body.rf .workspace-root .files-panel .files-jump-btn {
  color: var(--text-2);
}
body.rf .workspace-root .files-panel .files-jump-btn:hover {
  color: var(--accent);
}
body.rf .workspace-root .files-panel .files-jump-btn.is-active {
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  font-weight: 700;
}

/* (the user, 11-11) no line before «מחק» — delete keeps its place at the
   row's end, without the divider */
body.rf .files-panel .file-item-actions > .files-act-del::before,
body.rf .files-panel .files-export-item .file-item-actions > .btn:last-child:not(:only-child)::before {
  content: none;
}

/* the heads' text buttons («הוסף ממאגר», «העלה תמונות», «צור קריינות ב-AI»,
   «רענן», «ייבוא תיקייה»): a soft teal pill appears under the mouse, so it is
   clear what you are about to press (they had no hover at all) */
body.rf .workspace-root .files-panel .files-section-actions > .btn,
body.rf .workspace-root .files-panel .folder-import-pick {
  padding: 4px 8px;
  margin-inline: -8px;
  border-radius: 8px;
  transition: background-color 0.12s ease, color 0.12s ease;
}
body.rf .workspace-root .files-panel .files-section-actions > .btn:hover:not(:disabled),
body.rf .workspace-root .files-panel .files-section-actions > .btn:focus-visible,
body.rf .workspace-root .files-panel .folder-import-pick:hover,
body.rf .workspace-root .files-panel .folder-import-pick:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* the jump bar («תמונות · סרטונים · שמע · ייצואים») gets the same pill under
   the mouse as «ייבוא תיקייה» (the user, 11-11): 24px high, 8px sides, radius
   8. The 4px side margins and 3px top/bottom margins add up to the old 12px
   padding and 30px height, so no word and no row moves. */
body.rf .workspace-root .files-panel .files-jump-btn {
  height: 24px;
  margin: 3px 4px;
  padding: 0 8px;
  border-radius: 8px;
  transition: background-color 0.12s ease, color 0.12s ease;
}
body.rf .workspace-root .files-panel .files-jump-btn:hover,
body.rf .workspace-root .files-panel .files-jump-btn:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-hover);
}
