/**
 * GDPR Cookie Compliance (Moove) — the banner, the preferences modal and the
 * floating button, re-skinned with theme tokens.
 *
 * The plugin prints its colours inline right after its stylesheet, with
 * selectors of up to one id and four classes; the rules below repeat that
 * specificity and win by loading after it.
 *
 * Accept and reject share one format, both solid and the same size: the AEPD
 * asks that rejecting is no harder to see than accepting.
 */

/* Banner */
#moove_gdpr_cookie_info_bar.gdpr_infobar_postion_bottom_right:not(.gdpr-full-screen-infobar) {
	border-radius: var(--wp--custom--radius--card);
	box-shadow: var(--wp--preset--shadow--card-hover);
	background-color: var(--wp--preset--color--background-primary);
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p,
#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p > a {
	font-size: var(--wp--preset--font-size--body-sm);
	font-weight: 400;
	line-height: 1.5;
	color: var(--wp--preset--color--text-primary);
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p + p {
	margin-block-start: var(--wp--preset--spacing--20);
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p strong {
	font-size: var(--wp--preset--font-size--body-md);
	font-weight: 600;
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p > a,
#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p > .change-settings-button {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 600;
	color: var(--wp--preset--color--text-primary);
	text-decoration: underline;
	cursor: pointer;
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p > a:hover,
#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content p > .change-settings-button:hover {
	color: var(--wp--preset--color--text-brand);
}

/* Buttons, banner and modal: the theme's button box. */
#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content button.mgbutton,
#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton {
	padding: var(--wp--preset--spacing--25) var(--wp--preset--spacing--35);
	border: 0;
	border-radius: var(--wp--custom--radius--button);
	font-size: var(--wp--preset--font-size--button);
	font-weight: 600;
	line-height: 1.1;
	margin: 0;
	text-transform: none;
	color: var(--wp--preset--color--text-inverse);
	background-color: var(--wp--preset--color--background-brand);
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content button.mgbutton:hover,
#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton:hover {
	color: var(--wp--preset--color--text-inverse);
	background-color: var(--wp--custom--color--brand-hover);
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content button.mgbutton.moove-gdpr-infobar-reject-btn,
#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton:not(.moove-gdpr-modal-allow-all) {
	background-color: var(--wp--preset--color--background-inverse);
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content button.mgbutton.moove-gdpr-infobar-reject-btn:hover,
#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton:not(.moove-gdpr-modal-allow-all):hover {
	background-color: var(--wp--preset--color--text-secondary);
}

/* Modal */

/* The plugin focuses the dialog while it still sits at the end of <body>, which scrolled the page to the footer. */
body > #moove_gdpr_cookie_modal {
	position: fixed;
	inset-block-start: 0;
}

#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-title div.tab-title,
#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-tab-main div.tab-title {
	font-weight: 600;
}

#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-footer-content .moove-gdpr-button-holder {
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	width: auto;
	max-width: 100%;
	margin: 0;
}

/* Mobile stacks the three buttons, so the footer leaves its fixed 70px slot and flows under the content. */
@media (max-width: 767px) {
	#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2,
	#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-right-content {
		height: auto;
	}

	#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-right-content {
		padding-block-end: var(--wp--preset--spacing--30);
	}

	#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-footer-content {
		position: static;
		height: auto;
		padding-block-start: var(--wp--preset--spacing--20);
		border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--border-default);
	}

	/* The plugin's separator is placed for the fixed footer; the border above replaces it. */
	#moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content::before {
		display: none;
	}

	#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v2 .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton {
		flex: 1 1 100%;
	}
}

#moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-tab-main a {
	color: var(--wp--preset--color--text-primary);
	text-decoration: underline;
}

#moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-close span.gdpr-icon {
	border-color: var(--wp--preset--color--background-inverse);
	background-color: var(--wp--preset--color--background-inverse);
}

#moove_gdpr_cookie_modal .cookie-switch .cookie-slider {
	background-color: var(--wp--preset--color--text-secondary);
}

#moove_gdpr_cookie_modal .cookie-switch input:checked + .cookie-slider {
	background-color: var(--wp--preset--color--background-brand);
}

#moove_gdpr_cookie_modal .cookie-switch .gdpr-sr-enable {
	color: var(--wp--preset--color--text-primary);
}

#moove_gdpr_cookie_modal .cookie-switch .gdpr-sr-disable {
	color: var(--wp--preset--color--text-secondary);
}

/* Floating button */
#moove_gdpr_save_popup_settings_button {
	color: var(--wp--preset--color--text-inverse);
	background-color: var(--wp--preset--color--background-inverse);
}

#moove_gdpr_save_popup_settings_button:hover,
#moove_gdpr_save_popup_settings_button:focus {
	background-color: var(--wp--preset--color--background-brand);
}
