/* Search is the only first step. Results introduce the next relevant action. */
body.search-first-pending .page-footer,
body.search-first-pending #legacyRobotSetup,
body.search-first-pending #notice,
body.search-first-pending #errorBanner { display:none!important; }

body.search-first-pending main { max-width:1200px; padding:0 24px; }

.companion-onboarding { display:flex; flex-direction:column; align-items:center; gap:24px; max-width:540px; margin:0 auto; padding:clamp(54px,17vh,144px) 0 40px; background:transparent; border:0; border-radius:0; box-shadow:none; overflow:visible; }
.companion-onboarding:has(.smart-search-results:not([hidden])) { padding-top:40px; }
.smart-search-button { display:inline-flex; align-items:center; justify-content:center; gap:11px; min-height:58px; padding:16px 26px; border-radius:12px; font-size:17px; font-weight:700; line-height:1.4; box-shadow:0 4px 12px #14776e17; }
.smart-search-button svg { width:21px; height:21px; flex:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; }
.smart-search-button:disabled { opacity:.75; cursor:wait; }
.smart-search-button[aria-busy=true] svg { animation:smart-search-pulse 1.3s ease-in-out infinite; }
.smart-search-results { width:100%; padding:22px; border:1px solid var(--line,#d7e1da); border-radius:14px; background:#fff; box-shadow:0 3px 14px #244b3505; font-size:14px; line-height:1.55; overflow-wrap:anywhere; }
.smart-search-results h2,.smart-search-results h3 { font-size:19px; margin:0 0 8px; }
.smart-search-results p { margin:0; }
.smart-search-results .robot-search-card { margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.smart-search-results .robot-search-card+.robot-search-card { margin-top:20px; padding-top:20px; border-top:1px solid var(--line,#d7e1da); }
.smart-search-results .robot-search-detail { margin:6px 0 0; color:var(--muted,#526960); font-size:13px; line-height:1.55; }
.smart-search-results .robot-search-row { display:block; padding:13px 0; border-top:1px solid #e8ede9; border-bottom:0; }
.smart-search-results .robot-search-detail+.robot-search-row { margin-top:16px; }
.smart-search-results .robot-search-option { display:grid; grid-template-columns:90px minmax(0,1fr); gap:5px 12px; align-items:start; max-width:none; }
.smart-search-results .robot-search-option>strong { color:var(--navy,#152d39); font-size:14px; font-weight:650; }
.smart-search-results .robot-search-option .robot-search-detail,.smart-search-results .robot-search-option .robot-search-address { grid-column:2; margin:0; }
.smart-search-results .robot-search-state { margin:0; padding:0; font-size:13px; line-height:1.5; color:var(--muted,#526960); background:none; border-radius:0; }
.smart-search-results .robot-search-state.available { color:#17654a; font-weight:650; }
.smart-search-results .robot-search-state.unreachable,.smart-search-results .robot-search-state.unavailable { color:#905034; }
.smart-search-results .robot-search-address { font-size:12px; color:var(--muted,#526960); line-height:1.5; }
.smart-search-results .robot-search-connect,.smart-search-results .button { display:inline-flex; align-items:center; justify-content:center; margin-top:16px; min-height:44px; padding:11px 17px; font-size:14px; line-height:1.4; text-decoration:none; border-radius:8px; }
.smart-search-results .robot-search-connect { display:flex; width:fit-content; margin:16px auto 0; }
.smart-search-results .companion-download { display:flex; width:fit-content; margin:16px auto 0; }
.robot-search-checklist { margin:14px 0 16px; padding-left:20px; color:var(--muted,#526960); font-size:13px; line-height:1.5; }
.robot-search-checklist li { padding-left:3px; margin:8px 0; }
.robot-search-checklist li::marker { color:var(--teal,#14776e); }
.robot-search-checklist strong { color:var(--navy,#152d39); font-weight:700; }
.robot-search-manual { border-top:1px solid var(--line,#d7e1da); }
.robot-search-manual>summary { padding:12px 0; color:var(--teal,#14776e); font-size:13px; font-weight:650; cursor:pointer; }
.robot-search-manual-hint { display:block; margin:0 0 10px; color:var(--muted,#526960); font-size:12px; }
.robot-search-manual-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:10px; }
.robot-search-manual-row>.field { display:grid; min-width:0; gap:5px; color:var(--navy,#152d39); font-size:12px; font-weight:650; }
.robot-search-manual-row input { width:100%; min-width:0; min-height:42px; box-sizing:border-box; padding:10px 12px; border:1px solid var(--line,#d7e1da); border-radius:8px; background:#fff; color:var(--navy,#152d39); font:inherit; font-size:14px; font-weight:400; }
.robot-search-manual-row input:focus-visible { outline:2px solid var(--teal,#14776e); outline-offset:2px; }
.smart-search-results .robot-search-manual-row>.button { margin:0; min-height:42px; padding:10px 14px; font-size:13px; }
.robot-search-manual>[role="status"]:empty { display:none; }
.robot-search-diagnostics { margin-top:10px; border-top:1px solid var(--line,#d7e1da); }
.robot-search-diagnostics>summary { padding:10px 0 0; color:var(--muted,#526960); font-size:12px; cursor:pointer; }
@media(max-width:460px) {
  .robot-search-manual-row { grid-template-columns:minmax(0,1fr); }
  .smart-search-results .robot-search-manual-row>.button { width:100%; }
}
.hosted-existing-bridge { width:100%; font-size:14px; }
.hosted-existing-bridge>summary { cursor:pointer; font-weight:650; color:var(--navy,#152d39); }
.hosted-existing-bridge .connections-panel { margin-top:16px; }
.hosted-existing-bridge .connection-layout { grid-template-columns:minmax(0,1fr); }
.smart-search-progress { display:flex; align-items:center; gap:10px; color:var(--muted,#526960); }
.smart-search-progress:before { content:""; width:14px; height:14px; flex:none; border:2px solid #d7e1da; border-top-color:var(--teal,#14776e); border-radius:50%; animation:smart-search-spin .8s linear infinite; }
@keyframes smart-search-spin { to { transform:rotate(360deg); } }
@keyframes smart-search-pulse { 50% { opacity:.45; } }
@media(prefers-reduced-motion:reduce) { .smart-search-button[aria-busy=true] svg,.smart-search-progress:before { animation:none; } }
@media(max-width:650px) {
  body.search-first-pending main { padding:0 18px; }
  .companion-onboarding { gap:20px; padding-top:70px; }
  .companion-onboarding:has(.smart-search-results:not([hidden])) { padding-top:28px; }
  .smart-search-button { max-width:100%; min-height:56px; padding:15px 21px; font-size:16px; }
  .smart-search-results { padding:18px; }
  .smart-search-results .robot-search-option { grid-template-columns:75px minmax(0,1fr); }
}
html:has(meta[name="tonypitastic-relay-token"]) #smartSearchButton:not([data-companion-ready="true"]) { display:none; }

.companion-readiness > a.button.primary { display:table; margin:0 auto; }
.companion-readiness { text-align:center; }
.companion-readiness > button,.companion-readiness > a.button.secondary { display:table; margin:10px auto 0; text-decoration:none; }

.companion-readiness { width:100%; max-width:480px; }
.companion-readiness-lead { margin:0 0 16px; font-size:14px; line-height:1.55; }
.companion-readiness > .button.primary { min-height:48px; padding:12px 24px; text-decoration:none; }
.companion-readiness > .button.primary[aria-disabled="true"] { opacity:.75; cursor:wait; }

.companion-runtime-detail { margin:5px 0 0; color:var(--muted,#526960); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
