#wbBidderView .bidder-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#wbBidderView [data-bidder-serp-link]:not(.hidden) {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 650;
}

#wbBidderSerpView {
  --serp-ink: #172d25;
  --serp-muted: #4e655d;
  --serp-accent: #176348;
  --serp-line: #dce7df;
  --serp-own: #d7eedf;
  color: var(--serp-ink);
}

#wbBidderSerpView .serp-panel {
  max-width: 1480px;
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid var(--serp-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px #183c2910;
}

.serp-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  max-width: 1040px;
  gap: 10px;
}
.serp-search label { font-weight: 700; }
.serp-search input { min-width: 0; width: 100%; min-height: 38px; border-radius: 8px; }
.serp-search .primary-btn { min-height: 38px; padding: 5px 16px; background: var(--serp-accent); box-shadow: none; border-radius: 8px; }
.serp-status:not(:empty) { margin-top: 14px; color: var(--serp-muted); }
.serp-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 16px 0 10px;
  color: var(--serp-muted);
  font-size: .9rem;
}
.serp-info > strong { color: var(--serp-ink); }
.serp-info .ghost-btn { margin-left: auto; min-height: 30px; padding: 4px 9px; border-radius: 7px; }
.serp-legend { display: inline-flex; align-items: center; gap: 6px; }
.serp-legend i { width: 13px; height: 13px; background: #e7eeed; border-radius: 4px; }
.serp-legend .serp-is-own { background: #a5d7b3; }
.serp-warning { color: #785b25; font-size: .86rem; margin: 0 0 9px; }
.serp-placement-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 0 0 8px; color: var(--serp-muted); font-size: .8rem; }
.serp-placement-legend b { display: inline-block; min-width: 16px; text-align: center; border-radius: 4px; }
.serp-map {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: auto;
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid var(--serp-line);
  border-radius: 8px;
}
.serp-map strong { position: sticky; left: 0; padding: 5px 8px; background: #fff; font-size: .8rem; }
.serp-map button {
  flex: 1 0 25px;
  min-height: 28px;
  padding: 0 4px;
  border: 0;
  border-radius: 4px;
  background: #edf2f1;
  color: var(--serp-ink);
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}
.serp-map button.serp-is-own { background: #bde5c8; color: #13563a; font-weight: 750; }
.serp-map button:has(.serp-placement) { display: grid; justify-items: center; gap: 2px; padding-block: 4px; line-height: 1; }
.serp-map .serp-placement { min-width: 15px; border-radius: 3px; padding: 2px; font-size: .65rem; font-weight: 750; }
.serp-map button:hover { box-shadow: inset 0 0 0 1px var(--serp-accent); }
.serp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.serp-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--serp-line);
  border-radius: 10px;
  background: #fff;
  scroll-margin-block: 72px 12px;
}
.serp-card.serp-own { border-color: #5c9c7b; }
.serp-card-heading { display: flex; justify-content: space-between; align-items: center; padding: 7px 9px 6px; min-height: 32px; }
.serp-card-heading span { padding: 3px 7px; border-radius: 6px; background: var(--serp-own); color: #13563a; font-size: .75rem; font-weight: 700; }
.serp-card-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
#wbBidderSerpView .serp-placement.serp-ad { background: #ffedca; color: #78480a; }
#wbBidderSerpView .serp-placement.serp-organic { background: #dfeaf8; color: #2e5078; }
#wbBidderSerpView .serp-placement.serp-unknown { background: #e8ecea; color: #51625a; }
.serp-card-link { display: grid; gap: 5px; padding: 0 8px 9px; color: inherit; text-decoration: none; }
.serp-card-link:hover > strong { text-decoration: underline; text-underline-offset: 2px; }
.serp-card-link > strong { overflow-wrap: anywhere; font-size: .94rem; line-height: 1.28; }
.serp-card small { display: block; color: var(--serp-muted); font-size: .76rem; }
.serp-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 7px;
  background: #f1f5f3;
  color: var(--serp-muted);
  font-size: .75rem;
}
.serp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #f1f5f3; }
.serp-bids { display: grid; gap: 5px; margin: auto 0 0; padding: 8px; list-style: none; background: #e7f5eb; color: #205840; font-size: .84rem; }
.serp-bids small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wbBidderSerpView :focus-visible { outline: 2px solid var(--serp-accent); outline-offset: -2px; }

@media (max-width: 1120px) {
  .serp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .serp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .serp-search { grid-template-columns: minmax(0, 1fr) auto; }
  .serp-search label { grid-column: 1 / -1; }
  .serp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .serp-info .ghost-btn { margin-left: 0; }
}
