/**
 * WC Widerruf — entry button (the one permitted global asset, §10).
 *
 * Inherit, don't style: button shape/typography come from the theme's .button /
 * .wp-element-button. We add only the "hervorgehoben" highlight and placement.
 * The accent resolves from a CSS variable that M5 populates; until then it falls
 * back to the inherited text color.
 */

/*
 * Accent priority chain (§5): per-site override (injected inline by Design when
 * set) wins; otherwise probe common theme / page-builder color vars, falling back
 * to the inherited text color. Never a hardcoded brand color.
 */
:root {
	--wc-widerruf-accent: var(--wp--preset--color--primary,
		var(--wp--preset--color--accent,
		var(--global-palette1,
		var(--theme-palette-color-1,
		var(--ast-global-color-0,
		var(--accent,
		var(--e-global-color-primary,
		currentColor)))))));
}

/*
 * Inheritance backstop — links don't always pick up theme button styling. These
 * are safe on any theme button (buttons aren't underlined and sit inline-block),
 * so the entry point reads as a button even on minimal themes, without overriding
 * the theme's own button shape/colors.
 */
.wc-widerruf-button {
	display: inline-block;
	text-decoration: none;
}

/* Explicit size (only applied when the admin opts out of "inherit"). */
.wc-widerruf-button--size-small {
	padding: 0.4em 0.9em;
	font-size: 0.85em;
}

.wc-widerruf-button--size-medium {
	padding: 0.6em 1.3em;
	font-size: 1em;
}

.wc-widerruf-button--size-large {
	padding: 0.85em 1.8em;
	font-size: 1.15em;
}

/* Highlight variants (hervorgehoben). */
.wc-widerruf-button--outline {
	box-shadow: inset 0 0 0 2px var(--wc-widerruf-accent);
}

.wc-widerruf-menu-link--outline {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 0.25em;
	box-shadow: inset 0 0 0 2px var(--wc-widerruf-accent);
}

/* "filled" and "inherit" lean on the theme button as-is; a per-site accent tints
   "filled" with a contrast-checked text color (injected inline by Design). */

/* Opt out of the inherited corner radius. */
.wc-widerruf-button--sharp {
	border-radius: 0;
}

.wc-widerruf-button:focus-visible,
.wc-widerruf-menu-link:focus-visible {
	outline: 2px solid var(--wc-widerruf-accent);
	outline-offset: 2px;
}

/* Footer auto-inject. */
.wc-widerruf-footer {
	padding: 1.25em 1em;
	text-align: right;
}

.wc-widerruf-footer--left {
	text-align: left;
}

.wc-widerruf-footer--center {
	text-align: center;
}

.wc-widerruf-footer--right {
	text-align: right;
}

/* Optional floating button (corner set by a position modifier). */
.wc-widerruf-floating {
	position: fixed;
	z-index: 9990;
}

.wc-widerruf-floating--bottom-right {
	right: 1.25rem;
	bottom: 1.25rem;
}

.wc-widerruf-floating--bottom-left {
	left: 1.25rem;
	bottom: 1.25rem;
}

.wc-widerruf-floating--top-right {
	right: 1.25rem;
	top: 1.25rem;
}

.wc-widerruf-floating--top-left {
	left: 1.25rem;
	top: 1.25rem;
}

@media print {
	.wc-widerruf-floating {
		display: none;
	}
}
