/* WatchGold – Ankaufformular (WS Form, Formular 1)
   Alle Regeln sind auf Formular 1 begrenzt: .wsf-form[data-id="1"] */

.wsf-form[data-id="1"] {
	--wg-gold: #cba72f;
	--wg-gold-bg: #fbf7e9;
	--wg-black: #151515;
	--wg-line: #d6d3ca;
	--wg-muted: #5c5c5c;
	--wg-error: #b42318;
	box-sizing: border-box;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(21,21,21,.06), 0 12px 40px rgba(21,21,21,.06);
	padding: 40px;
	font-family: Inter, system-ui, sans-serif;
	color: var(--wg-black);
}
@media (max-width: 767px) {
	.wsf-form[data-id="1"] { padding: 20px; }
}

/* ---------- Fortschritt: Tabs als 3 Segmente ---------- */
.wsf-form[data-id="1"] .wsf-group-tabs {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
	margin: 0 0 20px !important;
	padding: 0 !important;
	border: 0 !important;
	list-style: none;
	pointer-events: none;
}
.wsf-form[data-id="1"] .wsf-group-tabs > li {
	height: 6px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 3px;
	background: #ebe8df !important;
	overflow: hidden;
}
.wsf-form[data-id="1"] .wsf-group-tabs > li.wsf-tab-active,
.wsf-form[data-id="1"] .wsf-group-tabs > li:has(~ li.wsf-tab-active) {
	background: var(--wg-gold) !important;
}
.wsf-form[data-id="1"] .wsf-group-tabs > li > a {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Schritt-Kopf ---------- */
.wsf-form[data-id="1"] .wg-step-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #7a6312;
	margin: 0 0 10px;
}
.wsf-form[data-id="1"] .wg-step-title {
	margin: 0 0 4px;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--wg-black);
}

/* ---------- Labels, Hilfetexte, Fehler ---------- */
.wsf-form[data-id="1"] .wsf-field-wrapper { margin-bottom: 18px; }
.wsf-form[data-id="1"] label.wsf-label,
.wsf-form[data-id="1"] .wsf-field-wrapper > .wsf-label,
.wsf-form[data-id="1"] legend.wsf-label {
	display: block;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4;
	color: var(--wg-black) !important;
	margin: 0 0 6px;
}
.wsf-form[data-id="1"] .wsf-help {
	display: block;
	font-size: 13px !important;
	line-height: 1.45;
	color: var(--wg-muted) !important;
	margin-top: 6px;
}
.wsf-form[data-id="1"] .wsf-invalid-feedback {
	font-size: 13px !important;
	color: var(--wg-error) !important;
	margin-top: 6px;
}

/* ---------- Eingabefelder ---------- */
.wsf-form[data-id="1"] input.wsf-field[type="text"],
.wsf-form[data-id="1"] input.wsf-field[type="email"],
.wsf-form[data-id="1"] input.wsf-field[type="tel"],
.wsf-form[data-id="1"] input.wsf-field[type="number"],
.wsf-form[data-id="1"] select.wsf-field,
.wsf-form[data-id="1"] textarea.wsf-field {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	border: 1px solid var(--wg-line) !important;
	border-radius: 12px !important;
	background-color: #fff;
	font-family: inherit;
	font-size: 16px !important; /* verhindert iOS-Zoom */
	color: var(--wg-black);
	box-shadow: none;
}
.wsf-form[data-id="1"] textarea.wsf-field { padding: 12px 14px; min-height: 96px; resize: vertical; }
.wsf-form[data-id="1"] .wsf-field:focus {
	outline: none;
	border-color: var(--wg-gold) !important;
	box-shadow: 0 0 0 3px rgba(203,167,47,.25) !important;
}
.wsf-form[data-id="1"] .wsf-field:disabled,
.wsf-form[data-id="1"] .wsf-field[disabled] {
	background-color: #f3f2ee !important;
	color: var(--wg-muted);
	cursor: not-allowed;
}
.wsf-form[data-id="1"] .wsf-validated .wsf-field:invalid,
.wsf-form[data-id="1"] .wsf-field.wsf-invalid {
	border-color: var(--wg-error) !important;
}
.wsf-form[data-id="1"] ::placeholder { color: #8a8a8a; opacity: 1; }

/* Telefonfeld mit Länderauswahl */
.wsf-form[data-id="1"] .iti { width: 100%; }
.wsf-form[data-id="1"] .iti input.wsf-field[type="tel"] { padding-left: 52px; }

/* ---------- Select2 (Marke) ---------- */
.wsf-form[data-id="1"] .select2-container { width: 100% !important; }
.wsf-form[data-id="1"] .select2-container .select2-selection--single {
	height: 48px;
	border: 1px solid var(--wg-line);
	border-radius: 12px;
	background: #fff !important;
}
.wsf-form[data-id="1"] .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 46px;
	padding-left: 14px;
	padding-right: 40px;
	font-size: 16px;
	color: var(--wg-black);
}
.wsf-form[data-id="1"] .select2-container .select2-selection--single .select2-selection__placeholder { color: #8a8a8a; }
.wsf-form[data-id="1"] .select2-container .select2-selection--single .select2-selection__arrow { height: 46px; right: 10px; }
.wsf-form[data-id="1"] .select2-container--focus .select2-selection--single,
.wsf-form[data-id="1"] .select2-container--open .select2-selection--single {
	border-color: var(--wg-gold);
	box-shadow: 0 0 0 3px rgba(203,167,47,.25);
}
/* Dropdown hängt an <body>; CSS lädt nur auf dieser Seite */
.select2-container--open .select2-dropdown {
	border: 0;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(21,21,21,.14), inset 0 0 0 1px #e4e1d8;
	overflow: hidden;
	font-family: Inter, system-ui, sans-serif;
}
.select2-container--open .select2-search--dropdown { padding: 8px; }
.select2-container--open .select2-search--dropdown .select2-search__field {
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--wg-line, #d6d3ca);
	border-radius: 10px;
	font-size: 16px;
}
.select2-container--open .select2-results__option {
	min-height: 44px;
	display: flex;
	align-items: center;
	padding: 0 14px;
	font-size: 15px;
	color: #151515;
	background: #fff;
}
.select2-container--open .select2-results__option:not(.select2-results__option--highlighted) { background: #fff !important; }
.select2-container--open .select2-results__option--highlighted,
.select2-container--open .select2-results__option--highlighted[aria-selected],
.select2-container--open .select2-results__option--highlighted.select2-results__option--selectable {
	background: #fbf7e9 !important;
	color: #151515 !important;
}
.select2-container--open .select2-results__option[aria-selected="true"],
.select2-container--open .select2-results__option--selected { background: #f3efe0; font-weight: 600; }

/* ---------- Kacheln (Zustand, Übergabe) & Pills ---------- */
.wsf-form[data-id="1"] .wg-tiles [role="radiogroup"],
.wsf-form[data-id="1"] .wg-tiles [role="group"] {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.wsf-form[data-id="1"] .wg-pills [role="radiogroup"],
.wsf-form[data-id="1"] .wg-pills [role="group"],
.wsf-form[data-id="1"] .wg-pills div:has(> [data-row-checkbox]),
.wsf-form[data-id="1"] .wg-pills div:has(> [data-row-radio]) {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.wsf-form[data-id="1"] .wg-three [role="radiogroup"],
.wsf-form[data-id="1"] .wg-pills.wg-three div:has(> [data-row-radio]) {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}
@media (max-width: 479px) {
	/* Zustand mobil einspaltig, Übergabe bleibt 2×2 wie im Entwurf */
	.wsf-form[data-id="1"] #wsf-1-field-wrapper-40 [role="radiogroup"] { grid-template-columns: 1fr; }
	.wsf-form[data-id="1"] #wsf-1-field-wrapper-46 input.wsf-button + label.wsf-label { padding: 12px 14px !important; }
}
.wsf-form[data-id="1"] .wg-tiles [data-row-radio],
.wsf-form[data-id="1"] .wg-pills [data-row-radio],
.wsf-form[data-id="1"] .wg-pills [data-row-checkbox] {
	margin: 0 !important;
	padding: 0 !important;
	position: relative;
}
/* Eingabe visuell ausblenden, aber bedienbar lassen */
.wsf-form[data-id="1"] .wg-tiles input.wsf-button,
.wsf-form[data-id="1"] .wg-pills input.wsf-button {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	pointer-events: none;
}
.wsf-form[data-id="1"] .wg-tiles input.wsf-button + label.wsf-label,
.wsf-form[data-id="1"] .wg-pills input.wsf-button + label.wsf-label {
	box-sizing: border-box;
	display: flex !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: inset 0 0 0 1px var(--wg-line) !important;
	color: var(--wg-black) !important;
	font-family: inherit;
	cursor: pointer;
	transition: box-shadow .15s, background-color .15s;
	text-align: left;
	white-space: normal;
}
.wsf-form[data-id="1"] .wg-tiles input.wsf-button + label.wsf-label {
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 3px;
	width: 100%;
	height: 100%;
	min-height: 48px;
	padding: 14px 16px !important;
}
.wsf-form[data-id="1"] .wg-pills input.wsf-button + label.wsf-label {
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 16px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
}
.wsf-form[data-id="1"] .wg-pills[data-type="checkbox"] input.wsf-button + label.wsf-label,
.wsf-form[data-id="1"] .wg-pills input[type="checkbox"].wsf-button + label.wsf-label { border-radius: 999px !important; }
.wsf-form[data-id="1"] .wg-pills input[type="checkbox"].wsf-button + label.wsf-label::before {
	content: "+";
	font-weight: 700;
}
.wsf-form[data-id="1"] .wg-pills input[type="checkbox"].wsf-button:checked + label.wsf-label::before { content: "✓"; }
.wsf-form[data-id="1"] .wg-three [data-row-radio] { width: 100%; }
.wsf-form[data-id="1"] .wg-three input.wsf-button + label.wsf-label { width: 100%; padding: 0 8px !important; }

.wsf-form[data-id="1"] .wg-tiles input.wsf-button + label.wsf-label:hover,
.wsf-form[data-id="1"] .wg-pills input.wsf-button + label.wsf-label:hover {
	box-shadow: inset 0 0 0 1px #b9b4a6 !important;
}
.wsf-form[data-id="1"] .wg-tiles input.wsf-button:checked + label.wsf-label,
.wsf-form[data-id="1"] .wg-pills input.wsf-button:checked + label.wsf-label {
	background: var(--wg-gold-bg) !important;
	box-shadow: inset 0 0 0 2px var(--wg-gold) !important;
}
.wsf-form[data-id="1"] .wg-tiles input.wsf-button:focus-visible + label.wsf-label,
.wsf-form[data-id="1"] .wg-pills input.wsf-button:focus-visible + label.wsf-label {
	outline: 2px solid var(--wg-black);
	outline-offset: 2px;
}
.wsf-form[data-id="1"] .wg-tile-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.wsf-form[data-id="1"] .wg-tile-hint { font-size: 13px; font-weight: 400; line-height: 1.35; color: #555; }

/* "Ich weiß es nicht" neben dem Preisfeld ausrichten */
@media (min-width: 768px) {
	.wsf-form[data-id="1"] .wg-nolabel { padding-top: 26px; }
}

/* ---------- Datei-Upload (Dropzone) ---------- */
.wsf-form[data-id="1"] .dropzone,
.wsf-form[data-id="1"] .wsf-dropzonejs {
	border: 0 !important;
	border-radius: 12px !important;
	background: #faf9f6 !important;
	box-shadow: inset 0 0 0 1.5px #cfcabd;
	min-height: 84px;
	font-size: 15px;
	color: var(--wg-black);
}
.wsf-form[data-id="1"] .dropzone:hover,
.wsf-form[data-id="1"] .wsf-dropzonejs:hover { box-shadow: inset 0 0 0 1.5px var(--wg-gold); }
.wsf-form[data-id="1"] .dropzone .dz-message { font-weight: 600; }

/* ---------- Datenschutz ---------- */
.wsf-form[data-id="1"] .wg-consent label.wsf-label {
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.5;
	color: #3d3d3d !important;
}
.wsf-form[data-id="1"] .wg-consent a { color: var(--wg-black); font-weight: 600; text-decoration: underline; }
.wsf-form[data-id="1"] .wg-consent input[type="checkbox"] { accent-color: var(--wg-black); }

/* ---------- Buttons ---------- */
.wsf-form[data-id="1"] .wg-btn-main { margin-top: 10px; margin-bottom: 6px; }
.wsf-form[data-id="1"] .wg-btn-main .wsf-button,
.wsf-form[data-id="1"] .wg-btn-main button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 56px;
	padding: 0 20px;
	border: 0 !important;
	border-radius: 14px !important;
	background: var(--wg-gold) !important;
	color: var(--wg-black) !important;
	font-family: inherit;
	font-size: 17px !important;
	font-weight: 800 !important;
	line-height: 1.2;
	box-shadow: 0 6px 18px rgba(203,167,47,.35) !important;
	cursor: pointer;
	transition: filter .15s, transform .15s;
}
.wsf-form[data-id="1"] .wg-btn-main .wsf-button:hover { filter: brightness(1.05); }
.wsf-form[data-id="1"] .wg-btn-main .wsf-button:active { transform: translateY(1px); }
.wsf-form[data-id="1"] .wg-btn-main .wsf-button:focus-visible { outline: 2px solid var(--wg-black); outline-offset: 3px; }

.wsf-form[data-id="1"] .wg-btn-back { margin-bottom: 0; }
.wsf-form[data-id="1"] .wg-btn-back .wsf-button,
.wsf-form[data-id="1"] .wg-btn-back button {
	width: auto !important;
	min-height: 44px;
	padding: 0 4px !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #3d3d3d !important;
	font-family: inherit;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.wsf-form[data-id="1"] .wg-ssl { margin-bottom: 0; display: flex; align-items: center; }
.wsf-form[data-id="1"] .wg-ssl-note {
	margin: 0 0 0 auto;
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--wg-muted);
}
.wsf-form[data-id="1"] .wg-ssl-note::before {
	content: "";
	width: 14px; height: 14px;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c5c5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}
@media (max-width: 767px) {
	.wsf-form[data-id="1"] .wg-ssl-note { margin-left: 0; }
}

/* ---------- Erfolgsmeldung (steht außerhalb des Formulars) ---------- */
.wg-success {
	box-sizing: border-box;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(21,21,21,.06), 0 12px 40px rgba(21,21,21,.06);
	padding: 40px;
	font-family: Inter, system-ui, sans-serif;
	color: #151515;
	text-align: left;
}
@media (max-width: 767px) { .wg-success { padding: 24px 20px; } }
.wg-success-icon {
	width: 56px; height: 56px;
	border-radius: 50%;
	background: #cba72f;
	color: #151515;
	display: flex; align-items: center; justify-content: center;
	font-size: 28px; font-weight: 800;
	margin-bottom: 18px;
}
.wg-success h3 { margin: 0 0 12px; font-size: 28px; font-weight: 800; line-height: 1.2; color: #151515; }
.wg-success p { margin: 0 0 18px; font-size: 17px; line-height: 1.55; color: #3d3d3d; }
.wg-success .wg-wa-btn {
	display: inline-flex; align-items: center;
	min-height: 48px; padding: 0 20px;
	border-radius: 12px;
	background: #151515; color: #fff !important;
	font-weight: 700; text-decoration: none;
}
.wsf-alert:has(.wg-success) { background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
