/* Centralised search box, shared by the REST API page and the MCP tool guide */
.api-search {
  position: relative;
  max-width: 760px;
  margin: 32px auto 20px;
  font-family: sans-serif;
}

.api-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 20px;
  background: #fff;
  border: 1px solid #d8dde3;
  border-radius: 28px;
  box-shadow: 0 2px 10px rgba(27, 58, 92, 0.08);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.api-search-box:focus-within {
  border-color: #1b3a5c;
  box-shadow: 0 4px 20px rgba(27, 58, 92, 0.18);
}

.api-search-icon {
  flex: none;
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid #6b7785;
  border-radius: 50%;
}

.api-search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: #6b7785;
  transform: rotate(45deg);
}

.api-search .api-search-box .api-search-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 12px 0;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #1f2933;
  box-shadow: none;
}

.api-search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.api-search-kbd {
  flex: none;
  padding: 3px 8px;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  background: #f4f6f8;
  color: #6b7785;
  font-size: 12px;
  font-family: sans-serif;
}

.api-search-panel {
  position: absolute;
  z-index: 20;
  top: 58px;
  left: 0;
  right: 0;
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #d8dde3;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(27, 58, 92, 0.18);
}

.api-search-meta,
.api-search-empty {
  padding: 8px 12px;
  font-size: 12px;
  color: #6b7785;
}

.api-search-empty {
  font-size: 14px;
  padding: 14px 12px;
}

.api-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.api-search-result.is-active {
  background: #e8eef5;
}

.api-search-method {
  flex: none;
  width: 64px;
  padding: 4px 0;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: #6b7785;
}

.api-search-method.method-get { background: #61affe; }
.api-search-method.method-post { background: #49cc90; }
.api-search-method.method-put { background: #fca130; }
.api-search-method.method-delete { background: #f93e3e; }
.api-search-method.method-patch { background: #50e3c2; }

.api-search-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.api-search-path {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
  color: #1f2933;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-search-sub {
  font-size: 12px;
  color: #6b7785;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-search-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.api-search-chip {
  padding: 6px 14px;
  border: 1px solid #d8dde3;
  border-radius: 999px;
  background: #fff;
  color: #3e4c59;
  font-size: 13px;
  cursor: pointer;
}

.api-search-chip:hover {
  border-color: #1b3a5c;
  color: #1b3a5c;
}

@media (max-width: 600px) {
  .api-search-kbd {
    display: none;
  }
}

.api-search-hit {
  padding: 0 1px;
  border-radius: 3px;
  background: #ffe58a;
  color: #1f2933;
  font-weight: 700;
}
