/* FFFD's loading screen over the shared shell (absurd-loader.css), loaded for
   this app alone: web/branding names it, and the build links only it. */

/* The intro script brings a mark of its own. Keyed on the app rather than on a
   class the script adds, or the shared mark shows and then vanishes when the
   script lands. */
body[data-app-name="fucking_fast_file_drive"] .loader-brand {
  display: none;
}

/* ------------------------------------------------------------------
   FFFD

   The showcase hero's opening, held for the second the app takes to
   boot: the wordmark, one honest progress line and one status, over a
   sparse rain that fffd-intro-screens.js draws around them.
   ------------------------------------------------------------------ */
.fffd-intro-content {
  display: none;
}

/* Colours are here as well as in the branding file so the first paint is
   already the app's own ground rather than the shared default. */
body[data-app-name="fucking_fast_file_drive"] {
  --theme-primary: #57859d;
  --theme-secondary: #ff6e48;
  --theme-background: #11171a;
  --theme-on-background: #f1f1f1;
  /* The signal cyan and its text tone (FffdTerminalTheme) and the
     secondary grey (onSurfaceVariant), matched so nothing shifts at the
     handoff. */
  --fffd-signal: #2ee6ff;
  --fffd-signal-text: #7af0ff;
  --fffd-muted: #cacaca;
}

body[data-app-name="fucking_fast_file_drive"] #loading-container {
  background: var(--theme-background);
}

body[data-app-name="fucking_fast_file_drive"] .intro-overlay,
body[data-app-name="fucking_fast_file_drive"] .intro-text-container,
body[data-app-name="fucking_fast_file_drive"] .loading-dots {
  display: none;
}

body[data-app-name="fucking_fast_file_drive"] .loader {
  min-height: 0;
  gap: 28px;
}

body[data-app-name="fucking_fast_file_drive"] .fffd-intro-content {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fffd-lockup-in 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fffd-lockup-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
}

.fffd-lockup-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.fffd-lockup-name {
  font-family: "Schibsted Grotesk", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.fffd-lockup-name .first {
  color: var(--fffd-signal-text);
}

.fffd-lockup-name .rest {
  color: var(--theme-secondary);
}

/* Set a size down from the name: at display size the monospace would outweigh it. */
.fffd-lockup-drive {
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78em;
  font-weight: 400;
  letter-spacing: 0;
  color: color-mix(in srgb, var(--fffd-muted) 72%, transparent);
}

body[data-app-name="fucking_fast_file_drive"] .loader-status {
  width: 180px;
  gap: 14px;
  animation: fffd-status-in 560ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
}

body[data-app-name="fucking_fast_file_drive"] .loader-track {
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-on-background) 10%, transparent);
}

body[data-app-name="fucking_fast_file_drive"] .loader-track::before,
body[data-app-name="fucking_fast_file_drive"] .loader-track::after,
body[data-app-name="fucking_fast_file_drive"] .loader-track-marker {
  display: none;
}

body[data-app-name="fucking_fast_file_drive"] .loader-track-fill {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--loader-progress, 0) * 100%);
  border-radius: inherit;
  background: var(--fffd-signal);
}

/* Only on completion, so the line visibly closes as the screen leaves. */
body[data-app-name="fucking_fast_file_drive"] .loader-status.is-complete .loader-track-fill {
  transition: width 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body[data-app-name="fucking_fast_file_drive"] .loader-status-line {
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  color: var(--fffd-muted);
}

body[data-app-name="fucking_fast_file_drive"] .loader-status-text {
  transition: opacity 240ms ease;
}

body[data-app-name="fucking_fast_file_drive"] .loader-status-text.is-swapping {
  opacity: 0;
}

@keyframes fffd-lockup-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fffd-status-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .fffd-lockup-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .fffd-lockup-name {
    font-size: 26px;
  }
}
