/* The drop pages' layout. Colours and fonts come from the theme
   (/_/theme.css, loaded after this file; see web/themes/). */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
main {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* The TRANSFER logo: one framed word, like the vibehuus poster. The
   splash page and the 404 are just the logo; the drop page has it at the
   top. */
.logo {
  margin: 0;
  padding: 0.25em 0.45em 0.12em;
  border: 2px solid var(--fg);
  background: var(--surface);
  font: var(--display-weight) calc(clamp(28px, 6.5vw, 75px) * var(--display-scale))/0.9 var(--display);
  letter-spacing: calc(var(--display-tracking) - 0.01em);
  text-transform: uppercase;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Drop page: the logo pinned at the top, the drop box centred on the
   page itself. main reserves the logo's height above *and* below, so the
   centre stays the page's centre and the box can't slide under the logo
   on a short screen. */
body.drop { position: relative; }
.drop .brand {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}
.drop main {
  /* logo height (font × 1.27 + border) + its 24px offset + a gap */
  --logo-space: calc(clamp(28px, 6.5vw, 75px) * 1.27 + 48px);
  padding: var(--logo-space) 16px;
}
.panel {
  width: 100%;
  max-width: 760px;
  border: 2px solid var(--fg);
  background: var(--surface);
  padding: 20px;
}
.message {
  margin: 0 0 18px;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.zone {
  border: 1.5px dashed var(--fg);
  padding: clamp(48px, 9vh, 88px) 16px clamp(40px, 8vh, 80px);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}
.zone:hover, .zone:focus-visible, .zone.over {
  border-style: solid;
  outline: none;
  background: color-mix(in srgb, var(--tint, var(--fg)) 7%, transparent);
}
.zone p { margin: 0; }
.zone-title {
  font: var(--display-weight) calc(clamp(38px, 8vw, 60px) * var(--display-scale))/1 var(--display);
  letter-spacing: var(--display-tracking);
  text-transform: uppercase;
}
.zone-sub {
  margin-top: 6px !important;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* "3 files uploaded", between the zone and the list. */
.uploaded {
  margin: 32px 0 0;
  font: var(--display-weight) calc(clamp(26px, 5vw, 34px) * var(--display-scale))/1 var(--display);
  letter-spacing: var(--display-tracking);
  text-transform: uppercase;
}

.files { list-style: none; margin: 16px 0 0; padding: 0; }
.files:not(:empty) { margin-top: 32px; }
.uploaded:not([hidden]) + .files { margin-top: 16px; }
.file {
  border: 1.5px solid var(--fg);
  padding: 14px 16px 12px;
  margin-bottom: 12px;
}
.file:last-child { margin-bottom: 0; }
.file-head, .file-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.file-foot { align-items: center; min-height: 18px; }
.file-name { overflow-wrap: anywhere; font-weight: 700; }
.file-size, .file-status {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.file-size { white-space: nowrap; }
.file progress {
  display: block;
  width: 100%;
  height: 6px;
  margin: 10px 0 8px;
  appearance: none;
  border: none;
  border-radius: 0;
  background: color-mix(in srgb, var(--tint, var(--fg)) 18%, transparent);
  accent-color: var(--fg);
}
.file progress::-webkit-progress-bar { background: color-mix(in srgb, var(--tint, var(--fg)) 18%, transparent); }
.file progress::-webkit-progress-value { background: var(--fg); }
.file progress::-moz-progress-bar { background: var(--fg); }
/* A sent file gets a checkmark in the logo's square frame. */
.file-state { display: inline-flex; align-items: center; gap: 8px; }
.check {
  display: none;
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--fg);
}
.check::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid var(--fg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.file[data-state="done"] .check { display: block; }
.file[data-state="done"] .file-status { color: var(--fg); font-weight: 700; }
.file[data-state="error"] { border-color: var(--bad); }
.file[data-state="error"] .file-status { color: var(--bad); text-transform: none; letter-spacing: 0; font-size: 13px; }
.file[data-state="error"] progress::-webkit-progress-value { background: var(--bad); }
.file[data-state="cancelled"] { opacity: 0.55; }
.file-action {
  flex: none;
  font: 700 10px/1.2 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--surface);
  background: var(--fg);
  border: none;
  border-radius: 0;
  padding: 6px 10px;
  cursor: pointer;
}
.file-action:hover { background: var(--dim); }

/* A send link's page: the owner's files, in the same boxes as the files
   being sent through a receive link, each with its download button, then
   one zip of them all. */
.shared-title {
  margin: 0 0 16px;
  font: var(--display-weight) calc(clamp(26px, 5vw, 34px) * var(--display-scale))/1 var(--display);
  letter-spacing: var(--display-tracking);
  text-transform: uppercase;
}
.message + .shared { margin-top: 28px; }
.shared .files { margin-top: 0; }
.shared .file-action { text-decoration: none; }
.shared .file-foot { margin-top: 6px; }
.shared-all { margin: 16px 0 0; text-align: center; }
.button {
  display: inline-block;
  font: 700 12px/1.2 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--surface);
  background: var(--fg);
  padding: 12px 18px;
}
.button:hover { background: var(--dim); }
.shared-until {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.nothing-yet {
  margin: 8px 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
