/* Every rule below the two roots is scoped under its root class, so it
   carries at least two classes. Themes style bare elements (`button:hover`,
   `[type="button"]`) and Elementor's kit styles `.elementor-kit-N a` - all
   (0,1,1) at most, loaded after this file. A one-class rule lost to them on
   order (measured on Hello Elementor: pink buttons, kit-coloured links).
   tests/js/consent-css-specificity.test.js enforces this. */

.cvrt-consent {
	position: fixed;
	inset-inline: 1rem;
	inset-block-end: 1rem;
	z-index: 99999;
	max-width: 32rem;
	margin-inline: auto;
	padding: 1rem 1.25rem;
	background: var( --cvrt-consent-bg );
	color: var( --cvrt-consent-fg );
	border-radius: var( --cvrt-consent-radius );
	box-shadow: var( --cvrt-consent-shadow );
	font-family: var( --cvrt-consent-font );
}

.cvrt-consent[hidden] {
	display: none;
}

/* Until the visitor decides, the page behind the banner is dimmed and takes
   no clicks (not on the legal pages - Cvrt_Legal_Consent::backdrop_here()).
   Scrolling is locked by consent.js through the html attribute. */
.cvrt-consent-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: var( --cvrt-consent-backdrop );
}

.cvrt-consent-backdrop[hidden] {
	display: none;
}

html[data-cvrt-consent-open] {
	overflow: hidden;
}

/* Parts of the banner are hidden with the `hidden` attribute. The browser's
   `[hidden]` rule is (0,1,0) and a theme's `[type="button"] { display:
   inline-block }` beats it, which showed "Auswahl speichern" too early. */
.cvrt-consent [hidden] {
	display: none;
}

.cvrt-consent .cvrt-consent__text {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	line-height: 1.5;
}

.cvrt-consent .cvrt-consent__actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.cvrt-consent .cvrt-consent__btn {
	flex: 1 1 auto;
	margin: 0;
	padding: 0.6rem 1rem;
	border: 1px solid var( --cvrt-consent-accent );
	border-radius: var( --cvrt-consent-radius );
	background: transparent;
	color: var( --cvrt-consent-fg );
	font: inherit;
	font-size: 0.9rem;
	line-height: 1.4;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.cvrt-consent .cvrt-consent__btn:hover,
.cvrt-consent .cvrt-consent__btn:focus-visible {
	background: var( --cvrt-consent-accent );
	color: var( --cvrt-consent-bg );
}

.cvrt-consent .cvrt-consent__btn:focus-visible {
	outline: 2px solid var( --cvrt-consent-accent );
	outline-offset: 2px;
}

.cvrt-consent .cvrt-consent__btn--accept,
.cvrt-consent .cvrt-consent__btn--save {
	background: var( --cvrt-consent-accent );
	color: var( --cvrt-consent-bg );
}

.cvrt-consent .cvrt-consent__btn--accept:hover,
.cvrt-consent .cvrt-consent__btn--save:hover {
	opacity: 0.88;
}

.cvrt-consent .cvrt-consent__title {
	margin: 0 0 0.35rem;
	color: var( --cvrt-consent-title );
	font-size: 0.95rem;
	font-weight: 700;
}

.cvrt-consent .cvrt-consent__options {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0 0 0.9rem;
	padding: 0.75rem;
	border: 1px solid var( --cvrt-consent-accent );
	border-radius: var( --cvrt-consent-radius );
}

.cvrt-consent .cvrt-consent__options[hidden] {
	display: none;
}

.cvrt-consent .cvrt-consent__option {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-size: 0.85rem;
	line-height: 1.45;
	cursor: pointer;
}

.cvrt-consent .cvrt-consent__option input {
	margin-top: 0.2rem;
	flex: 0 0 auto;
	accent-color: var( --cvrt-consent-accent );
}

.cvrt-consent .cvrt-consent__option strong {
	display: block;
}

.cvrt-consent .cvrt-consent__links {
	margin: 0.75rem 0 0;
	font-size: 0.8rem;
}

.cvrt-consent .cvrt-consent__links a {
	margin-right: 1rem;
	color: var( --cvrt-consent-link );
	font: inherit;
	text-decoration: underline;
}

.cvrt-consent .cvrt-consent__links a:hover,
.cvrt-consent .cvrt-consent__links a:focus-visible {
	color: var( --cvrt-consent-accent );
}

/* Shown where a blocked embed would be, so a held-back video reads as a
   choice rather than a broken page. Without it people accept everything
   just to make the page work. */
.cvrt-consent-placeholder {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	align-items: flex-start;
	padding: 1.25rem;
	border: 1px dashed currentColor;
	border-radius: var( --cvrt-consent-radius );
	font-family: var( --cvrt-consent-font );
	font-size: 0.85rem;
	line-height: 1.5;
}

.cvrt-consent-placeholder .cvrt-consent-placeholder__text {
	margin: 0;
}

.cvrt-consent-placeholder .cvrt-consent-placeholder__btn {
	margin: 0;
	padding: 0.5rem 0.9rem;
	border: 1px solid var( --cvrt-consent-accent );
	border-radius: var( --cvrt-consent-radius );
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.cvrt-consent-placeholder .cvrt-consent-placeholder__btn:hover,
.cvrt-consent-placeholder .cvrt-consent-placeholder__btn:focus-visible {
	background: var( --cvrt-consent-accent );
	color: var( --cvrt-consent-bg );
}

.cvrt-consent-placeholder .cvrt-consent-placeholder__btn:focus-visible {
	outline: 2px solid var( --cvrt-consent-accent );
	outline-offset: 2px;
}
