/**
 * The accept button of the consent overlays: the map's consent box, the
 * video and tour tiles and the Calendly box (`Consent\Consent_Button`).
 *
 * With a page builder the button carries the builder's own button classes
 * and looks like the theme's buttons; this file adds only the focus ring and
 * the [hidden] state. Without one it carries Bootstrap's `btn btn-primary`,
 * which the skin styles inside `.immomakler`, and the `--plain` class, whose
 * look below applies wherever the skin's rule does not reach -- also on a
 * page with the wrapper but without the skin's stylesheet. Inside the skin
 * Bootstrap's more specific `.btn` rules win, so the look sets nothing
 * Bootstrap leaves alone (no shadow, no minimum height): the skin's consent
 * buttons look like every other Bootstrap button.
 */

.immomakler-consent-button--plain {
	display: inline-block;
	padding: 0.65em 1.5em;
	border: 0;
	border-radius: 6px;
	background-color: #fff;
	color: #1a1a1a;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
}

.immomakler-consent-button--plain:hover {
	background-color: #ececec;
	color: #1a1a1a;
}

/*
 * The overlays are dark and blurred: a white ring with a dark halo shows
 * on both. Scoped to the overlays and the element, so it outranks themes
 * that switch focus outlines off (Avada's "fusion-disable-outline", 0,3,0).
 */
:is(.immomakler-map-consent, .immomakler-media-tile__consent, .immomakler-calendly__consent) button.immomakler-consent-button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.6);
}

/*
 * The consent scripts hide the button where a consent plugin offers no way
 * back into its dialog; a builder's button class sets a display of its own.
 */
.immomakler-consent-button[hidden] {
	/* stylelint-disable-next-line declaration-no-important */
	display: none !important;
}

/* The tile's own trigger keeps its look, but shows where the keyboard is. */
.immomakler-media-tile__trigger:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -6px;
}

/*
 * Elementor colours a button through its Button widget's wrapper, which an
 * overlay does not have: the bare class is Elementor's grey, and a theme's
 * rule for every <button> shows through (Hello Elementor: a border in its
 * link colour). The button takes the kit's "Accent" like Elementor's own
 * buttons. :where() keeps the rule as weak as the bare class, so a button
 * style from the kit's Theme Style, which names the kit, still wins.
 */
.immomakler-consent-button:where(.elementor-button) {
	border-color: transparent;
	background-color: var(--e-global-color-accent, #69727d);
}
