/**
 * Front styles for core/cover block
 * Tokenized overlay and automatic text colors
 */

/* Border radius for 50-50 layout */
.wp-block-cover.img-50-50-left {
  border-top-left-radius: var(--wp--custom--primitives--size--80, 8px);
  border-bottom-left-radius: var(--wp--custom--primitives--size--80, 8px);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

@media (max-width: 768px) {
  .wp-block-cover.img-50-50-left {
    border-top-left-radius: var(--wp--custom--primitives--size--80, 8px);
    border-top-right-radius: var(--wp--custom--primitives--size--80, 8px);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}

/* Overlay backdrop with semantic color (transparency included in rgba value) */
.wp-block-cover .wp-block-cover__background {
  background-color: var(
    --wp--custom--semantic--color--background--backdrop,
    rgba(0, 26, 73, 0.4)
  ) !important;
  opacity: 1 !important;
}

.wp-block-cover.has-background-dim:before {
  background-color: var(
    --wp--custom--semantic--color--background--backdrop,
    rgba(0, 26, 73, 0.4)
  ) !important;
  opacity: 1 !important;
}

/* Automatic text color based on backdrop (dark background = white text) */
.wp-block-cover.has-backdrop-background-color {
  color: var(--wp--custom--semantic--color--text--inverse, #ffffff);
}
