/* Connection → FTP servers (docs/05-views.md; demo area ftp_servers) */

/* Name over the protocol. */
.ftp-servers__name {
  display: grid;
}

.ftp-servers__name a {
  color: inherit;
  font-weight: 600;
}

.ftp-servers__protocol {
  color: var(--muted);
  font-size: 13px;
}

.ftp-servers code {
  font-family: var(--f-mono);
  font-size: 13px;
  white-space: nowrap;
}

/* The server open in the form. */
.ftp-servers tr.selected td {
  background: var(--surface);
}

.ftp-servers__help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* The whole row opens the server's form: the name's link covers the row. */
.ftp-servers tbody tr {
  position: relative;
}

.ftp-servers tbody td {
  transition: background-color var(--duration-fast) var(--ease);
}

.ftp-servers tbody tr:hover td {
  background: var(--surface);
}

.ftp-servers__name a::after {
  position: absolute;
  inset: 0;
  content: "";
}

/* The detail of a saved server: a note that only the name can change, then the read-only values. */
.ftp-servers__hint {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
  color: var(--muted);
}

.ftp-servers__facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 16px;
  margin: 22px 0;
}

.ftp-servers__facts dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ftp-servers__facts dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

/* "Test connection": the result below the form's buttons. */
.ftp-connection-test {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
}

.ftp-connection-test--succeeded {
  color: var(--green);
}

/* The host key an SFTP server presented, with "Confirm fingerprint". */
.ftp-connection-test--host-key {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.ftp-connection-test--host-key p {
  display: flex;
  gap: 6px;
  margin: 0;
}

.ftp-connection-test code,
.ftp-servers__facts code {
  font-family: var(--f-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* An import server's "Delivery" box (#909): what the data supplier delivers, one row per question,
   then the import templates with their header files. */
.ftp-delivery {
  width: 100%;
  margin: 16px 0 22px;
  border-collapse: collapse;
}

.ftp-delivery th,
.ftp-delivery td {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ftp-delivery th {
  width: 160px;
  padding-right: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.ftp-delivery p,
.ftp-delivery ul {
  margin: 0 0 6px;
}

.ftp-delivery p:last-child {
  margin-bottom: 0;
}

.ftp-delivery code {
  font-family: var(--f-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ftp-delivery__templates {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.ftp-delivery__templates li {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.ftp-delivery__templates li > a:not(.btn) {
  color: inherit;
  font-weight: 600;
}

/* An export server's files, each with its name pattern and an example (#910). */
.ftp-delivery__files {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.ftp-delivery__files div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}

.ftp-delivery__files dt {
  font-weight: 600;
}

.ftp-delivery__files dd {
  margin: 0;
}

.ftp-delivery__files .ftp-servers__help {
  display: block;
  margin: 2px 0 0;
}
