/* Wave 7: the creator's upload, for real.

   The bytes start when she picks; the questions sit under the bar; the
   bar is bytes to 92 and "Checking your video" to 100; the screen stays
   on; and the Instagram webview gets a way out. Everything here sits on
   the wave 3 portal sheet and the wave 5 tokens. No tracking, no gradients
   on the canvas, no motion on anything that moves every second. */

/* ---------- 1. The bar ---------- */

.portal-upload-progress {
  margin: 12px 0 4px;
}

.portal-upload-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--neutral-150);
  overflow: hidden;
}

.portal-upload-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--forest);
  /* A linear move between progress events reads as steady; a bar that
     jumps reads as stalled. Nothing else on this element animates. */
  transition: width 400ms linear;
}

@media (prefers-reduced-motion: reduce) {
  .portal-upload-bar {
    transition: none;
  }
}

.portal-upload-lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.portal-upload-head {
  font-weight: 600;
  color: var(--ink);
}

.portal-upload-eta {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--ink-soft);
}

.portal-upload-eta:empty {
  display: none;
}

/* ---------- 2. The questions under the bar ---------- */

.portal-upload-asks {
  margin-top: 16px;
}

.portal-upload-asks .field + .field,
.portal-upload-asks .portal-choice-group + .field {
  margin-top: 14px;
}

.portal-upload-asks textarea.input {
  resize: none;
  min-height: 56px;
}

.portal-resume-line {
  margin-top: 4px;
  color: var(--ok-ink);
}

/* ---------- 3. The home screen hint, in the card ---------- */

/* The after-signing hint floats above the home indicator; on the upload
   step it is part of the form, between the picker and the bar. */
.portal-homescreen-inline {
  position: static;
  margin: 12px 0 0;
  padding: 12px 14px;
  box-shadow: none;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  max-width: none;
}

.portal-homescreen-inline p {
  font-size: 13.5px;
}

/* ---------- 4. Out of the Instagram webview ---------- */

.portal-inapp {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  margin: 0 0 8px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: var(--surface-solid);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.portal-inapp p {
  margin: 0;
  flex: 1 1 220px;
}

.portal-inapp-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

/* On the upload step the bar is the first thing on the page and says why. */
.portal-inapp.is-strong {
  background: var(--forest);
  color: #FFFFFF;
  border-bottom: 0;
}

.portal-inapp.is-strong .btn-forest {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: var(--lime);
}

.portal-inapp.is-strong .btn-secondary {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, .45);
}
