/* Architecture diagram editor. Colour comes from the brand tokens only. */

.dg { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .dg { grid-template-columns: 1fr; } }

.dg-palette { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-3); position: sticky; top: 12px; }
.dg-tabs { flex-wrap: wrap; }   /* look: shadcn TabsList in styles.css */
.dg-icons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 58vh; overflow: auto; align-content: start; }
.dg-icons button { display: grid; gap: 4px; justify-items: center; padding: 8px 4px; border: 1px solid transparent; border-radius: 10px; background: none; cursor: grab; color: var(--ink-2); font: 400 10px/1.2 var(--font-body); text-align: center; overflow-wrap: break-word; min-width: 0; }
.dg-icons button:hover { border-color: var(--line); background: var(--card); }
.dg-icons img { width: 36px; height: 36px; object-fit: contain; }
.dg-shape { width: 36px; height: 36px; display: grid; place-items: center; border: 1.5px dashed var(--muted); border-radius: 6px; font: 600 13px var(--font-display); color: var(--muted); }

.dg-main { display: grid; gap: 8px; min-width: 0; }
.dg-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-3); }
.dg-bar input[type="text"], .dg-bar select { width: auto; min-width: 0; }
.dg-bar .grow { flex: 1 1 160px; }
.dg-bar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }

.dg-canvas { height: 68vh; min-height: 420px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-3); overflow: hidden; touch-action: none; user-select: none; position: relative; }
.dg-canvas svg { width: 100%; height: 100%; display: block; cursor: grab; }
.dg-canvas svg.panning { cursor: grabbing; }
.dg-canvas [data-node] { cursor: move; }
.dg-canvas [data-edge] { cursor: pointer; }
.dg-canvas .port { cursor: crosshair; }
.dg-canvas .resize { cursor: nwse-resize; }
.dg-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: var(--muted); font-size: 13px; text-align: center; padding: 24px; }
.dg-empty[hidden] { display: none; }
.dg-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.dg-foot a { color: inherit; }
