/*
 * Error pages, the account notice under the header, and the small screen and reduced motion
 * rules for every app screen. Linked after base-controls.css, last of the base sheets.
 */

/* Error pages ---------------------------------------------------------------------------- */

.error-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.error-page__code {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 15px;
  color: var(--muted);
}

/* Account waiting to be deleted ----------------------------------------------------------- */
/* One line under the header on every app screen (migration 0019): a closed account, or a read
   only one whose plan ended. Red means it needs work; the pill's word says so too. */

.account-notice-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px var(--gutter) 0;
}

.account-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--red-border);
  border-radius: var(--radius-inner);
  background: var(--red-tint);
  color: var(--ink);
}

.account-notice__text {
  flex: 1 1 260px;
}

.account-notice__link {
  color: var(--red);
  font-weight: 600;
}

/* The header's two sides ------------------------------------------------------------------ */
/* The logo and the trail on the left; the navigation as one group at the right edge on every
   screen. From 1024px wide the header is one row: a long trail is cut short with an ellipsis,
   the navigation never is. */

.app-header__actions {
  margin-left: auto;
  justify-content: flex-end;
}

@media (min-width: 1024px) {
  .app-header__bar {
    flex-wrap: nowrap;
  }

  .app-header .crumbs {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .app-header .crumbs__home,
  .app-header .crumbs__sep {
    flex: 0 0 auto;
  }

  .app-header .crumbs__link,
  .app-header .crumbs__current {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .app-header__actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .app-header .nav-link,
  .app-header__store {
    white-space: nowrap;
  }

  .app-header .crumbs__current {
    flex: 0 1 auto;
    min-width: 6em;
  }
}

/* Below 1280px the mark stands alone, as on phones, so the trail keeps room on one row. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .app-header .app-header__name {
    display: none;
  }
}

/* Small screens and motion --------------------------------------------------------------- */

/* The site's phone width for the logo is 760px, not the 640px the app uses for its gutter. */
@media (max-width: 760px) {
  .app-header__bar {
    padding: 12px 0;
  }

  .crumbs__home {
    gap: var(--logo-gap-phone);
  }

  .app-header__mark {
    width: var(--logo-mark-phone);
    height: var(--logo-mark-phone);
  }

  .app-header__name {
    font-size: var(--logo-name-size-phone);
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  h1,
  .title-1 {
    font-size: 34px;
  }

  .stats__item {
    flex: 1 1 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
