/* ---- copy-link column ---- */

.copy-icon,
.copy-spacer {
  display: inline-block;
  width: 22px;
  margin-left: 2px;
  margin-right: 8px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
}

.copy-icon {
  color: #999;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.copy-icon:hover { color: #2563eb; }

/* whole cell is the click target */
.copy-cell { cursor: pointer; }
.copy-cell:hover { background-color: #f5f9ff; }
.copy-cell:hover .copy-icon { color: #2563eb; }

/* floating tooltip, appended to <body> */
#copyTip {
  position: fixed;
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  transform: translateX(-50%);
  z-index: 2000;
}

#copyTip.show { opacity: 1; }

/* ---- name column: never truncate ---- */

#files .data-table { table-layout: auto; }

#filesTable td:first-child,
#files .data-table thead th:first-child {
  white-space: nowrap;      /* keep the name on one line... */
  overflow: visible;        /* ...but let it size the column */
  text-overflow: clip;
  width: 1%;                /* shrink-to-fit under table-layout:auto */
}

/* ---- toolbar date drill-down ---- */
#filesMonth, #filesDay, #filesHour {
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  background: white;
}

#filesMonth:focus, #filesDay:focus, #filesHour:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* ---- filter mode: plain = local, blue = applied on the server ---- */

.remote-filter {
  border: 1px solid #2563eb;
  background: #eff6ff;
}

/* ---- table alignment: name left, everything else centered ---- */

#files .data-table th,
#files .data-table td {
  text-align: center;
  vertical-align: middle;
}

#files .data-table thead th:first-child,
#filesTable td:first-child {
  text-align: left;
}

/* ---- optional Time column (3rd), hidden unless buildFilesView({time:true}) ---- */

#files.no-time .data-table thead th:nth-child(3),
#files.no-time #filesTable td:nth-child(3) {
  display: none;
}

/* ---- sort committed to the server (whole folder), not just this page ---- */

#files .data-table thead th.remote-sort {
  color: #bfdbfe;
  text-decoration: underline;
}

/* ---- run as (super only) ---- */

#runAs {
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  background: white;
}
