/**
 * FBM UI Core – semantische Button-Farben (inklusionet Web)
 *
 * Rot: Abbrechen, Schließen | Blau: Zurück, Überspringen | Grün: Speichern, Weiter, OK
 *
 * @package FBM_UI_Core
 */

:root {
	--fbm-ui-btn-radius: 8px;
	--fbm-ui-btn-success: #16a34a;
	--fbm-ui-btn-success-hover: #15803d;
	--fbm-ui-btn-success-text: #ffffff;
	--fbm-ui-btn-nav: #2563eb;
	--fbm-ui-btn-nav-hover: #1d4ed8;
	--fbm-ui-btn-nav-text: #ffffff;
	--fbm-ui-btn-cancel: #dc2626;
	--fbm-ui-btn-cancel-hover: #b91c1c;
	--fbm-ui-btn-cancel-text: #ffffff;
}

/* --- Einheitliche Rundung (Aktions-Buttons & Modal-Footer) --- */
.fbm-btn.fbm-btn--success,
.fbm-btn.fbm-btn-success,
.fbm-btn.fbm-btn--back,
.fbm-btn.fbm-btn-back,
.fbm-btn.fbm-btn--skip,
.fbm-btn.fbm-btn-skip,
.fbm-btn.fbm-btn--cancel,
.fbm-btn.fbm-btn-cancel,
.fbm-btn.fbm-btn--danger,
button.fbm-btn--success,
button.fbm-btn--back,
button.fbm-btn--skip,
button.fbm-btn--cancel,
a.fbm-btn--success,
a.fbm-btn--back,
a.fbm-btn--skip,
a.fbm-btn--cancel,
.fbm-ui-modal-close-btn,
.fbm-bm-modal-close-btn {
	border-radius: var(--fbm-ui-btn-radius);
}

/* --- Basis (ergänzt bestehendes .fbm-btn-Layout in Plugins) --- */
.fbm-btn.fbm-btn--success,
.fbm-btn.fbm-btn-success,
button.fbm-btn--success,
a.fbm-btn--success {
	background: var(--fbm-ui-btn-success) !important;
	border: 2px solid var(--fbm-ui-btn-success) !important;
	color: var(--fbm-ui-btn-success-text) !important;
}

.fbm-btn.fbm-btn--success:hover:not(:disabled),
.fbm-btn.fbm-btn-success:hover:not(:disabled),
button.fbm-btn--success:hover:not(:disabled),
a.fbm-btn--success:hover:not(:disabled) {
	background: var(--fbm-ui-btn-success-hover) !important;
	border-color: var(--fbm-ui-btn-success-hover) !important;
	color: var(--fbm-ui-btn-success-text) !important;
}

.fbm-btn.fbm-btn--back,
.fbm-btn.fbm-btn-back,
.fbm-btn.fbm-btn--skip,
.fbm-btn.fbm-btn-skip,
button.fbm-btn--back,
button.fbm-btn--skip,
a.fbm-btn--back,
a.fbm-btn--skip {
	background: var(--fbm-ui-btn-nav) !important;
	border: 2px solid var(--fbm-ui-btn-nav) !important;
	color: var(--fbm-ui-btn-nav-text) !important;
}

.fbm-btn.fbm-btn--back:hover:not(:disabled),
.fbm-btn.fbm-btn-back:hover:not(:disabled),
.fbm-btn.fbm-btn--skip:hover:not(:disabled),
.fbm-btn.fbm-btn-skip:hover:not(:disabled),
button.fbm-btn--back:hover:not(:disabled),
button.fbm-btn--skip:hover:not(:disabled),
a.fbm-btn--back:hover:not(:disabled),
a.fbm-btn--skip:hover:not(:disabled) {
	background: var(--fbm-ui-btn-nav-hover) !important;
	border-color: var(--fbm-ui-btn-nav-hover) !important;
	color: var(--fbm-ui-btn-nav-text) !important;
}

.fbm-btn.fbm-btn--cancel,
.fbm-btn.fbm-btn-cancel,
.fbm-btn.fbm-btn--danger,
button.fbm-btn--cancel,
a.fbm-btn--cancel {
	background: var(--fbm-ui-btn-cancel) !important;
	border: 2px solid var(--fbm-ui-btn-cancel) !important;
	color: var(--fbm-ui-btn-cancel-text) !important;
}

.fbm-btn.fbm-btn--cancel:hover:not(:disabled),
.fbm-btn.fbm-btn-cancel:hover:not(:disabled),
.fbm-btn.fbm-btn--danger:hover:not(:disabled),
button.fbm-btn--cancel:hover:not(:disabled),
a.fbm-btn--cancel:hover:not(:disabled) {
	background: var(--fbm-ui-btn-cancel-hover) !important;
	border-color: var(--fbm-ui-btn-cancel-hover) !important;
	color: var(--fbm-ui-btn-cancel-text) !important;
}

.fbm-btn.fbm-btn--success:focus-visible,
.fbm-btn.fbm-btn--back:focus-visible,
.fbm-btn.fbm-btn--skip:focus-visible,
.fbm-btn.fbm-btn--cancel:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

/* Modal: Schließen-X und Footer „Schließen“ */
.fbm-ui-modal-close,
.fbm-bm-modal-close,
.fbm-invite-qr-modal-close.fbm-ui-modal-close {
	color: var(--fbm-ui-btn-cancel) !important;
}

.fbm-ui-modal-close:hover,
.fbm-ui-modal-close:focus-visible,
.fbm-bm-modal-close:hover,
.fbm-bm-modal-close:focus-visible,
.fbm-invite-qr-modal-close.fbm-ui-modal-close:hover,
.fbm-invite-qr-modal-close.fbm-ui-modal-close:focus-visible {
	color: var(--fbm-ui-btn-cancel-hover) !important;
	background: rgba(220, 38, 38, 0.08);
}

.fbm-ui-modal-close-btn,
.fbm-bm-modal-close-btn {
	background: var(--fbm-ui-btn-cancel) !important;
	border-color: var(--fbm-ui-btn-cancel) !important;
	color: var(--fbm-ui-btn-cancel-text) !important;
}

.fbm-ui-modal-close-btn:hover:not(:disabled),
.fbm-bm-modal-close-btn:hover:not(:disabled) {
	background: var(--fbm-ui-btn-cancel-hover) !important;
	border-color: var(--fbm-ui-btn-cancel-hover) !important;
	color: var(--fbm-ui-btn-cancel-text) !important;
}

html[data-theme='dark-mode'] .fbm-ui-modal-close-btn,
html[data-theme='dark-mode'] .fbm-bm-modal-close-btn {
	background: var(--fbm-ui-btn-cancel) !important;
	border-color: var(--fbm-ui-btn-cancel) !important;
	color: var(--fbm-ui-btn-cancel-text) !important;
}

html[data-theme='dark-mode'] .fbm-ui-modal-close-btn:hover:not(:disabled),
html[data-theme='dark-mode'] .fbm-bm-modal-close-btn:hover:not(:disabled) {
	background: var(--fbm-ui-btn-cancel-hover) !important;
	border-color: var(--fbm-ui-btn-cancel-hover) !important;
}

@media (prefers-reduced-motion: reduce) {
	.fbm-btn.fbm-btn--success,
	.fbm-btn.fbm-btn--back,
	.fbm-btn.fbm-btn--skip,
	.fbm-btn.fbm-btn--cancel {
		transition: none;
	}
}
