/* The /upload page's form. Loaded only on that page, on both sites.
 *
 * Builds on site.css tokens and names no hex directly, so a brand change in
 * site.css carries through. The form's wrapper is .drop-card, not .card:
 * site.css already owns .card for the service grids, and one page should not
 * redefine another page's class.
 */

.drop-wrap {
  max-width: 760px;
}

.drop-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

/* Only fields sharing a row need to grow; applying this to every field makes
   them stretch vertically inside the card's column layout. */
.row .field {
  flex: 1 1 220px;
}

.drop-card label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.optional {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--muted);
}

input[type='text'],
textarea {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  min-height: 46px;
  width: 100%;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

input[type='text']:focus,
textarea:focus,
input[type='file']:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

#password {
  font-size: 19px;
  letter-spacing: 0.02em;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--ground);
  padding: 22px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone.over {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.dropzone input[type='file'] {
  font-family: var(--font-body);
  font-size: 15px;
}

.dropText {
  color: var(--ink-soft);
  margin: 12px 0 0;
  font-size: 15px;
  word-break: break-word;
}

.btn-send {
  background: var(--brand);
  color: var(--on-brand);
  border: 0;
  font-family: var(--font-body);
  font-size: 17px;
  cursor: pointer;
  align-self: flex-start;
  padding: 13px 28px;
  border-radius: var(--radius);
  min-height: 48px;
  font-weight: 600;
}

.btn-send:hover:not(:disabled) {
  background: var(--brand-strong);
}

.btn-send:disabled {
  background: var(--muted);
  cursor: default;
}

.progressWrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* An author `display` rule beats the UA stylesheet's [hidden] { display: none },
   so without this the empty progress bar shows before any upload starts. */
.progressWrap[hidden] {
  display: none;
}

.progressTrack {
  height: 10px;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progressBar {
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 0.2s linear;
}

.progressText {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.status {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.status:empty {
  display: none;
}

.status-good {
  color: #1b5e20;
  font-weight: 600;
}

.status-bad {
  color: var(--red-strong);
  font-weight: 600;
}

.status-warn {
  color: #8a5000;
  font-weight: 600;
}

.trouble {
  margin-top: 32px;
  padding: 24px 28px;
  background: var(--brand-tint);
  border-radius: var(--radius);
}

.trouble h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.trouble ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.trouble li {
  margin: 7px 0;
}

@media (max-width: 600px) {
  .drop-card {
    padding: 20px;
  }
  .row {
    gap: 18px;
  }
}
