/**
 * Accent Component Styles
 *
 * Requires the nearest ancestor to be `position: relative` (or otherwise
 * positioned) so the accent's `position: absolute` resolves against it.
 * Consuming blocks override --accent-* custom properties, scoped to their
 * own container, to match their existing sizing/spacing per breakpoint.
 */

.c-accent {
	--accent-width: 1rem;
	--accent-height: 6.25rem;
	--accent-size: 3px;
	--accent-color: var(--color-primary);
	--accent-offset: var(--spacing-2);

	position: absolute;
	z-index: 1;
	display: block;
	width: var(--accent-width);
	height: var(--accent-height);
	border: 0 solid var(--accent-color);
	pointer-events: none;
}

.c-accent--top-left {
	left: 0;
	bottom: 100%;
	margin-bottom: var(--accent-offset);
	border-left-width: var(--accent-size);
	border-bottom-width: var(--accent-size);
}

.c-accent--top-right {
	right: 0;
	bottom: 100%;
	margin-bottom: var(--accent-offset);
	border-right-width: var(--accent-size);
	border-bottom-width: var(--accent-size);
}

.c-accent--bottom-left {
	left: 0;
	top: 100%;
	margin-top: var(--accent-offset);
	border-left-width: var(--accent-size);
	border-top-width: var(--accent-size);
}

.c-accent--bottom-right {
	right: 0;
	top: 100%;
	margin-top: var(--accent-offset);
	border-right-width: var(--accent-size);
	border-top-width: var(--accent-size);
}

/*
 * Inset variant: flush inside the corner (e.g. a badge inside a card)
 * instead of bridging outward past the container's edge.
 */
.c-accent--inset.c-accent--top-left,
.c-accent--inset.c-accent--top-right {
	bottom: auto;
	top: 0;
	margin-bottom: 0;
	margin-top: var(--accent-offset);
}

.c-accent--inset.c-accent--bottom-left,
.c-accent--inset.c-accent--bottom-right {
	top: auto;
	bottom: 0;
	margin-top: 0;
	margin-bottom: var(--accent-offset);
}
