/* PatchKit docs search modal */

.pk-search-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 7px 10px;
  margin: 6px 0;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  color: #6a737d;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background-color 0.15s;
}
.pk-search-trigger:hover { border-color: #bbb; background: #fafbfc; }
.pk-search-trigger .pk-search-trigger-label { flex: 1; }
.pk-search-trigger kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 2px 5px;
  border: 1px solid #d0d7de;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #f6f8fa;
  color: #57606a;
}
.pk-search-trigger svg { width: 14px; height: 14px; color: #6a737d; flex: none; }

html.pk-search-open { overflow: hidden; }

.pk-search-modal[hidden] { display: none; }
.pk-search-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.pk-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 31, 36, 0.55);
  backdrop-filter: blur(2px);
  animation: pk-fade 0.12s ease-out;
}
.pk-search-box {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: pk-pop 0.14s ease-out;
}
@keyframes pk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pk-pop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pk-search-inputrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #eaecef;
}
.pk-search-icon { width: 18px; height: 18px; color: #8b949e; flex: none; }
.pk-search-input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 16px;
  font-family: inherit;
  color: #24292f;
  background: transparent;
}
.pk-search-input::placeholder { color: #8b949e; }
.pk-search-kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid #d0d7de;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #f6f8fa;
  color: #57606a;
}

.pk-search-status {
  font-size: 12px;
  color: #57606a;
  padding: 6px 16px 0;
  min-height: 18px;
}

.pk-search-results {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
}
.pk-search-result {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #24292f;
  border: 1px solid transparent;
}
.pk-search-result.is-selected {
  background: #0366d6;
  color: #fff;
  border-color: #0366d6;
}
.pk-search-result.is-selected .pk-search-result-sep,
.pk-search-result.is-selected .pk-search-result-excerpt { color: rgba(255, 255, 255, 0.85); }
.pk-search-result-breadcrumb {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}
.pk-search-result-sep {
  color: #8b949e;
  margin: 0 6px;
  font-weight: 400;
}
.pk-search-result-excerpt {
  font-size: 12.5px;
  color: #57606a;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pk-search-result mark {
  background: #fff3b0;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.pk-search-result.is-selected mark {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.pk-search-footer {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  font-size: 11px;
  color: #6a737d;
  border-top: 1px solid #eaecef;
  background: #f6f8fa;
}
.pk-search-footer kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 1px 4px;
  border: 1px solid #d0d7de;
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #fff;
  color: #57606a;
  margin-right: 3px;
}

@media (max-width: 600px) {
  .pk-search-modal { padding-top: 0; }
  .pk-search-box { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
}
