/* 水槽の電気代計算: 機器の行と内訳の表。 */

.devices {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

.devices-title {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
}

.devices .hint {
  margin-top: 0;
}

#device-rows {
  display: grid;
  gap: 0.75rem;
}

.device {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.75rem 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--glass);
  border-radius: 6px;
}

.device legend {
  padding: 0 0.4rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
  font-weight: 600;
}

.device .field label {
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--ink-soft);
}

.device .field-input {
  margin-top: 0;
}

.device-name input {
  padding-right: 0.75rem;
}

.device-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.device-numbers .field-input input {
  padding-right: 3.25rem;
}

.device .error {
  margin-top: 0;
}

.device-remove {
  justify-self: end;
  min-height: 2.5rem;
  padding: 0.25rem 0;
  background: none;
  border: 0;
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--step--1);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.device-remove:hover {
  color: var(--alert);
}

.device-add {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1.5px dashed var(--glass);
  border-radius: 6px;
  color: var(--glass);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.device-add:hover {
  border-style: solid;
  color: var(--ink);
}

.device-add:disabled {
  opacity: 0.5;
  cursor: default;
}

.empty-note {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

.breakdown tbody th {
  font-weight: 400;
  white-space: normal;
  min-width: 6em;
}

.breakdown th,
.breakdown td {
  padding-inline: 0.4rem;
}

.breakdown th:last-child,
.breakdown td:last-child {
  padding-right: 0;
}
