/* Legal Works R71: final mobile navigation and document-form corrections. */
@media (max-width: 768px) {
  /* This is the global bar actually rendered by app-pages on inner routes. */
  .lw-global-mobile-bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-auto-flow: initial !important;
    grid-auto-columns: initial !important;
    align-items: stretch !important;
    gap: 2px !important;
    box-sizing: border-box !important;
  }

  .lw-global-mobile-bottom-nav > a {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 5px 1px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
    font-size: clamp(9px, 2.55vw, 11px) !important;
    text-align: center !important;
  }

  .lw-global-mobile-bottom-nav > a > mat-icon,
  .lw-global-mobile-bottom-nav > a > .mat-icon {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: block !important;
    flex: 0 0 25px !important;
    width: 25px !important;
    height: 25px !important;
    margin: 0 auto !important;
    font-size: 25px !important;
    line-height: 25px !important;
    text-align: center !important;
  }

  .lw-global-mobile-bottom-nav > a > span {
    position: static !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  /* Typed document values remain legible on the light mobile form. */
  .lw-docs-page .lw-field input.mat-mdc-input-element,
  .lw-docs-page .lw-field input.mat-input-element,
  .lw-docs-page .lw-field input[matinput] {
    color: #0b1628 !important;
    -webkit-text-fill-color: #0b1628 !important;
    caret-color: #0b1628 !important;
    font-weight: 800 !important;
    opacity: 1 !important;
  }

  .lw-docs-page .lw-field input.mat-mdc-input-element::placeholder,
  .lw-docs-page .lw-field input.mat-input-element::placeholder,
  .lw-docs-page .lw-field input[matinput]::placeholder {
    color: #46576b !important;
    -webkit-text-fill-color: #46576b !important;
    font-weight: 700 !important;
    opacity: 1 !important;
  }

  /* The colored checkbox already communicates selection; remove its stray tick. */
  .lw-docs-page .lw-check {
    --mat-checkbox-selected-checkmark-color: transparent !important;
    --mdc-checkbox-selected-checkmark-color: transparent !important;
  }

  .lw-docs-page .lw-check .mdc-checkbox__checkmark,
  .lw-docs-page .lw-check .mat-checkbox-checkmark,
  .lw-docs-page .lw-check .mat-checkbox-checkmark-path {
    display: none !important;
    visibility: hidden !important;
  }
}
