/* Global search — command palette */
.pp-gs-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 420px;
  width: 100%;
  margin: 0 12px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.pp-gs-trigger:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.4);
}

.pp-gs-trigger ion-icon {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.pp-gs-trigger-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.pp-gs-kbd {
  flex-shrink: 0;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
}

.pp-gs-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 24px;
}

.pp-gs-panel {
  width: min(96vw, 560px);
  max-height: min(78vh, 520px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pp-gs-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.pp-gs-input-wrap ion-icon {
  font-size: 22px;
  color: #64748b;
  flex-shrink: 0;
}

.pp-gs-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #0f172a;
  background: transparent;
  font-family: inherit;
}

.pp-gs-input::placeholder {
  color: #94a3b8;
}

.pp-gs-body {
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
  -webkit-overflow-scrolling: touch;
}

.pp-gs-group-label {
  padding: 10px 16px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.pp-gs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.pp-gs-item:hover,
.pp-gs-item.is-active {
  background: #f1f5f9;
}

.pp-gs-item.is-active {
  background: rgba(2, 123, 255, 0.1);
}

.pp-gs-item img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
}

.pp-gs-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #027bff;
}

.pp-gs-item-icon ion-icon {
  font-size: 22px;
}

.pp-gs-item-main {
  flex: 1;
  min-width: 0;
}

.pp-gs-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-gs-item-sub {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-gs-empty,
.pp-gs-loading,
.pp-gs-hint {
  padding: 28px 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.pp-gs-foot {
  padding: 8px 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .pp-gs-trigger .pp-gs-kbd {
    display: none;
  }
  .pp-gs-trigger {
    max-width: 200px;
    margin: 0 6px;
    padding: 6px 10px;
  }
  .pp-gs-trigger-text {
    font-size: 0.8rem;
  }
}
