/* ============================================================
   Pametni dom: prikazi
   (lokalno ili u oblaku)
   Okvir .viz, kontrole i status su zajednički, u usluge.css.
   ============================================================ */

/* kontrole i status imaju smisla samo uz JS; bez JS-a ostaju crtež i kartice scena */
.viz:not(.is-js) .dom-js { display: none; }

/* ---------- zašto Home Assistant ---------- */
.dom-why { max-width: 760px; margin: 0 auto; }
.dom-why strong { color: var(--text-light); }

/* ---------- lokalno ili u oblaku ---------- */
.dom-cl-fig { max-width: 720px; }
.dom-cl-title { color: var(--text-light); font-weight: 650; font-size: 0.95rem; margin: 0.4rem 0 0.3rem; }
.dom-cl-title + .dom-cl { margin-bottom: 0.6rem; }
.dom-link { fill: none; stroke: #4f4b3f; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.dom-trail { fill: none; stroke: var(--electric-blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dom-broken { fill: none; stroke: #ff5a4f; stroke-width: 3; stroke-dasharray: 7 7; opacity: 0; }
.dom-node rect { fill: #262626; stroke: rgba(233, 202, 165, 0.35); stroke-width: 1.2; }
.dom-node text, .dom-net text { fill: var(--text-light); font-size: 15px; font-weight: 650; }
.dom-node--ha rect { stroke: rgba(212, 175, 55, 0.6); }
.dom-net rect { fill: #1b1b1b; stroke: rgba(233, 202, 165, 0.25); stroke-dasharray: 5 4; }
.dom-net text { fill: var(--text-muted); }
.dom-dot { fill: var(--electric-blue); stroke: #1e1e1e; stroke-width: 3; }
.dom-bulb-g__halo { fill: #ffd27a; opacity: 0; transition: opacity 0.3s ease; }
.dom-bulb-g__glass { fill: #3a372f; stroke: #6b6556; stroke-width: 1.5; transition: fill 0.3s ease; }
.dom-bulb-g__base { stroke: #6b6556; stroke-width: 2; stroke-linecap: round; }
.dom-bulb-g.is-on .dom-bulb-g__halo { opacity: 0.22; }
.dom-bulb-g.is-on .dom-bulb-g__glass { fill: #ffd27a; stroke: #ffd27a; }
.dom-x { opacity: 0; }
.dom-x circle { fill: #1e1e1e; stroke: #ff5a4f; stroke-width: 2; }
.dom-x path { stroke: #ff5a4f; stroke-width: 2.4; stroke-linecap: round; }
.is-offline .dom-broken, .is-offline .dom-x { opacity: 1; }
.is-offline .dom-net rect { stroke: rgba(255, 90, 79, 0.6); }
.is-offline [data-net="cloud"] .dom-trail { stroke: #8a8270; }

/* uski ekran: crteži se smanje, pa natpise povećamo u jedinicama crteža */
@media (max-width: 575.98px) {
  .dom-node text, .dom-net text { font-size: 21px; }
  .dom-node--cloud text tspan + tspan { font-size: 19px; }
}

/* ---------- smanjeno kretanje: stanja bez prijelaza ---------- */
@media (prefers-reduced-motion: reduce) {
  .dom-cl * { transition: none !important; animation: none !important; }
}
