/* OnlyShows 0.11.3: locked home masthead and seamless bottom transitions. */

@media (max-width: 719px) {
  body {
    padding-bottom: calc(89px + env(safe-area-inset-bottom)) !important;
  }

  body.mobile-database-tab {
    padding-bottom: calc(143px + env(safe-area-inset-bottom)) !important;
  }

  body:not(.mobile-database-tab):not(.mobile-profile-tab) .topbar {
    position: fixed !important;
    z-index: 32 !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  body:not(.mobile-database-tab):not(.mobile-profile-tab) .hero {
    position: fixed !important;
    z-index: 31 !important;
    top: 42px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 8px !important;
    pointer-events: none;
  }

  body:not(.mobile-database-tab):not(.mobile-profile-tab) .hero h1 {
    max-width: 100% !important;
    font-size: clamp(27px, 8vw, 34px) !important;
  }

  body:not(.mobile-database-tab):not(.mobile-profile-tab) main {
    padding-top: 92px;
  }

  body:not(.mobile-database-tab):not(.mobile-profile-tab) main::before {
    content: "";
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    left: 0;
    height: 104px;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      color-mix(in srgb, var(--surface) 54%, transparent) 0%,
      color-mix(in srgb, var(--surface) 28%, transparent) 72%,
      transparent 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  body.mobile-database-tab .topbar,
  body.mobile-profile-tab .topbar {
    display: none !important;
  }

  body:not(.mobile-profile-tab) .library::after,
  .profile-dialog.mobile-tab-page[open]::after {
    content: "";
    position: fixed;
    right: 0;
    bottom: calc(68px + env(safe-area-inset-bottom));
    left: 0;
    height: 156px;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      transparent 0%,
      color-mix(in srgb, var(--surface) 9%, transparent) 28%,
      color-mix(in srgb, var(--surface) 34%, transparent) 64%,
      color-mix(in srgb, var(--surface) 72%, transparent) 100%
    ) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body:not(.mobile-profile-tab) .library::after {
    z-index: 1170;
  }

  .profile-dialog.mobile-tab-page[open]::after {
    z-index: 4;
  }

  body.mobile-database-tab .library {
    animation: mobile-workspace-rise 280ms cubic-bezier(.2, .8, .2, 1) both;
  }

  body.mobile-profile-tab .profile-dialog.mobile-tab-page[open] .insights-head,
  body.mobile-profile-tab .profile-dialog.mobile-tab-page[open] .insights-scroll {
    animation: mobile-workspace-rise 280ms cubic-bezier(.2, .8, .2, 1) both;
  }

  body.mobile-profile-tab .profile-dialog.mobile-tab-page[open] .insights-scroll {
    animation-delay: 35ms;
  }

  html body .mobile-bottom-nav,
  html body .mobile-bottom-nav.is-scroll-hidden {
    border-radius: 999px !important;
  }

  html body.mobile-database-tab .mobile-bottom-nav {
    border-radius: 0 0 30px 30px !important;
  }

  .mobile-bottom-tab,
  .mobile-bottom-tab.active,
  .mobile-bottom-tab.is-active,
  .mobile-bottom-tab[aria-current="page"] {
    border-radius: 999px !important;
    transition: color 220ms ease, background-color 220ms ease, transform 220ms cubic-bezier(.2, .8, .2, 1) !important;
  }

  .mobile-bottom-tab.active,
  .mobile-bottom-tab.is-active,
  .mobile-bottom-tab[aria-current="page"] {
    transform: scale(.98);
  }

  .profile-edit-save {
    display: flex !important;
    width: auto !important;
    min-width: 148px;
    height: 48px;
    margin: 20px auto 28px !important;
    padding: 0 28px !important;
    align-items: center;
    justify-content: center;
    border-radius: 999px !important;
  }
}

@keyframes mobile-workspace-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mobile-database-tab .library,
  body.mobile-profile-tab .profile-dialog.mobile-tab-page[open] .insights-head,
  body.mobile-profile-tab .profile-dialog.mobile-tab-page[open] .insights-scroll {
    animation: none !important;
  }
}
