/* Shared screen styles. Keep the copies in antrag/static and
   veranstaltungen/static in sync: those apps serve their own /static mount. */
@media screen {
  :root {
    --apple-safe-top: env(safe-area-inset-top, 0px);
    --apple-safe-right: env(safe-area-inset-right, 0px);
    --apple-safe-bottom: env(safe-area-inset-bottom, 0px);
    --apple-safe-left: env(safe-area-inset-left, 0px);
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: var(--apple-safe-top);
    scroll-padding-bottom: var(--apple-safe-bottom);
  }

  body {
    box-sizing: border-box;
    min-height: 100svh;
    /* Borders reserve the notch/landscape edges without replacing page padding. */
    border-top: var(--apple-safe-top) solid transparent;
    border-left: var(--apple-safe-left) solid transparent;
    border-right: var(--apple-safe-right) solid transparent;
  }

  /* Each page opts in only when it actually renders fixed bottom navigation. */
  body[data-apple-bottom-nav] {
    padding-bottom: calc(var(--navbar-height, 80px) + var(--apple-safe-bottom) + var(--apple-action-clearance, 0px) + 1rem);
  }

  body[data-apple-bottom-nav] .bottom-navbar {
    box-sizing: border-box;
    height: calc(var(--navbar-height, 80px) + var(--apple-safe-bottom));
    padding-bottom: var(--apple-safe-bottom);
    padding-left: var(--apple-safe-left);
    padding-right: var(--apple-safe-right);
  }

  .bottom-navbar .nav-item {
    min-width: 0;
    min-height: 44px;
    text-align: center;
  }

  button, .btn, [role="button"], .bottom-navbar a, .create-report-button,
  input[type="button"], input[type="submit"], input[type="reset"] {
    touch-action: manipulation;
  }

  @media (hover: none) and (pointer: coarse) {
    /* Safari zooms focused editable fields when their font is below 16px. */
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
    select, textarea {
      font-size: max(16px, 1em) !important;
    }

    button, .btn, [role="button"], .create-report-button,
    input[type="button"], input[type="submit"], input[type="reset"] {
      min-height: 44px;
    }
  }
}
