/* Elektrodot - raspored po prostorijama */

/* ---------- boje prostorija (pod / ikonica) ---------- */
.ed-tip-kuca       { --ed-pod: #f4f5fa; --ed-boja: #3740ea; }
.ed-tip-dnevna     { --ed-pod: #fff4e6; --ed-boja: #c0640f; }
.ed-tip-kuhinja    { --ed-pod: #eaf7ee; --ed-boja: #2c8749; }
.ed-tip-trpezarija { --ed-pod: #fdf0e9; --ed-boja: #b5532a; }
.ed-tip-spavaca    { --ed-pod: #eef0ff; --ed-boja: #4a4fd4; }
.ed-tip-decja      { --ed-pod: #fdeff6; --ed-boja: #c03d7d; }
.ed-tip-kupatilo   { --ed-pod: #e7f6fb; --ed-boja: #1c84aa; }
.ed-tip-hodnik     { --ed-pod: #f3f3ef; --ed-boja: #6d675b; }
.ed-tip-radna      { --ed-pod: #f0f6e8; --ed-boja: #587b1f; }
.ed-tip-garaza     { --ed-pod: #edf0f4; --ed-boja: #4b596e; }
.ed-tip-dvoriste   { --ed-pod: #e8f7e5; --ed-boja: #37872a; }
.ed-tip-ostava     { --ed-pod: #f6f1e9; --ed-boja: #876737; }
.ed-tip-razvod     { --ed-pod: #fff8d9; --ed-boja: #a87b00; }

.ed-pros button,
.ed-plan button {
	margin: 0;
	min-height: 0;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	line-height: 1.2;
}
.ed-pros svg,
.ed-plan svg { flex: none; }


/* =================================================================
   STRANICA PROIZVODA
================================================================= */

.ed-pros {
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	margin: 6px 0 18px;
	padding: 16px 16px 14px;
	border: 1px solid #e1e3f3;
	border-radius: 10px;
	background: #f8f9ff;
	text-align: left;
}
.ed-pros-naslov {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: var(--porto-heading-color, #222529);
}
.ed-pros-znak { display: inline-flex; color: var(--porto-primary-color, #3740ea); }
.ed-pros-opciono {
	margin-left: auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: #eceefb;
	font-size: 11px;
	color: #6b6f86;
	white-space: nowrap;
}
.ed-pros-opis {
	margin: 4px 0 12px;
	font-size: 13px;
	line-height: 1.45;
	color: #6b6e7a;
}
.ed-pros-sobe {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.ed-soba {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: auto;
	padding: 6px 12px 6px 8px;
	border: 1px solid #d8dbea;
	border-radius: 999px;
	background: #fff;
	color: #3a3d48;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color .15s, background-color .15s, color .15s;
}
.ed-soba svg { width: 18px; height: 18px; color: var(--ed-boja, #3740ea); }
.ed-soba:hover { border-color: var(--porto-primary-color, #3740ea); }
.ed-soba:focus-visible { outline: 2px solid var(--porto-primary-color, #3740ea); outline-offset: 2px; }
.ed-soba.ed-izabrana {
	border-color: var(--porto-primary-color, #3740ea);
	background: var(--porto-primary-color, #3740ea);
	color: #fff;
}
.ed-soba.ed-izabrana svg { color: #fff; }
.ed-soba-druga { border-style: dashed; color: #555; }
.ed-soba-druga svg { color: #777; }

.ed-pros-nova {
	display: flex;
	gap: 6px;
	margin-top: 10px;
}
.ed-pros-nova[hidden],
.ed-pros-raspored[hidden] { display: none; }
.ed-pros-nova input {
	flex: 1;
	min-width: 0;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #d8dbea;
	border-radius: 6px;
	background: #fff;
	font-size: 13px;
}
.ed-pros-dodaj,
.ed-premesti-nova button {
	height: 36px;
	padding: 0 16px;
	border: 0;
	border-radius: 6px;
	background: var(--porto-primary-color, #3740ea);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.ed-pros-raspored {
	margin-top: 12px;
	padding-top: 8px;
	border-top: 1px dashed #d8dbea;
}
.ed-red {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	font-size: 13px;
}
.ed-red-ikona { display: inline-flex; color: var(--ed-boja, #3740ea); }
.ed-red-ikona svg { width: 18px; height: 18px; }
.ed-red-ime { flex: 1; min-width: 0; font-weight: 600; color: #222529; }
.ed-red-sve { color: #6b6e7a; }
.ed-brojac {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #d8dbea;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
}
.ed-pros .ed-brojac button {
	width: 30px;
	height: 32px;
	padding: 0;
	border: 0;
	background: #f1f2f8;
	color: #333;
	font-size: 16px;
	cursor: pointer;
}
.ed-pros .ed-brojac input {
	width: 44px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	text-align: center;
	font-size: 13px;
	-moz-appearance: textfield;
	appearance: textfield;
}
.ed-brojac input::-webkit-inner-spin-button,
.ed-brojac input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ed-pros .ed-ukloni {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #9a9cab;
	font-size: 20px;
	cursor: pointer;
}
.ed-pros .ed-ukloni:hover { background: #eceefb; color: #d43d3f; }
.ed-napomena {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #858899;
}
.quantity.ed-zakljucano { opacity: .55; pointer-events: none; }


/* =================================================================
   PLAN KUĆE
================================================================= */

.ed-plan {
	--ed-zid: #2b2e38;
	position: relative;
	margin: 0 0 28px;
	padding: 22px 22px 26px;
	border: 1px solid #e6e7ef;
	border-radius: 12px;
	background: #fff;
	color: #333;
}
.ed-plan-glava {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 10px 20px;
	margin-bottom: 8px;
}
.ed-plan .ed-plan-naslov {
	margin: 0 0 3px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--porto-heading-color, #222529);
}
.ed-plan-opis { margin: 0; font-size: 13px; color: #777; }
.ed-plan-zbir {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	font-size: 13px;
	color: #666;
}
.ed-plan-zbir strong { color: #222529; font-size: 15px; }
.ed-plan .ed-plan-stampaj {
	padding: 7px 14px;
	border: 1px solid #d3d6e6;
	border-radius: 6px;
	background: #fff;
	color: #333;
	font-size: 13px;
	cursor: pointer;
}
.ed-plan .ed-plan-stampaj:hover { border-color: var(--porto-primary-color, #3740ea); color: var(--porto-primary-color, #3740ea); }

/* kuća: krov + zidovi (razmak između prostorija je zid) */
.ed-kuca { max-width: 1180px; margin: 0 auto; padding: 0 14px; }
.ed-kuca::after {
	content: "";
	display: block;
	height: 7px;
	margin: 0 -14px;
	border-radius: 0 0 4px 4px;
	background: #c9ccd9;
}
.ed-krov {
	display: block;
	width: calc(100% + 28px);
	height: 62px;
	margin: 6px -14px -1px;
	overflow: visible;
}
.ed-krov polygon {
	fill: #eef0fb;
	stroke: var(--ed-zid);
	stroke-width: 6px;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}
.ed-krov .ed-dimnjak {
	fill: #d7dbee;
	stroke: var(--ed-zid);
	stroke-width: 4px;
	vector-effect: non-scaling-stroke;
}
/* zid je senka oko svake prostorije, pa prazno mesto u poslednjem redu ostaje svetlo */
.ed-sobe-plan {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	grid-auto-flow: row dense;
	gap: 5px;
	padding: 5px;
	background: #f7f8fc;
	box-shadow: inset 0 0 0 5px var(--ed-zid);
}

.ed-prostorija {
	position: relative;
	min-width: 0;
	min-height: 150px;
	padding: 12px 12px 12px;
	background: var(--ed-pod, #f4f5fa);
	box-shadow: 0 0 0 5px var(--ed-zid);
	transition: box-shadow .15s;
}
@media (min-width: 900px) {
	.ed-prostorija.ed-velika { grid-column: span 2; }
	.ed-velika .ed-stavke { grid-template-columns: 1fr 1fr; }
}
.ed-prostorija-glava {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}
.ed-ikona {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: #fff;
	color: var(--ed-boja, #3740ea);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .07);
}
.ed-prostorija-ime {
	min-width: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	color: #222529;
}
.ed-prostorija-kol {
	margin-left: auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: #fff;
	color: var(--ed-boja, #3740ea);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.ed-plan .ed-stavke {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ed-stavka {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 5px 9px 5px 5px;
	border: 1px solid rgba(0, 0, 0, .06);
	border-radius: 8px;
	background: #fff;
	font-size: 12.5px;
	line-height: 1.3;
	color: #333;
	list-style: none;
}
.ed-stavka img {
	flex: none;
	width: 40px;
	height: 40px;
	margin: 0;
	border-radius: 5px;
	background: #f5f5f7;
	object-fit: contain;
}
.ed-stavka-ime {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.ed-stavka-kol { flex: none; font-weight: 700; color: #222529; white-space: nowrap; }

.ed-plan-izmena .ed-stavka { cursor: grab; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.ed-plan-izmena .ed-stavka:hover,
.ed-plan-izmena .ed-stavka.ed-otvorena {
	border-color: var(--porto-primary-color, #3740ea);
	box-shadow: 0 2px 8px rgba(55, 64, 234, .14);
}
.ed-plan-izmena .ed-stavka:focus-visible { outline: 2px solid var(--porto-primary-color, #3740ea); outline-offset: 1px; }
.ed-stavka.ed-vuce { opacity: .35; }
.ed-prevlacenje .ed-prostorija { box-shadow: 0 0 0 5px var(--ed-zid), inset 0 0 0 2px rgba(55, 64, 234, .2); }
.ed-prevlacenje .ed-prostorija.ed-meta,
.ed-prostorija.ed-meta { box-shadow: 0 0 0 5px var(--ed-zid), inset 0 0 0 3px var(--porto-primary-color, #3740ea); }
/* "još nije raspoređeno" je ispred kuće - bez zida */
.ed-plan .ed-bez-sobe,
.ed-prevlacenje .ed-bez-sobe { box-shadow: none; }
.ed-plan .ed-bez-sobe.ed-meta,
.ed-prevlacenje .ed-bez-sobe.ed-meta { box-shadow: inset 0 0 0 3px var(--porto-primary-color, #3740ea); }

.ed-prazna-tekst {
	margin: 18px 0 0;
	font-size: 12px;
	line-height: 1.45;
	text-align: center;
	color: #888;
}

.ed-dodaj-okvir {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f5fa;
}
.ed-plan .ed-dodaj-sobu {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 14px 20px;
	border: 2px dashed #b9bdd2;
	border-radius: 10px;
	background: transparent;
	color: #555a70;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.ed-plan .ed-dodaj-sobu:hover,
.ed-plan .ed-dodaj-sobu.ed-otvorena { border-color: var(--porto-primary-color, #3740ea); color: var(--porto-primary-color, #3740ea); }

/* ispred kuće: još nerasporedjeni proizvodi */
.ed-bez-sobe {
	max-width: 1180px;
	min-height: 0;
	margin: 22px auto 0;
	border: 2px dashed #cfc4b0;
	border-radius: 10px;
}
.ed-bez-sobe .ed-stavke { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ed-bez-sobe-opis { margin: -4px 0 10px; font-size: 12.5px; color: #876737; }

.ed-plan.ed-ucitava { opacity: .6; pointer-events: none; }

/* meni "Premesti u..." */
.ed-premesti {
	position: absolute;
	z-index: 60;
	width: 280px;
	padding: 12px;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 14px 36px rgba(20, 22, 40, .2), 0 0 0 1px rgba(0, 0, 0, .05);
	text-align: left;
}
.ed-premesti-naslov {
	margin: 0 0 8px;
	padding-right: 24px;
	font-size: 13px;
	font-weight: 700;
	color: #222529;
}
.ed-plan .ed-premesti-zatvori {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #888;
	font-size: 20px;
	cursor: pointer;
}
.ed-premesti-kol {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px;
	font-size: 12.5px;
	font-weight: normal;
	color: #555;
}
.ed-premesti-kol input {
	width: 58px;
	height: 30px;
	padding: 0 6px;
	border: 1px solid #d8dbea;
	border-radius: 5px;
	text-align: center;
}
.ed-premesti-lista {
	display: grid;
	gap: 1px;
	max-height: 260px;
	overflow-y: auto;
}
.ed-plan .ed-premesti-lista button {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 7px 8px;
	border: 0;
	border-radius: 6px;
	background: none;
	color: #333;
	font-size: 13px;
	text-align: left;
	cursor: pointer;
}
.ed-premesti-lista button svg { width: 18px; height: 18px; color: var(--ed-boja, #3740ea); }
.ed-plan .ed-premesti-lista button:hover,
.ed-plan .ed-premesti-lista button:focus-visible { background: #f0f1fb; outline: none; }
.ed-plan .ed-premesti-ukloni { color: #876737; }
.ed-premesti-ukloni svg { color: #876737; }
.ed-premesti-nova {
	display: flex;
	gap: 6px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #eee;
}
.ed-premesti-nova input {
	flex: 1;
	min-width: 0;
	height: 34px;
	padding: 0 8px;
	border: 1px solid #d8dbea;
	border-radius: 6px;
	font-size: 12.5px;
}
.ed-plan .ed-premesti-nova button { height: 34px; padding: 0 12px; }

@media (max-width: 600px) {
	.ed-plan { padding: 16px 12px 20px; }
	.ed-plan .ed-plan-naslov { font-size: 17px; }
	.ed-kuca { padding: 0 8px; }
	.ed-kuca::after { margin: 0 -8px; }
	.ed-krov { width: calc(100% + 16px); height: 44px; margin: 4px -8px -1px; }
	.ed-sobe-plan { grid-template-columns: 1fr; }
	.ed-prostorija { min-height: 0; }
	.ed-premesti {
		position: fixed;
		top: auto !important;
		right: 8px;
		bottom: 8px;
		left: 8px !important;
		width: auto;
	}
	.ed-premesti-lista { max-height: 45vh; }
}

/* admin - box u porudžbini */
#ed-prostorije .ed-plan { margin: 0; padding: 12px 4px 4px; border: 0; }
#ed-prostorije .ed-plan-glava { display: none; }
#ed-prostorije .ed-sobe-plan { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
#ed-prostorije .ed-stavka-ime { display: block; overflow: visible; -webkit-line-clamp: unset; }

/* posebna stranica za štampu */
.ed-stampa-strana {
	margin: 0;
	padding: 20px;
	background: #fff;
	font: 13px/1.4 Arial, Helvetica, sans-serif;
}
.ed-stampa-strana .ed-plan { border: 0; padding: 0; }
@media print {
	.ed-stampa-strana { padding: 0; }
	.ed-plan,
	.ed-prostorija,
	.ed-sobe-plan,
	.ed-ikona,
	.ed-krov,
	.ed-kuca::after { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.ed-prostorija { break-inside: avoid; }
	.ed-premesti,
	.ed-plan-stampaj { display: none !important; }
}
