/* Winding Designer — tool-specific styles.
   Layout, sidebar sections, inputs, warning box and result cards come
   from shared/theme.css (body.mt-app). */

.input-panel { --panel-w: 320px; }
.param-row-2 { --input-w: 130px; }

/* feasibility warning: shown by app.js via style.display */
.warning-box { display: none; font-family: var(--mono); }

/* ══════════════════════════════════════════════════════════
   Winding diagram
   ══════════════════════════════════════════════════════════ */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bar-bg);
  border-radius: 10px;
  padding: 4px;
  flex-shrink: 0;
}
.view-toggle-btn {
  min-height: 30px;
  padding: 0 12px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text2);
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.view-toggle-btn:hover { color: var(--text); }
.view-toggle-btn.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,.12);
}

.phase-filter-row {
  margin-top: 8px;
  align-self: flex-start;
  gap: 6px;
}
.phase-filter-label {
  font-size: var(--fs-xs);
  color: var(--text2);
  padding: 0 4px;
  align-self: center;
}

/* 展開圖下方：剖面圖和槽極比較表並排，寬度不夠時上下疊 */
.wd-lower-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.wd-radial-card { flex: 1 1 360px; min-width: 0; }
.wd-table-card  { flex: 1 1 420px; min-width: 0; }
.winding-diagram-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 6px;
  display: flex;
  justify-content: center;
}
.wd-svg { display: block; max-width: 100%; height: auto; }

.wd-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.wd-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text);
}
/* 圖例說明用 \n 分行 */
.legend-hint { white-space: pre-line; line-height: 1.6; }

.wd-legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   Pole / slot comparison table
   ══════════════════════════════════════════════════════════ */
.table-range-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--text);
  margin-bottom: 8px;
}
.param-input.mini { width: 56px; flex: none; }

.wd-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}
.wd-table {
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: var(--fs-xs);
}
.wd-table th {
  padding: 6px 10px;
  color: var(--text2);
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
}
.wd-table td {
  padding: 6px 10px;
  text-align: center;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.wd-cell {
  cursor: pointer;
  font-weight: 600;
  transition: filter .1s;
}
.wd-cell:hover { filter: brightness(1.08); }
/* infeasible cell: deliberately near-black in both themes */
.wd-cell-na { background: #111827; }
[data-theme="dark"] .wd-cell-na { background: #05070d; }
