/* SeizeControl on iPad only.
   Every rule is under html.sc-ipad, which the header sets for iPad and
   iPadOS. iPhone and desktop never match, so their layout is unchanged. */

html.sc-ipad body.app-authenticated .sc-product-nav,
html.sc-ipad body.app-authenticated .sc-product-actions {
  display: none !important;
}

html.sc-ipad body.app-authenticated .sc-product-bar__inner,
html.sc-ipad body.app-authenticated .sc-app-shell > main.sc-app-main,
html.sc-ipad body.app-authenticated .sc-app-footer__inner,
html.sc-ipad body.app-authenticated .sc-workspace-banner__inner {
  width: min(1120px, 100%);
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px)) !important;
  box-sizing: border-box;
}

/* Today and Medication were adding a second, different inset inside the shell. */
html.sc-ipad body.app-authenticated .sc-app-main > :is(
  .sc-page,
  .sc-native-today,
  .sc-daily-workspace,
  .meds-page,
  .meds-native
) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

html.sc-ipad body.app-authenticated .sc-product-bar__inner {
  min-height: 76px;
}

html.sc-ipad body.app-authenticated .sc-product-brand img {
  width: 196px;
  max-width: min(100%, 196px);
  max-height: 64px;
}

html.sc-ipad .sc-native-today__welcome {
  min-width: 0;
}
html.sc-ipad .sc-native-today__welcome > div {
  min-width: 0;
}
html.sc-ipad body.app-authenticated .sc-native-private {
  width: auto;
  height: auto;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Keep the phone dock and menu on landscape iPad. The desktop link row
   is hidden above, so the burger and drawer must stay available. */
@media (min-width: 992px) {
  html.sc-ipad body.app-authenticated .sc-product-burger.d-lg-none {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  html.sc-ipad body.app-authenticated .sc-mobile-drawer.d-lg-none {
    display: flex !important;
  }
}

html.sc-ipad body.app-authenticated .sc-mobile-dock.care-mobile-dock {
  position: fixed !important;
  inset: auto auto max(12px, env(safe-area-inset-bottom, 0px)) 50% !important;
  transform: translateX(-50%) !important;
  display: grid !important;
  width: min(34rem, calc(100vw - 2rem)) !important;
  height: auto !important;
  margin: 0 !important;
  padding: 6px 8px !important;
  border: 1px solid var(--fnd-border) !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 12px 32px rgba(0, 43, 95, 0.16) !important;
  z-index: 1040 !important;
}

html.sc-ipad body.app-authenticated.shell-app,
html.sc-ipad body.sc-native-app .sc-app-main {
  padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px)) !important;
}

html.sc-ipad .sc-native-today__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.72fr);
  align-items: start;
  gap: 1rem 1.25rem;
}

html.sc-ipad .sc-native-today__side {
  position: sticky;
  top: 5.5rem;
}

html.sc-ipad body.app-body .sc-daily-support__links,
html.sc-ipad body.app-body .sc-daily-workspace .sc-native-actions__secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  border: 0;
  background: transparent;
  overflow: visible;
}

html.sc-ipad body.app-body .sc-daily-support__links > *,
html.sc-ipad body.app-body .sc-daily-workspace .sc-native-actions__secondary > .sc-native-action {
  border: 1px solid var(--fnd-border) !important;
  border-radius: 16px !important;
  background: #fff;
}

html.sc-ipad body.app-authenticated .sc-capture-sheet__panel {
  width: min(36rem, calc(100vw - 3rem));
  margin-inline: auto;
  border-radius: 20px 20px 0 0;
}

@media (max-width: 700px) {
  html.sc-ipad .sc-native-today__layout,
  html.sc-ipad body.app-body .sc-daily-support__links,
  html.sc-ipad body.app-body .sc-daily-workspace .sc-native-actions__secondary {
    grid-template-columns: minmax(0, 1fr);
  }

  html.sc-ipad .sc-native-today__side {
    position: static;
  }
}
