/*
 * VME Contact Button
 * Alle Selektoren beginnen mit #vme-cb, damit Theme-Resets
 * (z. B. Hello Elementor: button { border: 1px solid #c36; … }) nicht greifen.
 * Das Formular-Design entspricht dem Kontaktformular auf visionmakers.nl/contact-visionmakers/.
 */

#vme-cb {
	--vme-cb-ease: cubic-bezier(.22, .61, .36, 1);
	--vme-cb-ink: #282d27;
	--vme-cb-field-border: #69727d;
	--vme-cb-field-text: #7a7a7a;
	--vme-cb-heading-font: "VME Manrope", Manrope, Arial, sans-serif;
	--vme-cb-field-font: Roboto, Arial, sans-serif;
}

/* ---------- Schwebender Button ---------- */
#vme-cb .vme-cb__button {
	position: fixed;
	left: var(--vme-cb-left, 24px);
	bottom: var(--vme-cb-bottom, 24px);
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: .55em;
	width: auto;
	min-height: 0;
	margin: 0;
	padding: 1em 1.5em;
	border: 1px solid var(--vme-cb-border, #a5c614);
	border-radius: var(--vme-cb-radius, 50px);
	background: var(--vme-cb-bg, #a5c614);
	color: var(--vme-cb-fg, #282d27);
	font-family: var(--vme-cb-heading-font);
	font-size: var(--vme-cb-font-size, 15px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: 0 8px 24px rgba(40, 45, 39, .18);
	/* Startzustand: unterhalb des Viewports versteckt */
	opacity: 0;
	visibility: hidden;
	transform: translateY(calc(100% + var(--vme-cb-bottom, 24px) + 20px));
	transition:
		transform .55s var(--vme-cb-ease),
		opacity .35s ease,
		visibility 0s linear .55s,
		background-color .18s ease,
		color .18s ease,
		border-color .18s ease,
		box-shadow .2s ease;
}

#vme-cb.is-visible .vme-cb__button {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition:
		transform .55s var(--vme-cb-ease),
		opacity .35s ease,
		visibility 0s linear 0s,
		background-color .18s ease,
		color .18s ease,
		border-color .18s ease,
		box-shadow .2s ease;
}

#vme-cb.is-visible:not(.is-open) .vme-cb__button:hover,
#vme-cb.is-visible:not(.is-open) .vme-cb__button:focus-visible {
	background: var(--vme-cb-hover-bg, #658000);
	border-color: var(--vme-cb-hover-bg, #658000);
	color: var(--vme-cb-hover-fg, #fff);
	box-shadow: 0 12px 30px rgba(40, 45, 39, .26);
	transform: translateY(-2px);
}

#vme-cb .vme-cb__button:focus-visible,
#vme-cb .vme-cb__close:focus-visible {
	outline: 2px solid var(--vme-cb-ink);
	outline-offset: 3px;
}

#vme-cb .vme-cb__icon { flex: 0 0 auto; }

/* Button ausblenden, solange das Panel offen ist */
#vme-cb.is-open .vme-cb__button {
	opacity: 0;
	visibility: hidden;
	transform: translateX(-20px);
}

/* ---------- Overlay ---------- */
#vme-cb .vme-cb__overlay {
	position: fixed;
	inset: 0;
	z-index: 99991;
	background: var(--vme-cb-overlay, rgba(0, 0, 0, .45));
	opacity: 0;
	transition: opacity .3s ease;
}
#vme-cb.is-open .vme-cb__overlay { opacity: 1; }

/* ---------- Slide-out-Panel ---------- */
#vme-cb .vme-cb__panel {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 99992;
	display: flex;
	flex-direction: column;
	width: var(--vme-cb-panel-width, 480px);
	max-width: 100vw;
	box-sizing: border-box;
	background: var(--vme-cb-panel-bg, #e7ebdd);
	color: var(--vme-cb-panel-fg, #282d27);
	box-shadow: 8px 0 40px rgba(40, 45, 39, .22);
	transform: translateX(-105%);
	visibility: hidden;
	transition: transform .45s var(--vme-cb-ease), visibility 0s linear .45s;
}
#vme-cb.is-open .vme-cb__panel {
	transform: translateX(0);
	visibility: visible;
	transition: transform .45s var(--vme-cb-ease), visibility 0s linear 0s;
}

/* Höhe "an Inhalt anpassen": unten links verankert */
#vme-cb.vme-cb--auto-height .vme-cb__panel {
	top: auto;
	bottom: var(--vme-cb-bottom, 24px);
	max-height: calc(100vh - 2 * var(--vme-cb-bottom, 24px));
	max-height: calc(100dvh - 2 * var(--vme-cb-bottom, 24px));
	max-width: calc(100vw - var(--vme-cb-left, 24px));
}

#vme-cb .vme-cb__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--vme-cb-panel-fg, #282d27);
	box-shadow: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background-color .18s ease;
}
#vme-cb .vme-cb__close:hover,
#vme-cb .vme-cb__close:focus {
	background: rgba(40, 45, 39, .08);
	color: var(--vme-cb-panel-fg, #282d27);
}

#vme-cb .vme-cb__body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0;
	padding: 32px;
	background: transparent;
	font-family: var(--vme-cb-heading-font);
	color: inherit;
	line-height: 1.65;
	box-sizing: border-box;
}

/* Überschrift wie ".vme-form h2" */
#vme-cb .vme-cb__title {
	margin: 0 0 25px;
	padding-right: 40px;
	font-family: var(--vme-cb-heading-font);
	font-size: 30px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.04em;
	color: inherit;
}

#vme-cb .vme-cb__intro {
	margin: -10px 0 20px;
	font-size: 16px;
}

/* ---------- Formular (Elementor-Formular + generische Felder) ---------- */
#vme-cb .vme-cb__form .elementor-form-fields-wrapper {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -5px -10px;
}
#vme-cb .vme-cb__form .elementor-field-group {
	padding: 0 5px;
	margin-bottom: 10px;
	box-sizing: border-box;
}

#vme-cb .vme-cb__form label,
#vme-cb .vme-cb__form .elementor-field-label {
	display: block;
	margin: 0;
	padding: 0;
	font-family: var(--vme-cb-field-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	color: var(--vme-cb-field-text);
}
#vme-cb .vme-cb__form .elementor-mark-required .elementor-field-label::after {
	content: "*";
	color: red;
	padding-inline-start: .2em;
}

#vme-cb .vme-cb__form input[type="text"],
#vme-cb .vme-cb__form input[type="email"],
#vme-cb .vme-cb__form input[type="tel"],
#vme-cb .vme-cb__form input[type="url"],
#vme-cb .vme-cb__form input[type="number"],
#vme-cb .vme-cb__form select,
#vme-cb .vme-cb__form textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	margin: 4px 0 0;
	padding: 13px;
	border: 1px solid var(--vme-cb-field-border);
	border-radius: 3px;
	background-color: #fff;
	color: var(--vme-cb-ink);
	font-family: var(--vme-cb-field-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	box-shadow: none;
	box-sizing: border-box;
}
#vme-cb .vme-cb__form select {
	padding-right: 34px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23282d27' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	background-size: 10px 7px;
	color: var(--vme-cb-field-text);
}
#vme-cb .vme-cb__form .elementor-select-wrapper::before { display: none; }
#vme-cb .vme-cb__form textarea {
	min-height: 150px;
	resize: vertical;
}
#vme-cb .vme-cb__form input::placeholder,
#vme-cb .vme-cb__form textarea::placeholder {
	color: inherit;
	opacity: .6;
}
#vme-cb .vme-cb__form input:focus,
#vme-cb .vme-cb__form select:focus,
#vme-cb .vme-cb__form textarea:focus {
	outline: 0;
	border-color: var(--vme-cb-ink);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}

#vme-cb .vme-cb__form input[type="checkbox"] {
	width: auto;
	min-height: 0;
	margin: 0 .4em 0 0;
	accent-color: var(--vme-cb-ink);
}

/* Hinweis "* Verplichte velden" / Datenschutz */
#vme-cb .vme-cb__form .elementor-field-type-html {
	margin-bottom: 0;
}
#vme-cb .vme-cb__form .vme-caption,
#vme-cb .vme-cb__form .elementor-field-type-html,
#vme-cb .vme-cb__form .wpcf7-acceptance {
	font-family: var(--vme-cb-heading-font);
	font-size: 12px;
	line-height: 1.5;
	color: var(--vme-cb-ink);
}
#vme-cb .vme-cb__form .vme-caption,
#vme-cb .vme-cb__form .wpcf7-acceptance { margin: 20px 0; }
#vme-cb .vme-cb__form a {
	color: inherit;
	text-decoration: underline;
}

/* Absendebutton */
#vme-cb .vme-cb__form button[type="submit"],
#vme-cb .vme-cb__form input[type="submit"],
#vme-cb .vme-cb__form .elementor-button {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: 22px;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 17px 25px;
	border: 1px solid var(--vme-cb-ink);
	border-radius: 50px;
	background: var(--vme-cb-submit-bg, #61ce70);
	color: var(--vme-cb-submit-fg, #fff);
	font-family: var(--vme-cb-field-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	transition: filter .18s ease, transform .18s ease;
}
#vme-cb .vme-cb__form button[type="submit"]:hover,
#vme-cb .vme-cb__form input[type="submit"]:hover,
#vme-cb .vme-cb__form .elementor-button:hover {
	background: var(--vme-cb-submit-bg, #61ce70);
	color: var(--vme-cb-submit-fg, #fff);
	filter: brightness(.94);
	transform: translateY(-2px);
}

/* Meldungen */
#vme-cb .vme-cb__form .elementor-message,
#vme-cb .vme-cb__form .wpcf7-response-output {
	margin: 10px 0;
	font-size: 14px;
	line-height: 1.4;
}

/* Contact Form 7: Absätze kompakter */
#vme-cb .vme-cb__form .wpcf7 p { margin: 0 0 10px; }

/* Scrollen der Seite sperren, wenn Panel offen */
html.vme-cb-lock,
html.vme-cb-lock body { overflow: hidden; }

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
	#vme-cb .vme-cb__panel,
	#vme-cb.vme-cb--auto-height .vme-cb__panel {
		width: 100vw;
		max-width: 100vw;
		top: 0;
		bottom: 0;
		max-height: none;
	}
	#vme-cb .vme-cb__body { padding: 23px; }
	#vme-cb .vme-cb__title { font-size: 26px; }
	#vme-cb.vme-cb--hide-mobile { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	#vme-cb .vme-cb__button,
	#vme-cb .vme-cb__panel,
	#vme-cb .vme-cb__overlay { transition-duration: .01ms !important; }
}

/* Elementor: eigener Pfeil statt des Elementor-Carets */
#vme-cb .vme-cb__form .select-caret-down-wrapper { display: none; }
#vme-cb .vme-cb__form .elementor-select-wrapper { position: relative; width: 100%; border: 0; padding: 0; background: none; }
