/* secure-file-share — one small stylesheet, system fonts, no CDN, works
   offline, CSP-clean (no inline styles anywhere in the HTML). */

:root {
  color-scheme: dark light;
  --bg: #16181d;
  --panel: #1f232b;
  --line: #31363f;
  --text: #e6e6e6;
  --muted: #9aa3af;
  --accent: #6ea8fe;
  --ok: #7ee2a8;
  --bad: #ff8080;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f7;
    --panel: #ffffff;
    --line: #d9dde3;
    --text: #23252a;
    --muted: #5f6670;
    --accent: #0b57d0;
    --ok: #0a7d42;
    --bad: #c0392b;
  }
  /* The light accent is dark enough that white text reads better on it
     than the near-black the pastel dark-mode accent uses. */
  button { color: #ffffff; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1rem 3rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  max-width: 42rem;
  margin-inline: auto;
}

header { padding: 2.2rem 0 0.5rem; }

h1 {
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.4rem;
}

.tagline, .hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.tagline { margin: 0; }

code {
  background: rgba(127, 127, 127, 0.18);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-size: 0.9em;
}

main, footer { margin-top: 1.2rem; }

footer { color: var(--muted); font-size: 0.88rem; }

a { color: var(--accent); }

/* The form, PrivateBin-style: everything one column, one button. */

form { display: grid; gap: 1rem; }

.drop {
  display: block;
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 1.6rem 1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 120ms;
}

.drop.drag { border-color: var(--accent); color: var(--text); }

.drop input[type=file] { display: none; }

.field { display: grid; gap: 0.3rem; }

.field input, .field select, #link {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  width: 100%;
}

.field-label { font-weight: 600; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: end;
}

@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.check {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding-bottom: 0.55rem;
}

button {
  background: var(--accent);
  color: #0e1116;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:hover { filter: brightness(1.08); }

button:disabled { opacity: 0.5; cursor: default; }

/* Progress during encryption and upload. */

.progress {
  margin: 1rem 0;
  background: var(--line);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  transition: width 150ms;
}

#progress-label { font-size: 0.85rem; color: var(--muted); }

/* Result and error blocks. */

/* One override so the `hidden` attribute always wins: `.result` and friends
   set display below, and an author display rule would otherwise beat the
   browser's [hidden] default and show the boxes before their time. */
[hidden] { display: none !important; }

.result { display: grid; gap: 0.5rem; }

.link-row { display: flex; gap: 0.5rem; }

.link-row input { flex: 1; font-family: ui-monospace, monospace; font-size: 0.85rem; }

.error {
  color: var(--bad);
  background: rgba(200, 60, 60, 0.08);
  border: 1px solid rgba(200, 60, 60, 0.4);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-top: 1rem;
}

.warn {
  background: rgba(220, 160, 40, 0.09);
  border: 1px solid rgba(220, 160, 40, 0.5);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin: 1rem 0;
}

.state p { margin: 0.2rem 0; }

.file-line { font-family: ui-monospace, monospace; word-break: break-all; }
