/* === PATCH v6.2 // folder rows fixed from clean v5.7 === */

/*
  Do not move the right labels anymore.
  The row itself becomes full width.
  The text columns keep v5.7 placement.
  The hover and line are painted on the full row only.
*/

.folder-list {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.folder-row {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;

  display: grid !important;
  grid-template-columns: 22px minmax(180px, .58fr) minmax(520px, 1.9fr) 86px !important;
  column-gap: 12px !important;

  padding: 6px 8px 6px 0 !important;
  margin: 0 !important;

  position: relative !important;
  border-bottom: none !important;
  background: transparent !important;
  overflow: hidden !important;
}

/* wipe old pseudo-lines from earlier broken attempts */
.folder-row::before,
.folder-row::after {
  content: none !important;
}

/* full-width dotted line inside the row, never outside the row */
.folder-row {
  background-image: repeating-linear-gradient(
    to right,
    rgba(255,255,255,.13) 0 1px,
    transparent 1px 4px
  ) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 1px !important;
  background-position: 0 100% !important;
}

/* hover/selected: full row highlight reaches right labels and stays clipped */
.folder-row:hover,
.folder-row.active,
.folder-row.selected {
  color: var(--accent-bright) !important;
  background-image:
    linear-gradient(rgba(47,116,255,.14), rgba(47,116,255,.14)),
    repeating-linear-gradient(
      to right,
      rgba(255,255,255,.16) 0 1px,
      transparent 1px 4px
    ) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-size: 100% 100%, 100% 1px !important;
  background-position: 0 0, 0 100% !important;
}

/* text placement from the working version */
.folder-row .ico {
  justify-self: start !important;
  text-align: left !important;
}

.folder-row .name {
  justify-self: start !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.folder-row .meta {
  justify-self: stretch !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.folder-row .size {
  justify-self: end !important;
  text-align: right !important;
  min-width: 86px !important;
  white-space: nowrap !important;
}

/* keep all text above row background */
.folder-row > * {
  position: relative !important;
  z-index: 1 !important;
}

.folder-row:hover .ico,
.folder-row:hover .name,
.folder-row:hover .meta,
.folder-row:hover .size,
.folder-row.active .ico,
.folder-row.active .name,
.folder-row.active .meta,
.folder-row.active .size,
.folder-row.selected .ico,
.folder-row.selected .name,
.folder-row.selected .meta,
.folder-row.selected .size {
  color: var(--accent-bright) !important;
}

/* safety: terminal clips only accidental visual overflow, not content columns */
.terminal,
.terminal-body {
  overflow: visible !important;
}


/* === PATCH v6.3 // HARD ROLLBACK folder text/rows to v5.7 === */

/* kill every later folder-row experiment */
.folder-list {
  margin-top: 14px !important;
  font-family: var(--mono) !important;
  font-size: 12px !important;
  border-top: 1px dotted var(--line) !important;
  padding-top: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  position: static !important;
}

.folder-row {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto auto !important;
  gap: 16px !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  cursor: url("../../refs/New-Cursor-Finger.png") 8 1, pointer !important;
  border-bottom: 1px dotted var(--line-soft) !important;
  transition: all .15s !important;
  color: var(--text) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  background-image: none !important;
  overflow: visible !important;
  position: relative !important;
}

/* remove all pseudo-lines from later broken versions */
.folder-row::before,
.folder-row::after {
  content: none !important;
  display: none !important;
}

/* v5.7-ish hover */
.folder-row:hover,
.folder-row.active,
.folder-row.selected {
  color: var(--accent-bright) !important;
  background: rgba(90,146,255,.08) !important;
  padding-left: 6px !important;
}

/* reset child alignment to simple original grid */
.folder-row > * {
  position: static !important;
  z-index: auto !important;
}

.folder-row .ico {
  justify-self: start !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.folder-row .name {
  justify-self: start !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.folder-row .meta {
  justify-self: end !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.folder-row .size {
  justify-self: end !important;
  text-align: right !important;
  min-width: auto !important;
  white-space: nowrap !important;
}

.folder-row:hover .ico,
.folder-row:hover .name,
.folder-row:hover .meta,
.folder-row:hover .size {
  color: var(--accent-bright) !important;
}

/* restore terminal clipping to pre-line-chaos behavior */
.terminal,
.terminal-body {
  overflow: visible !important;
}


/* === DYNAMIC MANIFEST SAFE v1 // counts only, no page hijack === */
.folder-row .size.dynamic-loaded {
  color: var(--accent-bright) !important;
}
.folder-row.dynamic-count-flash {
  animation: dynamic-count-flash .35s steps(2);
}
@keyframes dynamic-count-flash {
  0% { filter: brightness(1.45); }
  100% { filter: none; }
}


