/* File transfer page: one glass card, neutral colors so it follows both the
   light and dark theme of the site. */

.ft-page .page-body {
  display: grid;
  gap: 18px;
}

.ft-card,
.ft-app {
  padding: 18px;

  border: 1px solid rgba(128, 128, 128, 0.28);
  border-radius: 16px;

  background: rgba(128, 128, 128, 0.08);
  backdrop-filter: blur(14px);
}

.ft-app[hidden],
.ft-card[hidden],
.ft-progress[hidden],
.ft-empty[hidden],
.ft-file {
  display: none;
}

.ft-login {
  display: grid;
  gap: 10px;
  max-width: 460px;
}

.ft-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

.ft-row {
  display: flex;
  gap: 10px;
}

.ft-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;

  color: inherit;
  font: inherit;

  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.06);
}

.ft-input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.ft-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 10px 16px;

  color: inherit;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;

  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 10px;

  background: rgba(128, 128, 128, 0.12);
  cursor: pointer;
}

.ft-btn:hover:not(:disabled) {
  background: rgba(128, 128, 128, 0.2);
}

.ft-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.ft-btn-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #4c7cf3, #6a5af9);
}

.ft-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #3f6fe6, #5b4be8);
}

.ft-btn-quiet {
  margin-left: auto;
  background: transparent;
}

.ft-hint {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  opacity: 0.75;
}

.ft-hint[data-kind='error'] {
  color: #d94848;
  opacity: 1;
}

.ft-hint[data-kind='ok'] {
  color: #2f9e5f;
  opacity: 1;
}

.ft-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ft-progress {
  height: 6px;
  margin: 12px 0 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.25);
}

.ft-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4c7cf3, #6a5af9);
  transition: width 0.15s linear;
}

.ft-list {
  display: grid;
  gap: 8px;

  margin: 14px 0 0;
  padding: 0;

  list-style: none;
}

.ft-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;

  padding: 10px 12px;

  border: 1px solid rgba(128, 128, 128, 0.22);
  border-radius: 12px;

  background: rgba(128, 128, 128, 0.06);
}

.ft-name {
  overflow: hidden;

  color: inherit;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ft-name:hover {
  text-decoration: underline;
}

.ft-meta {
  font-size: 12.5px;
  white-space: nowrap;
  opacity: 0.7;
}

.ft-dl {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.ft-empty {
  margin: 14px 0 0;
  opacity: 0.7;
}

.ft-storage {
  margin: 6px 0 0;
  font-size: 12.5px;
  opacity: 0.72;
}

.ft-storage[data-low='true'] {
  color: #d94848;
  opacity: 1;
}

.ft-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.ft-link-btn {
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border: 0;
  background: none;
  text-decoration: none;
  cursor: pointer;
}

.ft-link-btn:hover {
  text-decoration: underline;
}

.ft-danger {
  color: #d94848;
}

.ft-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ft-comments {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;

  margin-top: 4px;
  padding: 12px;

  border: 1px solid rgba(128, 128, 128, 0.24);
  border-radius: 10px;

  background: rgba(128, 128, 128, 0.05);
}

.ft-comments[hidden] {
  display: none;
}

.ft-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.ft-comments-close {
  padding: 0 4px;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0.7;
}

.ft-comments-close:hover {
  opacity: 1;
}

.ft-comment-list {
  display: grid;
  gap: 8px;

  max-height: 220px;
  margin: 0;
  padding: 0 2px 0 0;

  overflow-y: auto;
  list-style: none;
}

.ft-comment {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.08);
}

.ft-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  opacity: 0.8;
}

.ft-comment-text {
  margin: 4px 0 0;
  font-size: 13.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ft-comment-empty {
  font-size: 13px;
  opacity: 0.6;
}

.ft-comment-form {
  display: grid;
  gap: 8px;
}

.ft-comment-form .ft-input {
  width: 100%;
}

.ft-comment-text-input {
  min-height: 52px;
  resize: vertical;
}

.ft-comment-form .ft-btn {
  justify-self: start;
}

@media (max-width: 640px) {
  .ft-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ft-meta {
    grid-column: 1 / -1;
    order: 3;
  }

  .ft-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

