.device-parameters-panel {
  padding: 0;
  overflow: hidden;
}

.parameter-total {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 20px;
  color: #087964;
  background: #dff7f0;
  font-size: 11px;
  font-weight: 700;
}

.device-parameter-summary {
  min-width: 130px;
}

.device-parameter-summary small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.discovery-status {
  max-width: 580px;
  line-height: 1.4;
}

.discovery-status.error {
  color: #a1392b;
}

#device-details-refresh:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}

.device-page-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfb;
}

.device-page-identity h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.03em;
}

.device-page-identity p:last-child {
  margin: 5px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.parameters-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 14px;
}

.parameters-toolbar h3 {
  margin: 0;
  font-size: 18px;
}

.parameters-toolbar p {
  margin: 4px 0 0;
  font-size: 12px;
}

.parameters-toolbar input {
  width: min(390px, 100%);
}

.parameters-table {
  max-height: calc(100vh - 300px);
  padding: 0 14px 18px;
}

.parameters-table thead {
  position: sticky;
  z-index: 1;
  top: 0;
  background: white;
}

.parameters-table tbody tr {
  cursor: default;
}

.parameters-table th:nth-child(1) { width: 42%; }
.parameters-table th:nth-child(2) { width: 31%; }
.parameters-table th:nth-child(3) { width: 12%; }
.parameters-table th:last-child { width: 52px; }

.parameter-name {
  display: grid;
  gap: 5px;
  min-width: 260px;
}

.parameter-name code,
.parameter-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.parameter-name code {
  color: #164f51;
  font-size: 12px;
}

.parameter-name small {
  width: max-content;
  padding: 2px 6px;
  border-radius: 10px;
  color: #087964;
  background: #dff7f0;
  font-size: 9px;
  text-transform: uppercase;
}

.parameter-value {
  max-width: 420px;
  white-space: pre-wrap;
}

.parameters-table td:nth-last-child(2) {
  color: var(--muted);
  white-space: nowrap;
}

.parameter-action {
  text-align: right;
}

.parameter-action button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #087964;
  background: #effaf7;
  font-size: 18px;
  cursor: pointer;
}

.parameter-action button:hover {
  border-color: #8dd6c7;
  background: #dff7f0;
}

.parameter-edit-identity {
  display: grid;
  gap: 7px;
  margin: 22px 0;
  padding: 13px;
  border-radius: 10px;
  background: #f5f8f8;
}

.parameter-edit-identity code {
  overflow-wrap: anywhere;
  color: #164f51;
  font-size: 12px;
}

.parameter-edit-identity small {
  color: var(--muted);
}

#parameter-edit-control input,
#parameter-edit-control select {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .device-page-head {
    grid-template-columns: 1fr auto;
  }

  .device-page-identity {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .device-page-head > #device-details-back {
    grid-column: 1;
    grid-row: 2;
    width: max-content;
  }

  .device-page-head > .device-page-actions {
    grid-column: 2;
    grid-row: 2;
  }

  .parameters-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .parameters-toolbar input {
    width: 100%;
  }

  .parameters-table {
    max-height: none;
  }

  .modal-actions.left {
    flex-wrap: wrap;
  }
}
