/* Fixes things that cannot be done in the block editor */

:where(.no-underline, .no-underline *) {
  text-decoration: none;
}

:where(.flex) {
    display: flex;
}

:where(.align-items-center) {
	align-items: center;
}

:where(.width-100) {

	width: 100%;

	&:is(figure) a:has(img) { 
		display: block;
		width: 100%;
	}

	& img {
		width: 100%;
		height: auto; 
	}

}

.has-overlaping-images {

  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);

  & > :first-child {
    grid-area: 1 / 1 / 7 / 7;
    z-index: 0;
    margin: 0;
  }

  & > :last-child {
    grid-area: 5 / 5 / 10 / 10;
    z-index: 1;
    margin: 0;
  }

}

:where(:has(> .parent-has-small-dark-shadow)) {
    box-shadow: var(--wp--preset--shadow--small-dark);
}

.wp-block-cover.has-stretched-content .wp-block-cover__inner-container {

  align-self: stretch;

  & > * {
    height: 100%;
  }

}

header {

  box-shadow: none !important;

  & .is-transparent:has([aria-expanded="false"]) {

    & * {
      color: var(--wp--preset--color--primary-alt);
    }

  }

  & nav {
    flex: 0 0 auto;   
  }

}

/* Fixes annoyances with WordPress core blocks */


.wp-block-media-text:not(.has-background) {
  
  gap: var(--wp--preset--spacing--medium);

  &.has-media-on-the-right > .wp-block-media-text__content {
    padding-inline: 0;
  }
  
  &:not(.has-media-on-the-right) > .wp-block-media-text__content {
    padding-inline: 0;
  }

}

/* Fixes annoyances with Ollie theme */

html {
  scroll-behavior: smooth;
}

#mega-menu-1-dropdown .menu-container__close-button {
  display: none;    
}