.gatt-page [hidden] {
  display: none !important;
}

.gatt-card {
  margin-block: 0 1rem;
}

.gatt-options {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: .9rem;
}

.gatt-options input,
.gatt-filter input {
  width: 100%;
}

.gatt-note {
  font-size: .875rem;
  color: var(--display-muted);
}

.gatt-check {
  display: block;
  width: fit-content;
  margin-block: .65rem;
}

.gatt-check input {
  margin-inline: 0 .4rem;
}

.gatt-help {
  margin-top: .9rem;
}

.gatt-section-heading,
.gatt-characteristic {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
}

.gatt-filter {
  width: min(100%, 22rem);
}

.gatt-service {
  border-block-start: 1px solid var(--display-border);
  padding-block: .75rem;
}

.gatt-service > summary {
  cursor: pointer;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.gatt-service > ul {
  padding: 0;
  margin: .6rem 0 0;
  list-style: none;
}

.gatt-characteristic {
  padding: .7rem;
  margin-top: .5rem;
  background: var(--tool-subtle);
  border-radius: .45rem;
}

.gatt-characteristic > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gatt-characteristic p,
.gatt-characteristic ul {
  margin: .25rem 0 0;
}

.gatt-characteristic .display-actions {
  margin: 0;
}

.gatt-uuid,
.gatt-value-hex {
  overflow-wrap: anywhere;
  font-size: .82rem;
}

.gatt-value {
  flex-basis: 100%;
  overflow-wrap: anywhere;
}

.gatt-table-wrap {
  margin-top: .8rem;
  overflow: auto;
  max-height: 25rem;
}

.gatt-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: .875rem;
}

.gatt-table th,
.gatt-table td {
  padding: .5rem;
  border-bottom: 1px solid var(--display-border);
  vertical-align: top;
}

.gatt-table th {
  position: sticky;
  top: 0;
  background: var(--tool-subtle);
}

@media (max-width: 640px) {
  .gatt-options {
    grid-template-columns: 1fr;
  }
}
