/* ============================================
   Layout & Structure
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

main {
  min-height: calc(100svh - 200px);
  padding-bottom: var(--spacing-3xl);
}

/* Mobile padding when bottom nav is present */
body.has-bottom-nav main {
  padding-bottom: calc(var(--spacing-3xl) + 80px);
}

.authentication-form-container {
  /* min-height (not height) so a tall form — e.g. sign-up's five fields — grows
     downward and stays fully below the sticky header instead of overflowing
     upward and clipping under it. Short forms still center in the viewport. */
  min-height: calc(100svh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xl);
}

@media (max-width: 768px) {
  main {
    margin-top: 0;
    padding-top: var(--spacing-xl);
  }

  main .container {
    padding: 0 var(--spacing-lg);
  }

  body.has-bottom-nav main {
    padding-bottom: calc(var(--spacing-3xl) + 80px);
  }
}

@media (min-width: 769px) {
  body.has-bottom-nav main {
    padding-bottom: var(--spacing-3xl);
  }

  /* Pages that read rather than fill: the header's left edge lines up with the
     content below it instead of the wider .container. */
  .settings-page,
  .drive-log-page {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
  }

  .authentication-form-container {
    min-height: calc(100svh - 280px);
  }

  .authentication-form-container .container {
    width: 100%;
    max-width: 480px;
    padding: 0;
  }
}

@media (max-width: 480px) {
  main .container {
    padding: 0 calc(var(--spacing-unit) * 1.75);
  }
}
