.pgcmd[hidden] {
  display: none;
}

.pgcmd {
  position: fixed;
  inset: 0;
  z-index: 2320;
  display: grid;
  place-items: start center;
  padding: min(15vh, 6.4rem) 1rem 1rem;
  pointer-events: none;
}

.pgcmd__backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

.pgcmd__panel {
  position: relative;
  width: min(33rem, calc(100vw - 2rem));
  display: grid;
  gap: 1rem;
  background: transparent;
  pointer-events: auto;
}

.pgcmd__search {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.42rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.88rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(244, 247, 255, 0.74)),
    rgba(255, 255, 255, 0.78);
  box-shadow:
    0 16px 34px rgba(86, 98, 136, 0.24),
    0 2px 8px rgba(86, 98, 136, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(131, 143, 176, 0.12);
}

.pgcmd__search .material-symbols-outlined {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  font-size: 1.16rem;
}

.pgcmd__search input {
  min-width: 0;
  height: 2.35rem;
  border: 0;
  background: transparent;
  color: #242733;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 720;
  outline: none;
}

.pgcmd__search input::placeholder {
  color: rgba(40, 45, 58, 0.62);
}

.pgcmd__search kbd {
  min-height: 1.7rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.48rem;
  border: 1px solid rgba(149, 157, 181, 0.34);
  border-radius: 0.44rem;
  background: rgba(255, 255, 255, 0.58);
  color: #414858;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 850;
}

.pgcmd__results {
  display: grid;
  gap: 0.42rem;
  max-height: min(19rem, 50vh);
  padding: 0.62rem;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(243, 246, 255, 0.68)),
    rgba(255, 255, 255, 0.76);
  box-shadow:
    0 18px 38px rgba(86, 98, 136, 0.22),
    0 2px 8px rgba(86, 98, 136, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.pgcmd__group {
  display: grid;
  gap: 0.05rem;
}

.pgcmd__group-title {
  padding: 0.12rem 0.55rem 0.22rem;
  color: rgba(58, 65, 82, 0.62);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pgcmd__result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.42rem 0.48rem 0.42rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  background: transparent;
  color: #242733;
  text-align: left;
  cursor: pointer;
}

.pgcmd__result:hover,
.pgcmd__result.is-active {
  border-color: rgba(145, 154, 181, 0.2);
  background: rgba(255, 255, 255, 0.52);
}

.pgcmd__result-icon {
  order: 2;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.48rem;
  background: rgba(255, 255, 255, 0.42);
  color: #3f4658;
  font-size: 0.92rem;
}

.pgcmd__result-copy {
  order: 1;
  min-width: 0;
  display: grid;
}

.pgcmd__result-title {
  overflow: hidden;
  color: #242733;
  font-size: 0.82rem;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pgcmd__result-title mark,
.pgcmd__result-meta mark {
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  font: inherit;
}

.pgcmd__result-meta {
  overflow: hidden;
  color: #6b7280;
  font-size: 0.66rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pgcmd__empty {
  margin: 0;
  padding: 0.85rem;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 720;
  text-align: center;
}

@media (max-width: 700px) {
  .pgcmd {
    place-items: start stretch;
    padding-top: 4.2rem;
  }

  .pgcmd__panel {
    width: 100%;
  }

  .pgcmd__search {
    grid-template-columns: 2.45rem minmax(0, 1fr);
  }

  .pgcmd__search kbd {
    display: none;
  }
}
