/* Werft Schadenserfassung – Frontend-Styles */

.wse-wrap {
	--wse-navy: #142240;
	--wse-teal: #0d7a6b;
	--wse-teal-bg: #e0f5f1;
	--wse-amber: #c47a1a;
	--wse-amber-bg: #fdf3e0;
	--wse-red: #b3261e;
	--wse-red-bg: #fbe9e7;
	--wse-border: #d9ddE3;
	--wse-muted: #5f6b7a;
	--wse-bg: #f7f9fb;
	--wse-radius: 8px;
	
	max-width: 760px;
	margin: 0 auto;
	font-family: var(--font-family);
	color: #1a2433;
	line-height: 1.5;
}

.wse-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--wse-border);
}

.wse-anchor {
	width: 52px;
	height: 52px;
	border-radius: var(--wse-radius);
	background: var(--wse-navy);
	color: #fff;
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wse-eyebrow {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wse-muted);
	margin: 0 0 2px;
}

.wse-title {
	font-size: 24px;
	margin: 0;
	color: var(--wse-navy);
	font-weight: 600;
}

.wse-fieldset {
	border: none;
	padding: 0;
	margin: 0 0 24px;
}

.wse-legend {
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wse-muted);
	font-weight: 600;
	margin-bottom: 12px;
	padding: 0;
}

.wse-grid {
	display: grid;
	gap: 12px;
	margin-bottom: 12px;
}

.wse-grid-2 { grid-template-columns: 1fr 1fr; }
.wse-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.wse-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.wse-field > span {
	font-size: 13px;
	color: var(--wse-muted);
}

.wse-field em {
	color: var(--wse-red);
	font-style: normal;
}

.wse-field input,
.wse-field textarea,
.wse-field select {
	font-size: 15px;
	padding: 10px 12px;
	border: 1px solid var(--wse-border);
	border-radius: var(--wse-radius);
	background: #fff;
	color: #1a2433;
	font-family: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
	width: 100%;
	box-sizing: border-box;
}

.wse-field input:focus,
.wse-field textarea:focus,
.wse-field select:focus {
	outline: none;
	border-color: var(--wse-teal);
	box-shadow: 0 0 0 3px var(--wse-teal-bg);
}

/* Checkbox-Feld (z.B. Eigenbau) - vertikal an den Nachbarfeldern ausgerichtet */
.wse-checkbox-field {
	display: flex;
	align-items: center;
	gap: 8px;
	align-self: end;
	padding: 10px 0;
	cursor: pointer;
}

.wse-checkbox-field input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--wse-teal);
	cursor: pointer;
	flex-shrink: 0;
}

.wse-checkbox-field span {
	font-size: 15px;
	color: #1a2433;
}

.wse-field textarea { resize: vertical; min-height: 100px; }

.wse-upload {
	display: block;
	border: 1.5px dashed var(--wse-border);
	border-radius: var(--wse-radius);
	padding: 28px 20px;
	text-align: center;
	cursor: pointer;
	background: var(--wse-bg);
	transition: border-color 0.15s, background 0.15s;
}

.wse-upload:hover,
.wse-upload.wse-dragover {
	border-color: var(--wse-teal);
	background: var(--wse-teal-bg);
}

.wse-upload-icon {
	display: block;
	font-size: 26px;
	color: var(--wse-muted);
	margin-bottom: 6px;
}

.wse-upload-label { display: block; font-size: 14px; color: #1a2433; }
.wse-upload-hint { display: block; font-size: 12px; color: var(--wse-muted); margin-top: 4px; }
.wse-upload input[type="file"] { display: none; }

.wse-filelist {
	list-style: none;
	padding: 0;
	margin: 10px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wse-filelist li {
	font-size: 12px;
	background: var(--wse-bg);
	border: 1px solid var(--wse-border);
	border-radius: var(--wse-radius);
	padding: 5px 10px;
	color: var(--wse-muted);
}

.wse-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wse-pill {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--wse-border);
	border-radius: 22px;
	padding: 8px 16px;
	cursor: pointer;
	background: #fff;
	transition: all 0.15s;
}

.wse-pill input { position: absolute; opacity: 0; }
.wse-pill span { font-size: 14px; color: var(--wse-muted); }

.wse-pill:has(input:checked) {
	border-color: var(--wse-teal);
	background: var(--wse-teal-bg);
}
.wse-pill:has(input:checked) span { color: var(--wse-teal); font-weight: 600; }

.wse-pill-warn:has(input:checked) {
	border-color: var(--wse-amber);
	background: var(--wse-amber-bg);
}
.wse-pill-warn:has(input:checked) span { color: var(--wse-amber); }

.wse-pill-danger:has(input:checked) {
	border-color: var(--wse-red);
	background: var(--wse-red-bg);
}
.wse-pill-danger:has(input:checked) span { color: var(--wse-red); }

.wse-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

.wse-btn {
	font-size: 15px;
	font-family: inherit;
	padding: 11px 24px;
	border-radius: var(--wse-radius);
	border: 1px solid var(--wse-border);
	background: #fff;
	color: #1a2433;
	cursor: pointer;
	transition: all 0.15s;
}

.wse-btn:hover { background: var(--wse-bg); }

.wse-btn-primary {
	background: var(--wse-navy);
	border-color: var(--wse-navy);
	color: #fff;
}

.wse-btn-primary:hover { opacity: 0.9; background: var(--wse-navy); }
.wse-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.wse-message {
	margin-top: 14px;
	font-size: 14px;
	min-height: 20px;
}

.wse-message.wse-error { color: var(--wse-red); }

.wse-success {
	text-align: center;
	padding: 40px 24px;
	background: var(--wse-teal-bg);
	border-radius: 12px;
	border: 1px solid #b6e6db;
}

.wse-success-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--wse-teal);
	color: #fff;
	font-size: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.wse-success h3 { margin: 0 0 8px; color: var(--wse-navy); font-size: 20px; }
.wse-success p { margin: 4px 0; color: var(--wse-muted); }

.wse-ticket {
	font-size: 26px !important;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--wse-navy) !important;
	margin: 12px 0 !important;
	font-family: "SF Mono", Menlo, Consolas, monospace;
}

.wse-success-note { font-size: 13px; max-width: 420px; margin: 8px auto 20px; }

@media (max-width: 600px) {
	.wse-grid-2,
	.wse-grid-3 { grid-template-columns: 1fr; }
	.wse-title { font-size: 20px; }
}

/* === Hinweisstreifen (oben im Formular) === */
.wse-notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-radius: var(--wse-radius);
	margin-bottom: 24px;
	font-size: 14px;
	line-height: 1.45;
	border: 1px solid transparent;
}

.wse-notice-icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	color: #fff;
	line-height: 1;
}

.wse-notice-text { padding-top: 1px; }

/* Warnung (Pflichtfeld fehlt) */
.wse-notice-warn {
	background: var(--wse-amber-bg);
	border-color: #f0d49a;
	color: #7a4d0c;
}
.wse-notice-warn .wse-notice-icon { background: var(--wse-amber); }
.wse-notice-warn .wse-notice-icon::before { content: "!"; }

/* Fehler (Serverfehler) */
.wse-notice-error {
	background: var(--wse-red-bg);
	border-color: #f0b6b2;
	color: #8a1f18;
}
.wse-notice-error .wse-notice-icon { background: var(--wse-red); }
.wse-notice-error .wse-notice-icon::before { content: "\00d7"; font-size: 17px; }

/* Info (wird gesendet) */
.wse-notice-info {
	background: var(--wse-teal-bg);
	border-color: #b6e6db;
	color: #0a5e52;
}
.wse-notice-info .wse-notice-icon { background: var(--wse-teal); }
.wse-notice-info .wse-notice-icon::before { content: "i"; font-style: italic; font-family: Georgia, serif; }

/* Erfolg (optional verwendbar) */
.wse-notice-success {
	background: var(--wse-teal-bg);
	border-color: #b6e6db;
	color: #0a5e52;
}
.wse-notice-success .wse-notice-icon { background: var(--wse-teal); }
.wse-notice-success .wse-notice-icon::before { content: "\2713"; }

/* === Inline-Feldfehler === */
.wse-input-error {
	border-color: var(--wse-red) !important;
	box-shadow: 0 0 0 3px var(--wse-red-bg) !important;
}

.wse-field-error {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 5px;
	font-size: 12.5px;
	color: var(--wse-red);
}

.wse-field-error::before {
	content: "!";
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--wse-red);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
