/*
 * Anläggningen live (src/anlaggningen.html): EpiPower's plant drawing on the
 * marketing site. plant.css is a verbatim copy of the app's epi-plant.css;
 * this file gives it the app's UI tokens it reads and lays out the page
 * around it. The drawing keeps its own light palette in both appearances,
 * like a product picture; the numbers and the panel follow the site's.
 */

.plant-demo {
  /* The EpiPower UI tokens plant.css reads (the app's epi-ui.css). */
  --epi-radius: 6px;
  --epi-surface: #fff;
  --epi-border: #e3e7ee;
  --epi-hair: #eef1f5;
  --epi-ink: #1d2433;
  --epi-ink-2: #4b5565;
  --epi-muted: #6b7280;
  --epi-el: #2a78d6;
  --epi-heat: #eb6834;
  --epi-accent: #2a78d6;
  --epi-good: #0ca30c;
  --epi-tone-slate: #4a5a70;
  --epi-tone-kiln: #12815a;
  --epi-tone-heat: #c4501f;
  --epi-tint-kiln: #e4f5ee;
}
.plant-demo .epi-ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round;
                      stroke-linejoin: round; vertical-align: -.14em; flex: 0 0 auto; --icon-surface: #fff; }
/* The app falls back to Font Awesome for a few building types; this site loads no icon font. */
.plant-demo .ep-label-name i.fas { display: none; }

/* ── Above the drawing ─────────────────────────────────────────────────── */
.plant-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 40px; margin-bottom: 30px; }
.plant-head .eyebrow { margin-bottom: 14px; }
.plant-head h2 { margin-bottom: 12px; }
.plant-head p:last-child { margin: 0; color: var(--muted); }
.plant-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.plant-live { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.plant-live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #0ca30c; animation: plantPing 2s ease-out infinite; }
.plant-live.is-paused::before { background: #aab3bf; animation: none; }
@keyframes plantPing { 0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, .45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(12, 163, 12, 0); } }
.plant-pause { display: none; min-height: 44px; padding: 9px 16px; font-size: 14px; gap: 9px; }
.js .plant-pause { display: inline-flex; }
.plant-pause svg { width: 14px; height: 14px; }
.plant-pause [data-icon=play], .plant-pause[data-paused=true] [data-icon=pause] { display: none; }
.plant-pause[data-paused=true] [data-icon=play] { display: block; }

.plant-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 30px; }
.plant-kpi { border-top: 3px solid var(--line); padding-top: 14px; min-width: 0; }
.plant-kpi.is-el   { border-top-color: #2a78d6; }
.plant-kpi.is-heat { border-top-color: #eb6834; }
.plant-kpi.is-kiln { border-top-color: #12815a; }
.plant-kpi-label, .plant-kpi-sub { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); }
.plant-kpi strong { display: block; font-size: 36px; line-height: 1.35; font-weight: 600; letter-spacing: -.04em;
                    font-variant-numeric: tabular-nums; white-space: nowrap; }
.plant-kpi strong small { font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 6px; }

/* ── The drawing: a light product picture in both appearances ─────────── */
.plant-frame { margin: 0; border: 1px solid var(--image-border); border-radius: 6px; overflow: hidden; background: #f6f8fb; }
.plant-frame .ep-stagewrap { border-radius: 0; }
.plant-frame .ep-stagewrap:focus-visible { outline: 3px solid var(--orange-text); outline-offset: -3px; }
.plant-nojs { margin: 0; padding: 120px 24px; text-align: center; color: #4b5565; font-size: 15px; }
.plant-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
                 padding: 12px 16px; border-top: 1px solid #e3e7ee; background: #fff; color: #4b5565; }
.plant-toolbar .ep-legend { color: #4b5565; }
.plant-toolbar .ep-legend .ep-state { margin-right: 6px; }
.plant-caption { font-size: 12px; line-height: 1.5; color: #6b7280; }
.plant-hint { display: none; font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.plant-more { margin-top: 26px; }

/* ── A building, opened ────────────────────────────────────────────────── */
.plant-dialog { width: min(500px, 94vw); padding: 26px; }
.plant-dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 18px; }
.plant-dialog-head .eyebrow { margin-bottom: 8px; }
.plant-dialog-head form { margin: 0; flex: none; }
.plant-dialog-head .button { min-height: 40px; padding: 7px 14px; font-size: 14px; }
.plant-dialog-title { font-size: 30px; margin: 0; }
.plant-dialog h3 { font-size: 17px; letter-spacing: -.01em; margin: 24px 0 8px; }
.plant-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; margin: 0; font-size: 15px; }
.plant-facts dt { color: var(--muted); }
.plant-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.plant-note { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 14px 0 0; }
.plant-kind { color: var(--muted); font-size: 13px; }
.plant-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.plant-meters { width: 100%; border-collapse: collapse; font-size: 14px; }
.plant-meters td { padding: 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.plant-meters td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 14px; }
.plant-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; vertical-align: 1px; }
.plant-dot.is-el { background: #2a78d6; }
.plant-dot.is-heat { background: #eb6834; }
.plant-chambers { list-style: none; margin: 0; padding: 0; }
.plant-chambers li { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; margin: 0; padding: 8px 0;
                     border-top: 1px solid var(--line); font-size: 14px; }
.plant-chambers li > span { font-variant-numeric: tabular-nums; white-space: nowrap; }
.plant-bar { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--surface); overflow: hidden; }
.plant-bar span { display: block; height: 100%; border-radius: 3px; background: #12815a; }
.plant-dialog .ep-state { font-size: 14px; }

@media (max-width: 1100px) { .plant-hint { display: block; } }
@media (max-width: 760px) {
  .plant-kpis { grid-template-columns: 1fr 1fr; gap: 20px; }
  .plant-kpi strong { font-size: 28px; }
  .plant-head { align-items: start; }
}
@media (prefers-reduced-motion: reduce) { .plant-live::before { animation: none; } }
@media print { .plant-controls, .plant-hint { display: none; } }
