/**
 * @file
 * Page-level region layout for the Save Mo Lives theme.
 *
 * Maps the regions rendered in page.html.twig (alerts, masthead, main content,
 * sidebars) into the overall page structure.
 */

.layout-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow-x: hidden;
}

.layout-container > main {
  flex: 1 0 auto;
  width: 100%;
}

.layout-container > main > .main-container {
  width: 100%;
  max-width: var(--sml-container-max);
  margin: 15px auto;
  padding-right: var(--sml-container-pad);
  padding-left: var(--sml-container-pad);
}

@media (min-width: 992px) {
  .layout-container > main > .main-container {
    margin-top: 30px;
    margin-bottom: 30px;
  }
}

.sml-content-below {
  width: 100%;
}

/* Alerts / highlighted / help band. */
.alerts {
  padding: 0;
}

.alerts:empty {
  display: none;
}

/* Masthead band spans full width. */
.masthead {
  padding: 0;
}

/* Content + sidebar layout. */
.page__row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.page__content {
  flex: 1 1 60%;
  min-width: 0;
}

.page__content--with-sidebar {
  flex: 1 1 60%;
}

.page__sidebar {
  flex: 1 1 280px;
  max-width: 320px;
}

.content-top {
  margin-bottom: 1.5rem;
}

@media (max-width: 991px) {
  .page__row {
    flex-direction: column;
    gap: 1.5rem;
  }

  .page__content,
  .page__sidebar {
    width: 100%;
    flex-basis: auto;
  }

  .page__sidebar {
    max-width: none;
  }
}
