/* War FTP Daemon and BulletProof FTP (apps/ftp). */

.ftp-app {
  font: 11px var(--ui-font);
}

/* ---------------------------------------------------------------- menu bar */

.ftp-menubar {
  position: absolute;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 1px;
}

.ftp-mitem {
  padding: 2px 6px 0;
  line-height: 14px;
}

.ftp-mitem:hover {
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilite);
}

.ftp-mitem.open {
  box-shadow: inset -1px -1px var(--hilite), inset 1px 1px var(--shadow);
  padding: 3px 5px 0 7px;
}

/* ----------------------------------------------------------------- toolbar */

.ftp-toolbar {
  position: absolute;
  display: flex;
  align-items: center;
  padding: 0 3px;
  gap: 1px;
  box-shadow: inset 0 1px var(--shadow), inset 0 2px var(--hilite), inset 0 -1px var(--shadow), inset 0 -2px var(--hilite);
}

.ftp-tbtn {
  position: relative;
  height: 24px;
  min-width: 25px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--face);
  border: none;
  font: 11px var(--ui-font);
}

.ftp-tbtn:hover:not(:disabled) {
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilite);
}

.ftp-tbtn:active:not(:disabled),
.ftp-tbtn.pressed {
  box-shadow: inset -1px -1px var(--hilite), inset 1px 1px var(--shadow);
}

.ftp-tbtn:active:not(:disabled) canvas {
  transform: translate(1px, 1px);
}

.ftp-tbtn:disabled canvas {
  filter: grayscale(1) opacity(0.45);
}

.ftp-tsep {
  width: 2px;
  height: 20px;
  margin: 0 3px;
  box-shadow: inset 1px 0 var(--shadow), inset -1px 0 var(--hilite);
}

/* -------------------------------------------------------------- status bar */

.ftp-status {
  position: absolute;
  display: flex;
  gap: 2px;
  padding: 2px 0 0;
}

.ftp-spanel {
  height: 18px;
  line-height: 16px;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset -1px -1px var(--hilite), inset 1px 1px var(--shadow);
}

/* --------------------------------------------------------------- combo box */

.ftp-combo {
  position: absolute;
  font: 11px var(--ui-font);
  background: var(--window);
  border: none;
  border-radius: 0;
  box-shadow: inset -1px -1px var(--hilite), inset 1px 1px var(--shadow), inset -2px -2px var(--light), inset 2px 2px var(--dark);
  padding: 0 2px;
}

.ftp-path {
  box-shadow: inset -1px -1px var(--hilite), inset 1px 1px var(--shadow);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-left: 4px;
}

/* --------------------------------------------------------------- list view */

.ftp-lv {
  position: absolute;
  background: var(--window);
  box-shadow: inset -1px -1px var(--hilite), inset 1px 1px var(--shadow), inset -2px -2px var(--light), inset 2px 2px var(--dark);
  padding: 2px;
  display: flex;
  flex-direction: column;
  outline: none;
}

.ftp-lvhead {
  display: flex;
  flex: none;
  height: 17px;
  overflow: hidden;
  background: var(--face);
}

.ftp-lvh {
  flex: none;
  height: 17px;
  line-height: 15px;
  padding: 0 5px;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: inset -1px -1px var(--dark), inset 1px 1px var(--hilite), inset -2px -2px var(--shadow);
}

.ftp-lvh:active {
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--shadow);
  padding: 1px 4px 0 6px;
}

.ftp-lvh.right,
.ftp-lvc.right {
  text-align: right;
}

.ftp-lvbody {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  font: 11px var(--ui-font);
}

.ftp-lvrow {
  display: flex;
  height: 17px;
  line-height: 17px;
  white-space: nowrap;
}

.ftp-lvc {
  flex: none;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 3px;
}

.ftp-lvc.right {
  justify-content: flex-end;
}

.ftp-lvc > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ftp-lvicon {
  width: 16px;
  height: 16px;
  flex: none;
}

.ftp-lvrow.sel .ftp-lvc:first-child > span {
  background: var(--select);
  color: #fff;
  padding: 0 1px;
}

.ftp-lv:focus .ftp-lvrow.sel .ftp-lvc:first-child > span {
  outline: 1px dotted #ffff80;
  outline-offset: -1px;
}

.ftp-lvrow.sel .ftp-lvicon {
  filter: sepia(1) hue-rotate(190deg) saturate(4) brightness(0.6);
}

/* progress bars in list cells */

.ftp-bar {
  position: relative;
  width: 100%;
  height: 13px;
  background: var(--window);
  box-shadow: inset -1px -1px var(--hilite), inset 1px 1px var(--shadow);
}

.ftp-barfill {
  position: absolute;
  left: 1px;
  top: 1px;
  bottom: 1px;
  max-width: calc(100% - 2px);
  background: repeating-linear-gradient(90deg, var(--select) 0 7px, transparent 7px 9px);
}

.ftp-bartext {
  position: absolute;
  inset: 0;
  line-height: 13px;
  text-align: center;
  mix-blend-mode: difference;
  color: #fff;
}

/* --------------------------------------------------------------------- log */

.ftp-log .rtext {
  font: 11px 'Courier New', Courier, monospace;
  line-height: 13px;
  white-space: pre-wrap;
}

.log-cmd {
  color: #000080;
}

.log-reply {
  color: #006000;
}

.log-info {
  color: #800080;
}

.log-conn {
  color: #0000ff;
}

.log-xfer {
  color: #008080;
}

.log-error {
  color: #ff0000;
}

.log-link {
  color: #000;
  font-weight: bold;
}
