/* ECO Maße 1.1 – Maßeingabe nach dem Entwurf „Eco Maßeingabe – Entwurf“ */

.eco-ma-alt,
.eco-ma-versteckt { display: none !important; }

.eco-ma-box {
	--eco-blau: #14456c;
	--eco-rot: #d62828;
	--eco-text: #1e2a36;
	--eco-leise: #4a5866;
	--eco-linie: #c9d3de;
	box-sizing: border-box;
	margin: 0 0 20px;
	padding: 24px;
	background: #f6f8fa;
	border-radius: 14px;
	color: var(--eco-text);
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.eco-ma-box *, .eco-ma-box *::before, .eco-ma-box *::after { box-sizing: border-box; }

.eco-ma-kopf h3 { margin: 0 0 4px; font-size: 24px; font-weight: 700; color: #0b2540; line-height: 1.2; }
.eco-ma-kopf p { margin: 0; font-size: 14px; color: var(--eco-leise); line-height: 1.4; }

/* Umschalter */
.eco-ma-wahl { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.eco-ma-gruppe { display: flex; flex-direction: column; gap: 6px; }
.eco-ma-glabel { font-size: 13px; font-weight: 600; color: var(--eco-leise); }
.eco-ma-seg { display: flex; flex-wrap: wrap; }
.eco-ma-box .eco-ma-k {
	min-height: 44px;
	margin: 0 0 0 -1.5px;
	padding: 0 16px;
	border: 1.5px solid var(--eco-linie);
	border-radius: 0;
	background: #fff;
	color: var(--eco-text);
	font: 600 14px/1.2 inherit;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
}
.eco-ma-box .eco-ma-k:first-child { margin-left: 0; border-radius: 10px 0 0 10px; }
.eco-ma-box .eco-ma-k:last-child { border-radius: 0 10px 10px 0; }
.eco-ma-box .eco-ma-k { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
.eco-ma-k1 { font-weight: 700; }
.eco-ma-k2 { font-size: 12px; font-weight: 500; opacity: .8; }
.eco-ma-box .eco-ma-k.eco-ma-an { background: var(--eco-blau); border-color: var(--eco-blau); color: #fff; position: relative; }

/* Hauptbereich */
.eco-ma-haupt { display: flex; gap: 24px; align-items: flex-start; }
.eco-ma-links { flex: 0 1 auto; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.eco-ma-links .eco-ma-skizze { align-self: center; }
.eco-ma-skizze {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(170px, 250px) minmax(0, 1fr);
	column-gap: 4px;
	grid-template-areas: ". w ." "l s r";
	background: #fff;
	border: 1px solid #dde4eb;
	border-radius: 14px;
	padding: 16px 6px 18px;
}
.eco-ma-zelle-w { grid-area: w; display: flex; justify-content: center; }
.eco-ma-zelle-l { grid-area: l; display: flex; align-items: center; justify-content: center; }
.eco-ma-zelle-svg { grid-area: s; }
.eco-ma-zelle-r { grid-area: r; display: flex; align-items: center; justify-content: center; }
.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-r > * { visibility: hidden; } /* Platz bleibt frei – nichts verrutscht */

.eco-ma-svg { display: block; width: 100%; height: auto; }
.eco-ma-svg text { font-size: 14px; font-weight: 700; font-family: inherit; }
.eco-ma-svg .eco-ma-linie { fill: none; stroke-width: 13; transition: stroke .12s; }
.eco-ma-svg .eco-ma-kammer { fill: none; stroke: #fff; stroke-width: 2; stroke-opacity: .85; }
.eco-ma-svg .eco-ma-offen { font-size: 13px; font-weight: 400; fill: #6b7884; }

/* Felder */
.eco-ma-feld { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.eco-ma-feld label { margin: 0; font-size: 15px !important; font-weight: 700 !important; color: var(--eco-text); text-align: center; }
.eco-ma-eingabe { position: relative; max-width: 100%; }
.eco-ma-feld { min-width: 0; max-width: 100%; }
.eco-ma-box input.eco-ma-input {
	width: 124px !important;
	max-width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 38px 0 12px !important;
	border: 1.5px solid var(--eco-linie) !important;
	border-radius: 10px !important;
	background: #fff;
	color: var(--eco-text);
	font-size: 17px !important;
	font-weight: 600;
	box-shadow: none;
	-moz-appearance: textfield;
}
.eco-ma-box input.eco-ma-input::-webkit-outer-spin-button,
.eco-ma-box input.eco-ma-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.eco-ma-box input.eco-ma-input:focus { outline: none; border-color: var(--eco-rot) !important; box-shadow: 0 0 0 3px rgba(214, 40, 40, .15); }
.eco-ma-cm { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #6b7884; pointer-events: none; }
.eco-ma-fehler { display: none; font-size: 12px; color: #b3261e; }
.eco-ma-falsch .eco-ma-fehler { display: block; }
.eco-ma-falsch input.eco-ma-input { border-color: var(--eco-rot) !important; }

/* Seitenspalte */
.eco-ma-seite { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 14px; }
.eco-ma-info { background: #e8f1fa; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.eco-ma-angabe { background: #fff; border: 1px solid #dde4eb; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.eco-ma-klein { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--eco-blau); }
.eco-ma-angabe .eco-ma-klein { color: #6b7884; }
.eco-ma-mtitel { font-size: 15px; }
.eco-ma-mtext { font-size: 14px; line-height: 1.45; color: #33414e; }
.eco-ma-sum { font-size: 14px; line-height: 1.5; white-space: pre-line; }

/* Meterware */
.eco-ma-meter { display: none; padding: 12px 14px; background: #e8f1fa; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.eco-ma-ist-meter .eco-ma-meter { display: block; }
.eco-ma-ist-meter .eco-ma-haupt,
.eco-ma-ist-meter .eco-ma-g-mess,
.eco-ma-ist-meter .eco-ma-kopf p { display: none; }

/* Mittlere Breite: Seitenspalte unter die Skizze */
@media (max-width: 1100px) {
	.eco-ma-haupt { flex-direction: column; align-items: stretch; }
	.eco-ma-links { align-self: center; width: 100%; max-width: 560px; }
	.eco-ma-skizze { align-self: center; }
}

/* Handy: Skizze in voller Breite, Höhenfelder unter der Skizze nebeneinander */
@media (max-width: 600px) {
	.eco-ma-box { padding: 16px 12px; margin-left: 0; margin-right: 0; }
	.eco-ma-kopf h3 { font-size: 21px; }
	.eco-ma-skizze {
		width: 100%;
		grid-template-columns: 1fr 1fr;
		grid-template-areas: "w w" "s s" "l r";
		row-gap: 10px;
		padding: 14px 8px;
	}
	.eco-ma-zelle-svg { justify-self: center; width: 100%; max-width: 260px; }
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-r { display: none; }
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-l { grid-column: 1 / -1; }
	.eco-ma-box input.eco-ma-input { width: 112px !important; }
	.eco-ma-gruppe { width: 100%; }
	.eco-ma-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
	.eco-ma-box .eco-ma-k { padding: 6px 8px; font-size: 13px; white-space: normal; line-height: 1.2; }
}

/* Preis-Hinweis (nur wenn das Theme keinen eigenen hat) */
#product_total_price .eco-ma-mwst { font-size: 13px; font-weight: 600; }
#product_total_price .eco-ma-versand { display: block; font-size: 12px; color: #666; }

/* WhatsApp-Knopf ausblenden, solange ein Maß eingetippt wird */
body.eco-ma-tippt .ht-ctc,
body.eco-ma-tippt #ht-ctc-chat,
body.eco-ma-tippt .ht_ctc_chat_style { display: none !important; }

/* ===== 1.2: kompakte Box – Warenkorb-Knopf ohne Scrollen erreichbar ===== */
.eco-ma-box { padding: 16px 18px; gap: 12px; }
.eco-ma-kopf h3 { margin: 0; font-size: 20px; }
.eco-ma-wahl { gap: 10px 24px; }
.eco-ma-box .eco-ma-k { min-height: 40px; padding: 0 12px; }
.eco-ma-mhinweis { font-size: 12px; color: var(--eco-leise); line-height: 1.35; max-width: 320px; }
.eco-ma-links { gap: 8px; max-width: 460px; }
.eco-ma-skizze {
	grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr) !important;
	padding: 10px 6px 12px;
	row-gap: 2px;
}
.eco-ma-feld label { font-size: 14px !important; }
.eco-ma-box input.eco-ma-input { height: 40px; font-size: 16px !important; width: 110px !important; }
.eco-ma-sum { font-size: 13px; color: var(--eco-leise); text-align: center; white-space: normal; }
.eco-ma-sum.eco-ma-fertig { color: #1a6b42; font-weight: 600; }
@media (max-width: 600px) {
	.eco-ma-box { padding: 12px 10px; }
	.eco-ma-skizze { grid-template-columns: 1fr 1fr !important; padding: 10px 6px; row-gap: 6px; }
	.eco-ma-zelle-svg { max-width: 150px !important; }
	.eco-ma-box input.eco-ma-input { width: 104px !important; }
	.eco-ma-mhinweis { max-width: none; }
}
/* Maße in der kleineren Skizze gut lesbar */
.eco-ma-svg text { font-size: 24px; }
.eco-ma-svg .eco-ma-offen { font-size: 20px; }

/* Platzhalter passt ins Feld */
.eco-ma-box input.eco-ma-input::placeholder { font-size: 14px; font-weight: 400; }

/* Referenz als eine Zeile in der Box */
.eco-ma-box input.eco-ma-ref {
	width: 100% !important;
	height: 40px;
	margin: 0;
	padding: 0 12px !important;
	border: 1.5px solid var(--eco-linie) !important;
	border-radius: 10px !important;
	background: #fff;
	font-size: 14px !important;
	color: var(--eco-text);
	box-shadow: none;
}
.eco-ma-box input.eco-ma-ref:focus { outline: none; border-color: var(--eco-blau) !important; }

/* Platzhalter „z. B. 120“ passt ganz ins Feld */
.eco-ma-box input.eco-ma-input { padding: 0 32px 0 10px !important; }
.eco-ma-box input.eco-ma-input::placeholder { font-size: 13px; }
.eco-ma-cm { right: 9px; font-size: 13px; }
@media (max-width: 600px) {
	.eco-ma-box input.eco-ma-input { width: 112px !important; }
}

/* PC, nur bei einem einzigen Messpunkt (Schraubdichtungen): Ausführung und Messpunkt nebeneinander */
@media (min-width: 601px) {
	.eco-ma-mess-einzeln .eco-ma-wahl { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: end; gap: 6px 16px; }
	.eco-ma-mess-einzeln .eco-ma-wahl .eco-ma-mhinweis { grid-column: 1 / -1; max-width: none; }
	.eco-ma-wahl .eco-ma-mhinweis { width: 100%; }
}
@media (max-width: 600px) { .eco-ma-wahl .eco-ma-mhinweis { width: 100%; margin-top: -4px; } }
/* Schraubdichtungen am PC: Messpunkt-Knopf gleich hoch wie die Ausführungs-Knöpfe */
@media (min-width: 601px) {
	.eco-ma-mess-einzeln .eco-ma-box .eco-ma-k,
	.eco-ma-box.eco-ma-mess-einzeln .eco-ma-k { height: 52px; min-height: 52px; }
}
/* Schraubdichtungen am PC: Knopfreihen nicht umbrechen */
@media (min-width: 601px) {
	.eco-ma-box.eco-ma-mess-einzeln .eco-ma-wahl { grid-template-columns: max-content max-content; }
	.eco-ma-box.eco-ma-mess-einzeln .eco-ma-seg { flex-wrap: nowrap; }
}
@media (min-width: 601px) {
	.eco-ma-box.eco-ma-mess-einzeln .eco-ma-wahl { column-gap: 12px; }
	.eco-ma-box.eco-ma-mess-einzeln .eco-ma-k { padding: 0 10px; }
}

/* „Bitte Beachten“-Bilder am Handy unter der Maßeingabe (1.2.19) */
.bot-objs.eco-ma-bilder { display: flex !important; gap: 8px; align-items: flex-end; margin: -8px 0 16px !important; padding: 0 !important; }
.bot-objs.eco-ma-bilder .widget { flex: 1 1 0 !important; margin: 0 !important; padding: 0 !important; }
.bot-objs.eco-ma-bilder .widget-title,
.bot-objs.eco-ma-bilder .is-divider { display: none !important; }
.bot-objs.eco-ma-bilder img { display: block; width: 100% !important; height: auto !important; margin: 0 !important; }

/* Handy: Höhe seitlich neben der Skizze, mittig – wie gemessen wird (Cemil, 17.10.2026, 1.2.21) */
@media (max-width: 600px) {
	.eco-ma-box .eco-ma-skizze {
		grid-template-columns: auto auto auto !important;
		grid-template-areas: "w w w" "l s r" !important;
		justify-content: center;
		align-items: center;
		column-gap: 8px;
	}
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-l { grid-column: auto !important; }
	.eco-ma-box .eco-ma-zelle-svg { max-width: 140px !important; }
	.eco-ma-box.eco-ma-ist-drei .eco-ma-skizze { column-gap: 4px; }
	.eco-ma-box.eco-ma-ist-drei input.eco-ma-input { width: 92px !important; }
	.eco-ma-box.eco-ma-ist-drei .eco-ma-zelle-svg { max-width: 110px !important; }
}

/* Handy: Produktname über dem Bild, Blätter-Pfeile ‹ › weg (Cemil, 17.10.2026, 1.2.22) */
@media (max-width: 767px) {
	.single-product h1.product_title.eco-ma-titel-oben { padding: 0 !important; margin: 0 0 12px !important; }
	.single-product .tmpmela_product_nav_buttons { display: none !important; }
}

/* Handy, 4-seitig: Skizze genau unter „Breite“, Höhe ganz links und etwas höher (Cemil, 17.10.2026, 1.2.23) */
@media (max-width: 600px) {
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-skizze {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
		grid-template-areas: "w w w" "l s r" !important;
		justify-content: stretch !important;
		column-gap: 6px !important;
	}
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-r { display: block !important; }
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-l { justify-content: flex-end; transform: translateY(-12px); }
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-svg { max-width: 120px !important; }
	.eco-ma-box:not(.eco-ma-ist-drei) #eco-ma-f-l input.eco-ma-input { width: 96px !important; }
}

/* Meterware: kein Messfoto („Bitte beachten“) und kein Messhinweis – es wird nicht gemessen */
body.eco-ma-meter-an .bot-objs { display: none !important; }
.eco-ma-ist-meter .eco-ma-mhinweis { display: none !important; }

/* Handy: Skizze größer (Cemil, 17.10.2026: Rahmen wirkt zu klein) */
@media (max-width: 600px) {
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-svg { width: 140px !important; max-width: 140px !important; }
	.eco-ma-box:not(.eco-ma-ist-drei) #eco-ma-f-l input.eco-ma-input { width: 96px !important; padding-right: 28px !important; }
	.eco-ma-box.eco-ma-ist-drei .eco-ma-zelle-svg { width: 135px !important; max-width: 135px !important; }
	.eco-ma-box.eco-ma-ist-drei input.eco-ma-input { width: 92px !important; padding-right: 28px !important; }
}
@media (max-width: 360px) {
	.eco-ma-box .eco-ma-zelle-svg { width: 120px !important; max-width: 120px !important; }
}
/* Handy, 4-seitig: Rahmen noch größer (Cemil, 17.10.2026) – Höhe-Feld dafür schlanker */
@media (max-width: 600px) {
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-svg { width: 160px !important; max-width: 160px !important; }
	.eco-ma-box:not(.eco-ma-ist-drei) #eco-ma-f-l input.eco-ma-input { width: 82px !important; padding: 0 24px 0 8px !important; }
	.eco-ma-box:not(.eco-ma-ist-drei) #eco-ma-f-l .eco-ma-cm { right: 6px; font-size: 12px; }
}
@media (max-width: 360px) {
	.eco-ma-box:not(.eco-ma-ist-drei) .eco-ma-zelle-svg { width: 130px !important; max-width: 130px !important; }
}
@media (max-width: 600px) {
	.eco-ma-box:not(.eco-ma-ist-drei) #eco-ma-f-l input.eco-ma-input::placeholder { font-size: 12px; }
}
