@import 'typeset';
@import 'navigation-tree';
@import 'blocks';
@import 'person-pill';

// `height: 100%` constrains body to viewport height.
// Use `min-height: 100vh` so body fills the viewport initially
// but can grow when content exceeds viewport height.

body {
  height: auto;
  min-height: 100vh;
  align-items: stretch;
}

// Neutralize TW container CSS for .q.container
@layer plone-components {
  .q.container {
    max-width: none;
  }

  @media (width >= 40rem) {
    .q.container {
      max-width: none;
    }
  }

  @media (width >= 48rem) {
    .q.container {
      max-width: none;
    }
  }

  @media (width >= 64rem) {
    .q.container {
      max-width: none;
    }
  }

  @media (width >= 80rem) {
    .q.container {
      max-width: none;
    }
  }

  @media (width >= 96rem) {
    .q.container {
      max-width: none;
    }
  }
}

// fix for tailwind's fixed collision with SemanticUI
.ui.fixed {
  position: initial;
}

// Remove if going full BMv3
.category-inline {
  .block-inner-container {
    @include narrow-container-width();
    @include adjustMarginsToContainer($narrow-container-width);
  }
}

.slate-editor {
  h1.documentFirstHeading {
    margin-right: auto;
    margin-left: auto;
  }
}

.block-inner-container {
  // in here, the display can't be grid.
  // TODO: review if we can get along with non-grid display everywhere.
  display: block !important; // !important needed for Volto current CSS set :(
  width: 100%;
  max-width: var(--block-width) !important;
  margin-inline: auto;
  place-content: initial !important; // !important needed for Volto current CSS set :(
}
.slate-editor
  h1.documentFirstHeading
  .block-inner-container
  > [aria-hidden='true'] {
  top: 0;
  translate: none;
}

.slate-a,
.slate-a:hover {
  color: var(--link-foreground-color, --theme-foreground-color);
  text-decoration: underline;
  text-underline-offset: initial;
}

// Fixes the alignment of the logo in the footer, which is currently broken due
// to the tailwind reset. Remove when fixed in VLT.
.post-footer .colophon a img {
  display: inline;
}
