/* The New dialog (js/templatesDialog.js): Blank design and the starter
   templates as cards, each with a picture of its drawing. Above My Projects
   (z-index 900), whose "+ New project" opens it too. */
.new-design-dialog { z-index: 950; }
.new-design-dialog .unit-picker-box { width: min(880px, calc(100vw - 32px)); }

/* Cards three to a row on a laptop, two on a tablet, one on a phone. The
   padding leaves room for a card's focus ring inside the scrolling box. */
.new-design-grid {
  list-style: none;
  margin: 0;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.new-design-grid > li { display: flex; min-width: 0; }

.new-design-card {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 10px;
  text-align: left;
  border-radius: var(--radius);
  background: var(--panel-alt);
}
.new-design-card:hover { border-color: var(--accent); background: var(--button-hover); }
.new-design-card:active { background: var(--accent-dim); }

.new-design-picture {
  display: block;
  width: 100%;
  height: 110px;
  margin-bottom: 4px;
  border-radius: 4px;
  background: var(--canvas);
}
/* A drawing is scaled down about seven times, so line widths are in screen
   pixels rather than the drawing's. */
.new-design-picture * { vector-effect: non-scaling-stroke; }
.new-design-zone { fill: none; stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 4 3; }
.new-design-unit { fill: var(--panel-alt); stroke: var(--text-dim); stroke-width: 1; }
.new-design-wire { fill: none; stroke-width: 1.5; stroke-linejoin: round; }
.new-design-plus { fill: none; stroke: var(--text-dim); stroke-width: 2; stroke-linecap: round; }

.new-design-name { font-weight: 600; font-size: 13px; color: var(--text); }
.new-design-blurb { font-size: 11.5px; line-height: 1.35; color: var(--text-dim); }

/* A phone: one card to a row, the picture a little shorter, and Cancel kept
   in sight at the foot of the scrolling box and big enough for a finger. */
@media (max-width: 700px) {
  .new-design-picture { height: 90px; }
  .new-design-dialog .unit-picker-actions {
    position: sticky;
    bottom: -18px;
    margin: 14px -20px -18px;
    padding: 10px 20px 18px;
    background: var(--panel);
    border-top: 1px solid var(--border);
  }
  .new-design-dialog .unit-picker-actions button { min-height: 44px; }
}

/* The card Home's own card for it opened the dialog on (home/startPages.js):
   ringed until something else is picked. */
.new-design-card.new-design-chosen { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
