.wp-block-cover.is-style-mountain-profile {
  --ollie-mountain-height: clamp(100px, 19vw, 280px);
  position: relative;
  overflow: hidden;
  padding-bottom: calc(var(--ollie-mountain-height) + 1.5rem);
}

.wp-block-cover.is-style-mountain-profile::before,
.wp-block-cover.is-style-mountain-profile::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  width: 100%;
  height: var(--ollie-mountain-height);
  pointer-events: none;
  z-index: 2;
}

.wp-block-cover.is-style-mountain-profile::before {
  background: url("../images/mountain-back.svg") center calc(var(--ollie-mountain-height) * .1) / 100% 100% no-repeat;
  opacity: .8;
}

.wp-block-cover.is-style-mountain-profile::after {
  background-color: var(--ollie-site-background, var(--wp--preset--color--base, Canvas));
  mask: url("../images/mountain-front.svg") center calc(var(--ollie-mountain-height) * .2) / 100% 100% no-repeat;
  z-index: 3;
}

/* Override only Gutenberg's selection overlay on this cover style. */
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-cover.is-style-mountain-profile.block-editor-block-list__block:not([contenteditable="true"]):is(:focus, .is-selected, .is-highlighted, .is-multi-selected, .is-hovered)::after {
  top: auto;
  bottom: -1px;
  background-color: var(--ollie-site-background, var(--wp--preset--color--base, Canvas));
  z-index: 3;
  opacity: 1;
  animation: none;
  outline: none;
  box-shadow: none;
}

/* Keep the selection indicator on the block, outside the masked decoration. */
.editor-styles-wrapper .wp-block-cover.is-style-mountain-profile:is(:focus, .is-selected, .is-highlighted, .is-multi-selected) {
  outline: var(--wp-admin-border-width-focus, 2px) solid var(--wp-admin-theme-color, #3858e9);
  outline-offset: -2px;
}

.wp-block-cover.is-style-mountain-profile > .wp-block-cover__inner-container {
  position: relative;
  z-index: 4;
}
