/* Google Search preview. Shares tokens and layout with styles.css. */

.brand-mark.g { background: #1a73e8; }
.brand-mark.g::after { inset: 9px 8px; border: 0; border-top: 2.5px solid #fff; border-bottom: 2.5px solid #fff; border-radius: 0; }

.panel h2 { display: flex; justify-content: space-between; }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: row; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.rows .cell { position: relative; min-width: 0; }
.rows input {
  width: 100%; font-size: 13.5px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 44px 7px 9px; background: var(--surface);
}
.rows input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.rows .len { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); pointer-events: none; }
.rows .len.over { color: var(--crop); font-weight: 700; }
.rows select { font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 4px; background: var(--surface); }
.rows li.dup input { border-color: var(--warn); }

.add-btn { align-self: flex-start; border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 2px 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 7px 12px; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.hint { font-size: 12px; color: var(--muted); }

.g-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.lede { color: var(--muted); margin-bottom: 16px; max-width: 760px; }
.g-page .layout { grid-template-columns: 400px 1fr; }
.g-grid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.g-col-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.g-grid > section { min-width: 0; }
.g-stack { display: flex; flex-direction: column; gap: 14px; }
.g-all { margin-top: 28px; }

/* ---------- result cards (Google's own colours, not the app theme) ---------- */
.serp {
  --s-bg: #fff; --s-text: #202124; --s-sub: #4d5156; --s-link: #1a0dab; --s-url: #202124; --s-line: #dadce0; --s-chip: #f1f3f4;
  background: var(--s-bg); color: var(--s-text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  font-family: arial, Roboto, sans-serif;
}
.serp.dark { --s-bg: #1f1f1f; --s-text: #e8eaed; --s-sub: #bdc1c6; --s-link: #99c3ff; --s-url: #dadce0; --s-line: #3c4043; --s-chip: #303134; }
.serp .combo { font: 600 11px/1 system-ui, sans-serif; color: var(--muted); padding: 8px 12px 0; display: flex; justify-content: space-between; }
.serp .combo span { color: var(--s-sub); }

.ad { padding: 12px 16px 14px; }
.ad .sponsored { font-weight: 700; font-size: 14px; color: var(--s-text); margin-bottom: 8px; }
.ad .who { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ad .fav {
  width: 26px; height: 26px; border-radius: 50%; background: var(--s-chip); border: 1px solid var(--s-line);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--s-sub); flex: none;
}
.ad .biz { font-size: 14px; color: var(--s-text); line-height: 1.25; }
.ad .durl { font-size: 12px; color: var(--s-sub); line-height: 1.3; overflow-wrap: anywhere; }
.ad .hl {
  color: var(--s-link); font-size: 20px; line-height: 1.3; margin: 2px 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ad .desc {
  color: var(--s-sub); font-size: 14px; line-height: 1.58;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ad .callouts { color: var(--s-sub); font-size: 14px; line-height: 1.5; margin-top: 2px; }
.ad .sitelinks { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.ad .sitelinks span {
  white-space: nowrap; border: 1px solid var(--s-line); border-radius: 999px; padding: 6px 12px; color: var(--s-link); font-size: 14px;
}
.ad .call { margin-top: 10px; border-top: 1px solid var(--s-line); padding-top: 10px; color: var(--s-link); font-size: 14px; display: flex; gap: 8px; align-items: center; }

.serp.mobile { max-width: 400px; }
.serp.mobile .ad .hl { font-size: 18px; }

.serp.desktop .ad { max-width: 652px; }
.serp.desktop .ad .hl { font-size: 20px; -webkit-line-clamp: 1; }
.serp.desktop .ad .desc { -webkit-line-clamp: 2; }
.serp.desktop .ad .sitelinks { flex-wrap: wrap; gap: 4px 22px; }
.serp.desktop .ad .sitelinks span { border: 0; padding: 0; border-radius: 0; }

/* ---------- pin table ---------- */
.pin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pin-table th, .pin-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.pin-table th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.pin-table td:first-child { width: 110px; font-weight: 600; }
.pin-table .pill { display: inline-block; background: var(--surface-2); border-radius: 999px; padding: 2px 9px; margin: 2px 4px 2px 0; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow);
}

@media (max-width: 1100px) { .g-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .g-page .layout { grid-template-columns: 1fr; }
  .g-page .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .g-page .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
}
