/**
 * "Gradient border" block support — ported from
 * https://github.com/georgestephanis/gradient-borders-for-blocks (also
 * cloned locally at wp-content/plugins/gradient-borders-for-blocks in the
 * `test` Local site). Adds a gradient-border toggle to the Inspector's
 * native Border & Shadow panel for any block that supports `border`; the
 * JS half (assets/js/gradient-borders/index.js) registers the attribute
 * and controls, the render_block filter in includes/gradient-borders.php
 * applies the same classes/custom properties on the front end.
 *
 * Loaded unconditionally (enqueue_block_assets) rather than gated to a
 * template like gutenberg.css, since any block on any page can opt into a
 * gradient border once this is enabled.
 *
 * Two variants, chosen server/client-side by whether the block has a
 * border-radius set:
 *
 * - `--flat`    (no radius): `border-image`. Never touches `background`,
 *   so it's always safe regardless of the block's own background — its
 *   only cost is square corners.
 * - `--rounded` (radius set, and the block's own background resolved to a
 *   literal color/gradient): `background-clip` double-background. Needs
 *   `border-color: transparent` (forced with `!important`, since core may
 *   already set an inline border-color) and stacks the block's own
 *   background as an opaque `padding-box` layer on top of the gradient
 *   `border-box` layer — see gradient-borders-for-blocks.php's docblocks
 *   for why the interior fill can't just be left transparent.
 *
 * `border-style`/`border-width` below exist only as a fallback for blocks
 * that haven't set their own border width via the native Border & Shadow
 * panel (which core renders as an inline `style` attribute) — any real width
 * the author picks must win rather than being clobbered by our default. The
 * single class selector (0,1,0) gets that: it loses to inline styles, while
 * still beating Enfold's global reset in `enfold/css/base.css`, which sets
 * `border: 0; border-style: none` on a long list of bare element selectors
 * (0,0,1).
 *
 * That reset is why these can't be wrapped in `:where()`, which is where they
 * started — the intent being to drop the fallback to zero specificity so
 * anything at all would outrank it. Zero also lost to the reset, so
 * `border-style` stayed `none`, and CSS collapses the computed `border-width`
 * to `0` whenever the style is `none`. That left no border area for either
 * variant below to paint into, and every gradient border silently rendered
 * nothing on the front end. It looked correct in the editor canvas, which
 * doesn't load Enfold's reset — which is what made it easy to miss.
 *
 * `border-style` in particular has to be declared here rather than left to
 * the author: core's border support serializes width, color, and radius, but
 * never `border-style`, so nothing else in the cascade sets it.
 */
.has-gbfb-gradient-border {
  border-style: solid;
  border-width: 2px;
}

.has-gbfb-gradient-border--flat {
  border-image: var(--gbfb-gradient) 1;
}

.has-gbfb-gradient-border--rounded {
  background: var(--gbfb-own-background, transparent) padding-box, var(--gbfb-gradient) border-box;
  border-color: transparent !important;
}

/*# sourceMappingURL=gradient-borders.css.map */
