/* Main/aside page columns are managed here, not inside individual cards. */
.merchant-review-layout,
.account-health-layout,
.buyer-reviews-layout,
.important-email-layout,
.returns-layout,
.reward-shipments-layout,
.rewards-layout,
.shipping-layout,
.logs-layout,
.roles-layout,
.shipping-settings-layout,
.easypost-layout,
.merchant-profile-layout,
.split {
  display: grid !important;
  grid-template-columns: minmax(0, var(--shell-left-panel-width)) minmax(0, 1fr) !important;
  gap: var(--shell-region-gap) !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
}

.merchant-review-layout > aside.stack,
.merchant-review-layout > .stack:last-child,
.shipping-layout > aside.stack,
.logs-layout > aside.stack,
.roles-left,
.split > .stack:first-child {
  min-width: 0;
}

.merchant-review-layout > aside.stack > .card,
.merchant-review-layout > aside.stack .collapse-panel,
.merchant-review-layout > .stack:last-child > .card,
.merchant-review-layout > .stack:last-child .collapse-panel,
.shipping-layout > aside.stack > .card,
.shipping-layout > aside.stack .collapse-panel,
.logs-layout > aside.stack > .card,
.logs-layout > aside.stack .collapse-panel,
.roles-left > .card,
.split > .stack:first-child > .card,
.split > .card:first-child,
.split > form.card:first-child {
  border-color: var(--shell-panel-border) !important;
  background: var(--shell-aside-bg) !important;
}

.merchant-review-layout > :not(aside):not(.stack),
.merchant-review-main,
.shipping-main,
.logs-main,
.roles-main,
.merchant-profile-layout > .card,
.split > :not(:first-child),
.split > .stack,
.split > div,
.todos-main-layout {
  min-width: 0;
}

body.theme-shell .merchant-review-layout > aside.stack > .card,
body.theme-shell .merchant-review-layout > .stack:last-child > .card,
body.theme-shell .shipping-layout > aside.stack > .card,
body.theme-shell .logs-layout > aside.stack > .card,
body.theme-shell .roles-left > .card,
body.theme-shell .split > .stack:first-child > .card,
body.theme-shell .split > .card:first-child,
body.theme-shell .split > form.card:first-child {
  box-shadow: var(--shell-panel-shadow);
}

@media (max-width: 920px) {
  .merchant-review-layout,
  .account-health-layout,
  .buyer-reviews-layout,
  .important-email-layout,
  .returns-layout,
  .reward-shipments-layout,
  .rewards-layout,
  .shipping-layout,
  .logs-layout,
  .roles-layout,
  .shipping-settings-layout,
  .easypost-layout,
  .merchant-profile-layout,
  .split {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .merchant-review-layout > aside.stack,
  .merchant-review-layout > .stack:last-child,
  .shipping-layout > aside.stack,
  .logs-layout > aside.stack,
  .roles-left,
  .split > .stack:first-child {
    max-width: none !important;
  }
}
