/**
 * Commerce Layouts.
 */

:root {
  --commerce-layout-sidebar-width: 22.5rem;
  --commerce-layout-content-width: 100%;
}

.layout-region {
  box-sizing: border-box;
}

.layout-region--commerce-footer .layout-region__content {
  margin-top: 1.5rem;
}

/**
 * Wide screens form and admin pages layout.
 */
@media (min-width: 61rem) {
  .layout-commerce-admin,
  .layout-commerce-form {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 2rem;
  }

  .layout-commerce-admin {
    grid-template-columns: minmax(0, 3fr) minmax(auto, 1fr);
  }

  .layout-commerce-form {
    grid-template-columns: minmax(0, 3fr) minmax(var(--commerce-layout-sidebar-width), 1fr);
  }

  .layout-region--commerce-main,
  .layout-region--commerce-footer {
    grid-column: 1;
    width: var(--commerce-layout-content-width);
    margin-inline: auto;
  }

  /* Push sidebar down to horizontal align with form section. */
  .layout-region--commerce-secondary {
    grid-row: span 2;
  }
}
