/* WB Design System — Context Theming & Shared Utilities
 * Each plugin wraps its output in .wb-ctx-{slug} to activate its theme colors.
 * Shared .wb-* components consume --wb-ctx-* variables set here.
 */

/* -- Default Context (no wrapper present) -------------------------------- */
:root {
	--wb-ctx-bg: #fff;
	--wb-ctx-primary: var(--wb-page-color-btn, var(--wb-grau, #727575));
	--wb-ctx-text: #1a1a1a;
	--wb-ctx-radius: 0;
	--wb-ctx-btn-bg: var(--wb-ctx-primary);
	--wb-ctx-btn-text: #fff;
	--wb-ctx-btn-border: var(--wb-ctx-primary);
	--wb-ctx-btn-hover-bg: transparent;
	--wb-ctx-btn-outline-border: var(--wb-ctx-primary);
	--wb-ctx-btn-outline-text: var(--wb-ctx-primary);
}

/* -- Context: LandLiebe ------------------------------------------------ */

.wb-ctx-ll {
	--wb-ctx-bg: var(--wb-ll-bg);
	--wb-ctx-primary: var(--wb-ll-primary);
	--wb-ctx-text: var(--wb-ll-text);
	--wb-ctx-radius: var(--wb-ll-radius);
	--wb-ctx-btn-bg: var(--wb-ctx-primary);
	--wb-ctx-btn-text: #fff;
	--wb-ctx-btn-border: var(--wb-ctx-primary);
	--wb-ctx-btn-hover-bg: rgba(255, 255, 255, 0.15);
	--wb-ctx-btn-outline-border: rgba(255, 255, 255, 0.4);
	--wb-ctx-btn-outline-text: var(--wb-ctx-text);
}

/* -- Context: Kultur Veranstaltungen ----------------------------------- */

.wb-ctx-kv {
	--wb-ctx-bg: var(--wb-kv-bg);
	--wb-ctx-primary: var(--wb-kv-primary);
	--wb-ctx-text: var(--wb-kv-text);
	--wb-ctx-radius: var(--wb-kv-radius);
	--wb-ctx-btn-bg: var(--wb-ctx-primary);
	--wb-ctx-btn-text: #fff;
	--wb-ctx-btn-border: var(--wb-ctx-primary);
	--wb-ctx-btn-hover-bg: rgba(255, 255, 255, 0.15);
	--wb-ctx-btn-outline-border: rgba(255, 255, 255, 0.4);
	--wb-ctx-btn-outline-text: var(--wb-ctx-text);
}

/* -- Utilities --------------------------------------------------------- */

.wb-hidden { display: none !important; }
.wb-step-hidden { display: none !important; }

/* -- Text color cascade ------------------------------------------------ */

.wb-ctx-ll, .wb-ctx-kv {
	color: var(--wb-ctx-text, #fff);
}

.wb-ctx-ll h1, .wb-ctx-ll h2, .wb-ctx-ll h3, .wb-ctx-ll h4,
.wb-ctx-ll p, .wb-ctx-ll label, .wb-ctx-ll span, .wb-ctx-ll strong,
.wb-ctx-kv h1, .wb-ctx-kv h2, .wb-ctx-kv h3, .wb-ctx-kv h4,
.wb-ctx-kv p, .wb-ctx-kv label, .wb-ctx-kv span, .wb-ctx-kv strong {
	color: var(--wb-ctx-text, #fff);
}

/* -- Shared Keyframes -------------------------------------------------- */

@keyframes wb-pulse {
	0%, 100% { opacity: 0.4; }
	50% { opacity: 0.9; }
}

@keyframes wb-bounce {
	0%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-0.5rem); }
}

@keyframes wb-spin {
	to { transform: rotate(360deg); }
}

@keyframes wb-modal-in {
	from { opacity: 0; transform: translateY(1.25rem) scale(0.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* -- Date input placeholder: lowercase (tt.mm.jjjj) ------------------- */

input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="date"]::-webkit-datetime-edit-text {
	text-transform: lowercase;
}

/* -- Shared link reset ------------------------------------------------- */

.wb-link {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.8125rem;
	cursor: pointer;
	text-decoration: underline;
}

.wb-link-danger {
	color: #c0392b;
}

.wb-link-danger:hover {
	color: #a93226;
}

/* -- Single page title ------------------------------------------------ */

.wb-single-title {
	margin: 0 0 4px;
	font-size: 26px !important;
	line-height: 1.4 !important;
	color: var(--wb-ctx-text, #fff) !important;
}

/* -- Badge group ------------------------------------------------------ */

.wb-badge-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-bottom: 0.375rem;
}

/* -- Page Builder Isolation --------------------------------------------- */

/* Prevent Elementor button styles from overriding wb-button inside context wrappers */
.wb-ctx-ll .wb-button,
.wb-ctx-kv .wb-button {
	background: transparent;
	border: 0.125rem solid var(--wb-ctx-btn-outline-border, rgba(255, 255, 255, 0.4));
	border-radius: var(--wb-ctx-radius, 0.9375rem);
	color: var(--wb-ctx-btn-outline-text, var(--wb-ctx-text, #fff));
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.wb-ctx-ll .wb-button-primary,
.wb-ctx-kv .wb-button-primary {
	background: var(--wb-ctx-btn-bg);
	border-color: var(--wb-ctx-btn-border);
	color: var(--wb-ctx-btn-text);
}

/* Prevent context text color cascade from leaking into Elementor widgets */
.wb-ctx-ll .elementor-widget,
.wb-ctx-kv .elementor-widget {
	color: inherit;
}

/* Reset WPBakery text column color override inside context wrappers */
.wb-ctx-ll .wpb_text_column,
.wb-ctx-kv .wpb_text_column {
	color: var(--wb-ctx-text, #fff);
}
