/* FDM Instant Quote */
.fdmiq { max-width: 1100px; margin: 0 auto; font-size: 16px; }

/* hidden-Attribut gegen Theme-CSS durchsetzen (z.B. display:flex auf Klassen) */
.fdmiq [hidden] { display: none !important; }
#fdmiq-file { display: none !important; }

/* Dropzone */
.fdmiq-dropzone {
	border: 2px dashed #b6bdc9;
	border-radius: 12px;
	padding: 36px 20px;
	text-align: center;
	cursor: pointer;
	background: #fafbfc;
	transition: border-color .15s, background .15s;
	position: relative;
	color: #3d4552;
}
.fdmiq-dropzone:hover, .fdmiq-dropzone.drag {
	border-color: #2e7dd1;
	background: #f0f6fd;
}
.fdmiq-dz-title { font-size: 1.15em; font-weight: 600; margin: 12px 0 4px; }
.fdmiq-dz-title span { color: #2e7dd1; text-decoration: underline; }
.fdmiq-dz-sub { color: #6b7280; margin: 0; font-size: .9em; }

.fdmiq-progress {
	margin-top: 18px;
	background: #e5e7eb;
	border-radius: 6px;
	height: 22px;
	position: relative;
	overflow: hidden;
}
.fdmiq-progress-bar {
	height: 100%; width: 0;
	background: #2e7dd1;
	transition: width .2s;
}
.fdmiq-progress-label {
	position: absolute; inset: 0;
	font-size: .8em; line-height: 22px; color: #1f2937;
	text-align: center;
}

.fdmiq-error {
	margin-top: 14px;
	background: #fdecec; color: #a02020;
	border: 1px solid #f2b8b8; border-radius: 8px;
	padding: 10px 14px;
}

/* Ergebnis-Layout */
.fdmiq-result {
	display: grid;
	grid-template-columns: minmax(280px, 420px) 1fr;
	gap: 24px;
	margin-top: 24px;
	align-items: start;
}
@media (max-width: 860px) {
	.fdmiq-result { grid-template-columns: 1fr; }
}

/* Viewer */
.fdmiq-viewer {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f3f4f6;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
}
.fdmiq-viewer canvas { display: block; width: 100% !important; height: 100% !important; }
.fdmiq-viewer-placeholder {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	color: #6b7280; text-align: center; font-size: .9em; padding: 20px;
}
.fdmiq-viewer-tabs { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fdmiq-viewer-tabs button {
	flex: 1;
	border: 1px solid #d1d5db; background: #fff; color: #374151;
	border-radius: 8px; padding: 7px 4px; font-size: .85em; cursor: pointer;
}
.fdmiq-viewer-tabs button.active {
	border-color: #2e7dd1; background: #eaf3fc; color: #1d5fa8; font-weight: 600;
}
.fdmiq-model-meta { color: #6b7280; font-size: .85em; margin-top: 8px; word-break: break-all; }

/* Preiskarten */
.fdmiq-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}
.fdmiq-card {
	border: 1px solid #e2e5ea;
	border-radius: 12px;
	padding: 20px 18px 18px;
	background: #fff;
	position: relative;
	display: flex;
	flex-direction: column;
	transition: box-shadow .15s, border-color .15s;
}
.fdmiq-card:hover { box-shadow: 0 4px 18px rgba(20, 40, 80, .08); }
.fdmiq-card.recommended { border-color: #2e7dd1; box-shadow: 0 4px 18px rgba(46, 125, 209, .14); }
.fdmiq-card.disabled { opacity: .75; }
.fdmiq-badge {
	position: absolute; top: -11px; left: 14px;
	background: #2e7dd1; color: #fff;
	font-size: .72em; font-weight: 600;
	padding: 3px 10px; border-radius: 20px;
	letter-spacing: .02em;
}
.fdmiq-badge-price { background: #6b7280; }
.fdmiq-card h3 { margin: 0 0 10px; font-size: 1.1em; }
.fdmiq-price { min-height: 58px; margin-bottom: 10px; }
.fdmiq-price-value { display: block; font-size: 1.45em; font-weight: 700; color: #16324f; }
.fdmiq-price-note { display: block; font-size: .78em; color: #6b7280; margin-top: 2px; }
.fdmiq-pending-text { font-size: .85em; color: #6b7280; vertical-align: middle; }
.fdmiq-card ul { list-style: none; margin: 0 0 16px; padding: 0; flex: 1; }
.fdmiq-card ul li {
	font-size: .85em; color: #374151;
	padding: 3px 0 3px 20px; position: relative;
}
.fdmiq-card ul li::before {
	content: "✓"; position: absolute; left: 0; color: #2e9e5b; font-weight: 700;
}
.fdmiq-cta {
	display: block; text-align: center;
	background: #2e7dd1; color: #fff !important;
	border-radius: 8px; padding: 10px 8px;
	font-weight: 600; font-size: .92em;
	text-decoration: none !important;
	transition: background .15s;
}
.fdmiq-cta:hover { background: #1d5fa8; }
.fdmiq-cta-secondary { background: #6b7280; }
.fdmiq-cta-secondary:hover { background: #4b5563; }

.fdmiq-note {
	margin-top: 16px;
	background: #eef6ff; border: 1px solid #c3ddf5;
	color: #1d4f7c; border-radius: 8px;
	padding: 10px 14px; font-size: .9em;
}

/* KI-Empfehlung */
.fdmiq-ai {
	margin-top: 18px;
	border: 1px solid #e2e5ea;
	border-radius: 12px;
	padding: 16px 18px;
	background: #fafbfc;
}
.fdmiq-ai-title { margin: 0 0 10px; font-weight: 600; font-size: .95em; color: #1f2937; }
.fdmiq-ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fdmiq-ai-chips button {
	border: 1px solid #d1d5db; background: #fff; color: #374151;
	border-radius: 20px; padding: 6px 14px; font-size: .85em; cursor: pointer;
	transition: all .12s;
}
.fdmiq-ai-chips button.active {
	border-color: #2e7dd1; background: #eaf3fc; color: #1d5fa8; font-weight: 600;
}
.fdmiq-ai textarea {
	width: 100%; box-sizing: border-box;
	border: 1px solid #d1d5db; border-radius: 8px;
	padding: 8px 10px; font-size: .9em; font-family: inherit;
	margin-bottom: 10px; resize: vertical;
}
.fdmiq-ai-btn { display: inline-block; width: auto; padding: 10px 22px; border: 0; cursor: pointer; }
.fdmiq-ai-btn:disabled { opacity: .7; cursor: wait; }
/* Auf schmalen Schirmen braucht der Platzhalter drei Zeilen, sonst wird er
   im zweizeiligen Feld abgeschnitten. */
@media (max-width: 600px) {
	.fdmiq-ai textarea { min-height: 5.4em; }
	.fdmiq-ai-chips button { flex: 1 1 auto; }
}

.fdmiq-ai-result {
	margin-top: 12px;
	background: #eef6ff; border: 1px solid #c3ddf5;
	color: #1d4f7c; border-radius: 8px;
	padding: 10px 14px; font-size: .92em; line-height: 1.5;
}

/* Spinner */
.fdmiq-spinner {
	display: inline-block; vertical-align: middle;
	width: 16px; height: 16px; margin-right: 8px;
	border: 2px solid #d1d5db; border-top-color: #2e7dd1;
	border-radius: 50%;
	animation: fdmiq-spin .8s linear infinite;
}
@keyframes fdmiq-spin { to { transform: rotate(360deg); } }
