/* EW Contact Form. Farben folgen den Blocksy-Paletten der Website, mit Fallbacks. */
.ewcf {
	--ewcf-accent: var(--theme-palette-color-2, #6a563f);
	--ewcf-accent-hover: #7d6649;
	--ewcf-navy: var(--theme-palette-color-1, #333c4e);
	--ewcf-radius: 3px;
	--ewcf-field-bg: #fff;
	--ewcf-field-text: #000;
	--ewcf-field-border: rgba(0, 0, 0, .25);
	--ewcf-text: #fff;
	--ewcf-muted: rgba(255, 255, 255, .75);
	--ewcf-chip-border: rgba(255, 255, 255, .45);
	--ewcf-chip-bg: transparent;
	--ewcf-drop-border: rgba(255, 255, 255, .5);
	--ewcf-error: #ffb4a8;
	max-width: 760px;
	color: var(--ewcf-text);
	font-size: 16px;
	line-height: 1.5;
}
.ewcf--light {
	--ewcf-text: var(--theme-palette-color-1, #333c4e);
	--ewcf-muted: #5b6270;
	--ewcf-field-border: var(--theme-palette-color-5, #e1e8ed);
	--ewcf-chip-border: var(--theme-palette-color-5, #e1e8ed);
	--ewcf-chip-bg: var(--theme-palette-color-6, #f2f5f7);
	--ewcf-drop-border: #b7c0c9;
	--ewcf-error: #b3261e;
}
.ewcf *, .ewcf *::before, .ewcf *::after { box-sizing: border-box; }

.ewcf__form { display: grid; gap: 22px; }
.ewcf__form[hidden] { display: none; }
.ewcf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .ewcf__row { grid-template-columns: 1fr; } }

.ewcf__field { margin: 0; padding: 0; border: 0; min-width: 0; }
.ewcf label, .ewcf legend, .ewcf .ewcf__label {
	display: block; padding: 0; margin: 0 0 8px;
	font-weight: 700; font-size: 16px; color: var(--ewcf-text);
}
.ewcf__opt { font-weight: 400; color: var(--ewcf-muted); }

.ewcf input[type=text], .ewcf input[type=email], .ewcf input[type=tel], .ewcf textarea {
	width: 100%; min-height: 50px; padding: 0 14px;
	font: inherit; color: var(--ewcf-field-text); background: var(--ewcf-field-bg);
	border: 1px solid var(--ewcf-field-border); border-radius: var(--ewcf-radius);
	transition: border-color .15s, box-shadow .15s;
}
.ewcf textarea { padding: 14px; min-height: 150px; resize: vertical; }
.ewcf input:focus-visible, .ewcf textarea:focus-visible {
	outline: 0; border-color: var(--ewcf-accent);
	box-shadow: 0 0 0 3px rgba(106, 86, 63, .45);
}
.ewcf input:user-invalid, .ewcf textarea:user-invalid { border-color: #c0392b; }

.ewcf__hint { margin: 8px 0 0; font-size: 14px; color: var(--ewcf-muted); }

/* Auswahl-Chips */
.ewcf__chiplist { display: flex; flex-wrap: wrap; gap: 10px; }
.ewcf .ewcf__chip { position: relative; display: inline-block; margin: 0; font-weight: 500; cursor: pointer; }
.ewcf__chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ewcf__chip span {
	display: inline-block; padding: 10px 18px; border-radius: 999px;
	border: 1px solid var(--ewcf-chip-border); background: var(--ewcf-chip-bg);
	color: var(--ewcf-text); transition: background .15s, border-color .15s;
}
.ewcf__chip:hover span { border-color: var(--ewcf-accent); }
.ewcf__chip input:checked + span { background: var(--ewcf-accent); border-color: var(--ewcf-accent); color: #fff; }
.ewcf__chip input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px var(--ewcf-accent); }

/* Upload */
.ewcf .ewcf__drop {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	margin: 0; padding: 30px 20px; text-align: center; font-weight: 500; cursor: pointer;
	border: 2px dashed var(--ewcf-drop-border); border-radius: var(--ewcf-radius);
	background: rgba(255, 255, 255, .05); transition: background .15s, border-color .15s;
}
.ewcf--light .ewcf__drop { background: var(--ewcf-chip-bg); }
.ewcf__drop:hover, .ewcf__drop.is-over { border-color: var(--ewcf-accent); background: rgba(106, 86, 63, .25); }
.ewcf__drop:focus-within { outline: 2px solid var(--ewcf-accent); outline-offset: 2px; }
.ewcf__drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ewcf__icon { color: var(--ewcf-text); }

.ewcf__previews { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ewcf__previews li {
	display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 6px 8px 6px 6px;
	background: rgba(255, 255, 255, .1); border-radius: var(--ewcf-radius); font-size: 14px;
}
.ewcf--light .ewcf__previews li { background: var(--ewcf-chip-bg); }
.ewcf__previews img { width: 44px; height: 44px; object-fit: cover; border-radius: 2px; }
.ewcf__previews span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.ewcf__previews button {
	width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer;
}
.ewcf__previews button:hover { background: rgba(0, 0, 0, .2); }

/* Honeypot */
.ewcf__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Status, Button */
.ewcf__status { min-height: 1.4em; font-weight: 500; }
.ewcf__status.is-error { color: var(--ewcf-error); }

.ewcf .ewcf__submit {
	position: relative; justify-self: start; min-height: 50px; padding: 10px 34px;
	font: inherit; font-weight: 500; font-size: 17px; color: #fff;
	background: var(--ewcf-accent); border: 0; border-radius: var(--ewcf-radius); cursor: pointer;
	transition: background .15s;
}
.ewcf .ewcf__submit:hover:not(:disabled) { background: var(--ewcf-accent-hover); }
.ewcf .ewcf__submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px var(--ewcf-accent); }
.ewcf .ewcf__submit:disabled { cursor: progress; opacity: .85; }
.ewcf__spinner {
	display: none; width: 16px; height: 16px; margin-left: 10px; vertical-align: -2px;
	border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%;
	animation: ewcf-spin .8s linear infinite;
}
.ewcf.is-busy .ewcf__spinner { display: inline-block; }
@keyframes ewcf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ewcf__spinner { animation-duration: 2s; } }

.ewcf__privacy { margin: 0; font-size: 14px; color: var(--ewcf-muted); }
.ewcf__privacy a { color: inherit; text-decoration: underline; }

.ewcf__done { display: flex; flex-direction: column; gap: 18px; padding: 26px; border: 1px solid var(--ewcf-chip-border); border-radius: var(--ewcf-radius); }
.ewcf__done[hidden] { display: none; }
.ewcf__done:focus { outline: 0; }
.ewcf__done-head { display: flex; align-items: center; gap: 16px; }
.ewcf__done-head p { margin: 0; font-size: 18px; }
.ewcf__summary-title { margin: 4px 0 0; font-weight: 700; }
.ewcf__summary { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.ewcf__summary dt { font-weight: 700; margin: 0; }
.ewcf__summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) { .ewcf__summary { grid-template-columns: 1fr; gap: 2px; } .ewcf__summary dd { margin-bottom: 10px; } }
.ewcf__thumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ewcf__thumbs[hidden] { display: none; }
.ewcf__thumbs img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: var(--ewcf-radius); border: 1px solid var(--ewcf-chip-border); }

/* Dateien ohne Vorschau (PDF) */
.ewcf__badge {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	min-width: 44px; height: 44px; padding: 0 6px; border-radius: 2px;
	background: rgba(255, 255, 255, .18); font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.ewcf--light .ewcf__badge { background: var(--ewcf-field-border); }
.ewcf__thumbs .ewcf__badge--file {
	height: auto; min-height: 44px; padding: 8px 12px; font-weight: 500; letter-spacing: 0; font-size: 14px;
	border: 1px solid var(--ewcf-chip-border); overflow-wrap: anywhere;
}
