.header-cover-background {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;

  &::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.70) 25.63%, rgba(0, 0, 0, 0.00) 99.85%);
    z-index: 1;
  }

  .header-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .header-cover-inner.content-width {
    max-width: 1200px;
    /* adjust to your theme's content width */
    margin: 0 auto;
    padding-right: var(--wp--style--root--padding-right);
    padding-left: var(--wp--style--root--padding-left);
    padding-bottom: var(--wp--style--root--padding-bottom);
  }

  .header-cover-inner {
    position: relative;
    z-index: 1;
    text-align: left;
    width: 100%;
  }
}

.header-cover-caption-icon {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 2;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-cover-tooltip {
  position: absolute;
  bottom: 120%;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.3;
  max-width: 300px;
  min-width: 250px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;

  a {
    color: #fff;

    &:hover {
      text-decoration: none;
    }
  }
}

.header-cover-caption-icon.show .header-cover-tooltip,
.header-cover-caption-icon:hover .header-cover-tooltip,
.header-cover-caption-icon:focus .header-cover-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}



/* Subtle overlay only in editor for readability */
.editor-styles-wrapper .block-header-cover .header-cover-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 0;
}
