@import url("../site.css");

.panel-head {
  display: grid;
  gap: 14px;
}

.panel-head h2 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1;
}

.panel-head p {
  margin: 6px 0 0;
}

.panel-toolbar,
.panel-meta,
.toolbar-actions,
.results-head,
.results-actions,
.top-actions,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.panel-toolbar {
  justify-content: space-between;
}

.toolbar-actions {
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.88rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.input-wrap {
  position: relative;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 12px 42px 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: rgba(15, 118, 110, 0.48);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.icon-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(12, 34, 56, 0.14);
}

.suggestions.open {
  display: block;
}

.sug-item {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  border-top: 1px solid rgba(16, 36, 54, 0.08);
}

.sug-item:first-child {
  border-top: 0;
}

.sug-item:hover,
.sug-item[aria-selected="true"] {
  background: rgba(15, 118, 110, 0.08);
}

.sug-main {
  font-size: 0.92rem;
}

.sug-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.results-head {
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.results-count {
  color: var(--muted);
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface-soft);
}

.card .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.brandline {
  font-weight: 700;
}

.model {
  margin-top: 4px;
  color: var(--muted);
  word-break: break-word;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #8b4a04;
  font-size: 0.8rem;
  font-weight: 700;
}

.kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.k {
  font-size: 0.78rem;
  color: var(--muted);
}

.v {
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  word-break: break-word;
}

.callout {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background: rgba(15, 118, 110, 0.08);
  color: var(--muted);
}

.help-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.page-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 0.88rem;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  color: var(--muted);
  font-size: 0.88rem;
}

.switch input {
  display: none;
}

.slider {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(16, 36, 54, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transform: translateY(-50%);
  transition: left 0.2s ease, background 0.2s ease;
  box-shadow: 0 4px 10px rgba(12, 34, 56, 0.18);
}

.switch input:checked + .slider {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.16);
}

.switch input:checked + .slider::after {
  left: 23px;
  background: #0f766e;
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .panel-toolbar,
  .panel-meta,
  .toolbar-actions,
  .results-head {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions .btn,
  .results-actions .btn {
    width: 100%;
  }

  .results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .grid,
  .kv {
    grid-template-columns: 1fr;
  }

  input,
  .btn,
  .site-nav a,
  .site-nav button {
    font-size: 16px;
  }

  .card .row {
    flex-direction: column;
  }
}
