/* ReviewBird Tools — Sentiment Analysis Tool */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ── Brand tokens ─────────────────────────────────────────────── */
#rb-sentiment-analysis,
#rb-sentiment-analysis .rb-sa-wrapper {
  --rb-deep-purple:   #3B0078;
  --rb-bright-purple: #6115BF;
  --rb-turquoise:     #09B8BD;
  --rb-lime:          #7EDA3B;
  --rb-negative:      #CC3366;
  --rb-neutral:       #E8EBF0;
  --rb-bg:            #F6F7F9;
  --rb-card-bg:       #ffffff;
  --rb-text:          #1A1A2E;
  --rb-text-muted:    #6B7280;
  --rb-border:        #E5E7EB;
  --rb-gradient:      linear-gradient(91deg, var(--rb-deep-purple), var(--rb-turquoise));
  --rb-shadow-sm:     0 2px 8px rgba(59,0,120,.08), 0 1px 3px rgba(0,0,0,.06);
  --rb-shadow-md:     0 8px 24px rgba(59,0,120,.12), 0 2px 8px rgba(0,0,0,.08);
  --rb-shadow-lg:     0 20px 48px rgba(59,0,120,.18), 0 8px 16px rgba(0,0,0,.10);
  --rb-radius-sm:     12px;
  --rb-radius-md:     24px;
  --rb-radius-lg:     24px;
  --rb-radius-xl:     32px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--rb-text);
}

/* ── Reset isolation ──────────────────────────────────────────── */
:where(#rb-sentiment-analysis) *,
:where(#rb-sentiment-analysis) *::before,
:where(#rb-sentiment-analysis) *::after { box-sizing: border-box; }

:where(#rb-sentiment-analysis) h1,:where(#rb-sentiment-analysis) h2,
:where(#rb-sentiment-analysis) h3,:where(#rb-sentiment-analysis) h4 {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-weight: 700; line-height: 1.2; margin: 0; padding: 0;
  color: var(--rb-text); background: none; border: none;
  letter-spacing: normal; text-transform: none;
}
:where(#rb-sentiment-analysis) p { margin: 0; padding: 0; font-family: 'Poppins', -apple-system, sans-serif; }
:where(#rb-sentiment-analysis) ul, :where(#rb-sentiment-analysis) ol { list-style: none; margin: 0; padding: 0; }
:where(#rb-sentiment-analysis) li { margin: 0; padding: 0; background: transparent; border: 0; }
:where(#rb-sentiment-analysis) li::before,:where(#rb-sentiment-analysis) li::after { content: none; }
/* text-decoration: none !important beats theme .page-content a rule without raising
   specificity for color/background, so component-level selectors still override. */
:where(#rb-sentiment-analysis) a { color: inherit; text-decoration: none !important; background: transparent; }
:where(#rb-sentiment-analysis) svg { display: block; overflow: visible; }

/* ── Wrapper & layout ─────────────────────────────────────────── */
.rb-sa-wrapper {
  position: relative; overflow: clip;
  background: var(--rb-bg);
  border-radius: var(--rb-radius-xl);
  padding: 28px 18px 40px;
  margin: 32px 0;
}
@media (min-width: 641px) { .rb-sa-wrapper { padding: 48px 40px 64px; } }

/* ── Orbs ─────────────────────────────────────────────────────── */
.rb-sa-wrapper .rb-orb { position: absolute; border-radius: 50%; pointer-events: none; opacity: .35; filter: blur(72px); z-index: 0; }
.rb-sa-wrapper .rb-orb-1 { width: 500px; height: 500px; top: -180px; left: -140px; background: radial-gradient(circle, var(--rb-bright-purple) 0%, transparent 70%); }
.rb-sa-wrapper .rb-orb-2 { width: 400px; height: 400px; bottom: -160px; right: -100px; background: radial-gradient(circle, var(--rb-turquoise) 0%, transparent 70%); }

/* ── Card base ────────────────────────────────────────────────── */
.rb-sa-wrapper .rb-card {
  position: relative; z-index: 1;
  background: var(--rb-card-bg);
  border-radius: var(--rb-radius-md);
  box-shadow: var(--rb-shadow-md);
  padding: 20px 18px; margin-bottom: 20px;
}
@media (min-width: 641px) { .rb-sa-wrapper .rb-card { padding: 28px 32px; } }

/* ── Utilities ────────────────────────────────────────────────── */
.rb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.rb-subheadline { font-size: 16px; line-height: 1.6; color: var(--rb-text-muted); margin: 0 0 20px; max-width: 680px; }
.rb-trust-bar { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 24px; font-size: 13px; font-weight: 500; color: var(--rb-turquoise); }
.rb-field-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--rb-text); margin: 0 0 8px; }
.rb-card-heading { position: relative; z-index: 1; font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--rb-deep-purple); margin: 0 0 10px; }
@media (min-width: 641px) { .rb-card-heading { font-size: 28px; } }

/* Step badge */
.rb-step-badge { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--rb-text-muted); background: #EBEBF0; border-radius: 20px; padding: 5px 12px; margin-bottom: 16px; }
.rb-step-dot { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; flex-shrink: 0; }
.rb-step-badge-done { color: #16A34A; background: rgba(34,197,94,.12); }
.rb-step-badge-done svg { background: #22C55E; border-radius: 50%; padding: 2px; color: #fff; width: 16px; height: 16px; flex-shrink: 0; }

/* Section label */
.rb-section-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--rb-text-muted); margin-bottom: 14px; }

/* ── Search input ─────────────────────────────────────────────── */
.rb-combobox-wrapper { position: relative; }
.rb-input-row { display: flex; align-items: center; gap: 12px; border: 2px solid var(--rb-border); border-radius: var(--rb-radius-lg); padding: 14px 18px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.rb-input-row:focus-within { border-color: var(--rb-turquoise); box-shadow: 0 0 0 4px rgba(9,184,189,.14); }
.rb-input-icon { color: var(--rb-text-muted); flex-shrink: 0; }
.rb-search-input { flex: 1; border: none; background: transparent; font-family: inherit; font-size: 16px; font-weight: 500; color: var(--rb-text); outline: none; }
.rb-search-input::placeholder { color: var(--rb-text-muted); font-weight: 400; }
.rb-spinner { display: none; width: 18px; height: 18px; border: 2px solid var(--rb-border); border-top-color: var(--rb-bright-purple); border-radius: 50%; animation: rb-spin .7s linear infinite; flex-shrink: 0; }
@keyframes rb-spin { to { transform: rotate(360deg); } }
.rb-clear-btn { background: none; border: none; cursor: pointer; color: var(--rb-text-muted); padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; transition: background .15s, color .15s; }
.rb-clear-btn:hover { background: rgba(0,0,0,.08); color: var(--rb-text); }

/* ── Autocomplete dropdown ────────────────────────────────────── */
.rb-suggestions-list { list-style: none; margin: 6px 0 0; padding: 6px; background: var(--rb-card-bg); border: 1px solid var(--rb-border); border-radius: var(--rb-radius-sm); box-shadow: var(--rb-shadow-lg); position: relative; z-index: 100; }
.rb-suggestion-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-left: 3px solid transparent; cursor: pointer; transition: background .15s; }
.rb-suggestion-item:hover, .rb-suggestion-item.rb-suggestion-active { background: linear-gradient(90deg, rgba(97,21,191,.08), rgba(9,184,189,.04)); }
.rb-suggestion-item.rb-suggestion-active .rb-suggestion-name { color: var(--rb-bright-purple); }
.rb-suggestion-pin { color: var(--rb-text-muted); flex-shrink: 0; }
.rb-suggestion-item-main { flex: 1; min-width: 0; }
.rb-suggestion-name { font-size: 14px; font-weight: 600; color: var(--rb-text); }
.rb-suggestion-name strong { color: var(--rb-bright-purple); }
.rb-suggestion-address { font-size: 12px; color: var(--rb-text-muted); margin-top: 2px; }
.rb-suggestion-rating { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--rb-lime); white-space: nowrap; flex-shrink: 0; }
.rb-review-count { font-weight: 400; color: var(--rb-text-muted); }
.rb-powered-by { margin: 6px 0 0; text-align: right; }
.rb-powered-by-label { font-size: 11px; color: var(--rb-text-muted); }
.rb-google-wordmark { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }

/* ── Daily counter (absolute top-right of the hero wrapper) ────── */
.rb-sa-counter-row { position: absolute; top: 14px; right: 16px; z-index: 2; font-size: 12px; color: var(--rb-text-muted); background: rgba(255,255,255,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 20px; padding: 3px 10px; min-height: 18px; line-height: 1.6; }
@media (min-width: 641px) { .rb-sa-counter-row { top: 20px; right: 24px; } }
.rb-sa-counter-urgent { color: var(--rb-negative); font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────────────── */
.rb-btn { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 10px; padding: 11px 20px; min-height: 44px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .12s, box-shadow .12s; text-decoration: none; white-space: nowrap; }
@media (hover: hover) { .rb-btn:hover { transform: translateY(-1px); } }
.rb-btn:active { transform: translateY(0); }
.rb-btn-copy { background: var(--rb-lime); color: #fff; box-shadow: 0 3px 10px rgba(126,218,59,.3); padding: 12px 22px; }
.rb-btn-ternary { background: #fff; color: var(--rb-text-muted); border: 1.5px solid var(--rb-text-muted); }
.rb-btn-ternary:hover { background: rgba(9,184,189,.06); }
.rb-btn-outline { background: #fff; color: var(--rb-bright-purple); border: 2px solid var(--rb-bright-purple); }
.rb-btn-outline:hover { background: rgba(97,21,191,.05); }
.rb-btn-upsell { background: #fff; color: var(--rb-deep-purple); box-shadow: 0 4px 16px rgba(0,0,0,.15); padding: 13px 26px; font-size: 15px; }
.rb-btn-upsell:hover { box-shadow: 0 8px 24px rgba(0,0,0,.22); }

/* Business card inside profile card */
.rb-sa-profile-card { background: linear-gradient(135deg, rgba(59,0,120,.04) 0%, rgba(9,184,189,.04) 100%); border: 1.5px solid rgba(97,21,191,.1); }
.rb-sa-profile-inner { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.rb-business-avatar { width: 44px; height: 44px; background: linear-gradient(135deg, var(--rb-deep-purple), var(--rb-bright-purple)); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; font-weight: 700; color: #fff; }
.rb-business-avatar.rb-avatar--has-favicon { background: #fff; }
.rb-avatar-favicon { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; display: block; }
.rb-business-name { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--rb-text); }
.rb-business-address { font-size: 13px; color: var(--rb-text-muted); margin-top: 3px; }
.rb-business-rating { display: flex; align-items: center; gap: 4px; font-size: 13px; margin-top: 5px; }
.rb-rating-star { color: var(--rb-lime); }
.rb-rating-value { color: var(--rb-lime); font-weight: 600; }
.rb-rating-count { color: var(--rb-text-muted); font-weight: 400; }

.rb-sa-analyze-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Loading state ────────────────────────────────────────────── */
.rb-sa-loading { position: relative; z-index: 1; text-align: center; padding: 40px 20px; }
.rb-sa-loading-bird { display: flex; justify-content: center; margin-bottom: 32px; }
.rb-sa-bird-pulse {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--rb-gradient);
  animation: rb-sa-pulse 1.4s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
}
.rb-sa-bird-pulse #rb-sa-lottie { width: 80px; height: 80px; display: block; border-radius: 50%; overflow: hidden; }
@keyframes rb-sa-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(97,21,191,.4); } 50% { transform: scale(1.10); box-shadow: 0 0 0 14px rgba(97,21,191,.0); } }

.rb-sa-steps-list { display: inline-flex; flex-direction: column; gap: 12px; text-align: left; margin-bottom: 24px; }
.rb-sa-step { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--rb-text-muted); transition: color .3s; }
.rb-sa-step.rb-sa-step--active { color: var(--rb-bright-purple); }
.rb-sa-step.rb-sa-step--done { color: #16A34A; }
.rb-sa-step-icon { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rb-border); flex-shrink: 0; transition: all .3s; }
.rb-sa-step--active .rb-sa-step-icon { border-color: var(--rb-bright-purple); border-top-color: transparent; animation: rb-spin .7s linear infinite; }
.rb-sa-step--done   .rb-sa-step-icon { border: none; background: #22C55E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat; }
.rb-sa-icon-pending { border-color: #22C55E; background: rgba(34,197,94,.1); }

.rb-sa-tip { font-size: 13px; color: var(--rb-text-muted); font-style: italic; max-width: 480px; margin: 0 auto; transition: opacity 0.3s ease; }

/* ── Results layout ───────────────────────────────────────────── */
.rb-sa-results { position: relative; }
.rb-sa-results-main { position: relative; z-index: 1; }

/* Sticky side-nav (desktop) */
.rb-sa-sidenav { display: none; }
@media (min-width: 900px) {
  .rb-sa-results { display: grid; grid-template-columns: 160px 1fr; gap: 0 24px; }
  .rb-sa-sidenav { display: block; }
  .rb-sa-sidenav > ul { display: flex; flex-direction: column; gap: 4px; }
  .rb-sa-sidenav a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--rb-text-muted); transition: all .15s; text-decoration: none; }
  .rb-sa-sidenav a:hover,
  .rb-sa-sidenav a.rb-sa-nav-active { background: rgba(97,21,191,.08); color: var(--rb-bright-purple); font-weight: 600; }
}

/* Result cards: left accent bar */
.rb-sa-result-card { overflow: hidden; }
.rb-sa-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  /*background: var(--rb-turquoise);*/
}

/* Meta row (below profile recap) */
.rb-sa-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rb-sa-meta-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: rgba(97,21,191,.08); color: var(--rb-bright-purple); font-size: 12px; font-weight: 600; border-radius: 20px; }
.rb-sa-tendency-badge { padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 20px; background: rgba(9,184,189,.1); color: var(--rb-turquoise); }
.rb-sa-tendency-badge.rb-sa-tend-improving { background: rgba(34,197,94,.1); color: #16A34A; }
.rb-sa-tendency-badge.rb-sa-tend-declining { background: rgba(204,51,102,.1); color: var(--rb-negative); }
.rb-sa-cache-badge { padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 20px; background: rgba(9,184,189,.1); color: var(--rb-turquoise); }

/* AI summary */
.rb-sa-summary-text { font-size: 15px; line-height: 1.7; color: var(--rb-text); margin-bottom: 16px; }
.rb-sa-recommendations { display: flex; flex-direction: column; gap: 8px; }
.rb-sa-rec-item { display: flex; gap: 10px; align-items: flex-start; background: rgba(97,21,191,.04); border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.6; color: var(--rb-text); }
.rb-sa-rec-icon { color: var(--rb-turquoise); font-weight: 700; flex-shrink: 0; }

/* Donut chart */
.rb-sa-donut-wrap { display: flex; flex-direction: column; gap: 20px; align-items: center; }
@media (min-width: 500px) { .rb-sa-donut-wrap { flex-direction: row; } }
.rb-sa-donut-chart { width: 160px; height: 160px; flex-shrink: 0; }
.rb-sa-donut-legend { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rb-sa-legend-item { display: flex; align-items: center; gap: 10px; }
.rb-sa-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.rb-sa-legend-label { font-size: 14px; font-weight: 500; }
.rb-sa-legend-pct { font-size: 18px; font-weight: 700; margin-left: auto; }

/* Topic bars */
.rb-sa-topics { display: flex; flex-direction: column; gap: 12px; }
.rb-sa-topic { display: grid; grid-template-columns: 1fr 2fr 48px; align-items: center; gap: 10px; }
@media (max-width: 500px) { .rb-sa-topic { grid-template-columns: 1fr; gap: 4px; } }
.rb-sa-topic-name { font-size: 13px; font-weight: 600; color: var(--rb-text); }
.rb-sa-topic-bar-wrap { height: 12px; border-radius: 6px; overflow: hidden; display: flex; background: var(--rb-neutral); }
.rb-sa-topic-pos { background: var(--rb-lime); height: 100%; transition: width .4s ease; }
.rb-sa-topic-neg { background: var(--rb-negative); height: 100%; transition: width .4s ease; }
.rb-sa-topic-pct { font-size: 12px; font-weight: 600; color: var(--rb-text-muted); text-align: right; white-space: nowrap; }

/* Quote cards */
.rb-sa-quotes-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .rb-sa-quotes-grid { grid-template-columns: 1fr 1fr; } }
.rb-sa-quotes-col { display: flex; flex-direction: column; gap: 10px; }
.rb-sa-quote-card { background: var(--rb-bg); border-radius: 10px; padding: 14px 16px; position: relative; }
.rb-sa-quote-card.rb-sa-quote-neg { border-left: 3px solid var(--rb-negative); margin-bottom: 10px; }
.rb-sa-quote-card.rb-sa-quote-pos { border-left: 3px solid var(--rb-lime); margin-bottom: 10px; }
.rb-sa-quote-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rb-sa-quote-issue { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--rb-text-muted); }
.rb-sa-quote-stars { font-size: 12px; }
.rb-sa-quote-text { font-size: 13px; line-height: 1.6; color: var(--rb-text); font-style: italic; }
.rb-sa-quote-text::before { content: '"'; }
.rb-sa-quote-text::after  { content: '"'; }

/* Trend chart */
.rb-sa-trend-wrap { position: relative; }
.rb-sa-trend-wrap canvas { max-height: 200px; }

/* CTA card — high specificity to beat .rb-sa-wrapper .rb-card (0-2-0) */
#rb-sentiment-analysis .rb-sa-cta-card {
  background: linear-gradient(90deg, var(--rb-bright-purple) 60%, var(--rb-turquoise) 90%);
  color: #fff;
  overflow: hidden;
}
#rb-sentiment-analysis .rb-sa-cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.rb-sa-cta-inner { position: relative; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.rb-sa-cta-text { flex: 1; min-width: 220px; }
.rb-upsell-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; background: rgba(255,255,255,.15); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--rb-lime); margin-bottom: 10px; }
/* Lock headline + sub colour against theme h2/p rules */
#rb-sentiment-analysis .rb-sa-cta-headline { font-size: 20px; font-weight: 700; line-height: 1.3; color: #fff !important; margin-bottom: 8px; background: none; }
#rb-sentiment-analysis .rb-sa-cta-sub     { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.85); }
/* Green CTA button — flex-shrink so it never wraps onto its own line alone */
#rb-sentiment-analysis .rb-sa-cta-card .rb-btn-copy { flex-shrink: 0; box-shadow: 0 4px 16px rgba(0,0,0,.2); font-size: 15px; padding: 13px 28px; }

/* Restart button row */
.rb-sa-restart-row { text-align: center; padding-top: 8px; margin-bottom: 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rb-sa-pdf-btn { display: inline-flex; align-items: center; gap: 6px; }

/* Floating nav trigger (mobile) — hidden by default, shown only on mobile */
#rb-sentiment-analysis .rb-sa-nav-trigger {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px; height: 48px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--rb-bright-purple);
  color: #fff;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--rb-shadow-md);
  z-index: 500;
  flex-shrink: 0;
}
@media (max-width: 899px) {
  #rb-sentiment-analysis .rb-sa-results:not([hidden]) .rb-sa-nav-trigger { display: flex; }
}
.rb-sa-sidenav.rb-sa-nav-open {
  display: block;
  position: fixed;
  bottom: 80px;
  right: 24px;
  background: #fff;
  border-radius: var(--rb-radius-md);
  box-shadow: var(--rb-shadow-lg);
  padding: 12px 8px;
  z-index: 499;
  min-width: 180px;
}
.rb-sa-sidenav.rb-sa-nav-open > ul { display: flex; flex-direction: column; gap: 2px; }
.rb-sa-sidenav.rb-sa-nav-open a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--rb-text); }
.rb-sa-sidenav.rb-sa-nav-open a:hover { background: rgba(97,21,191,.08); color: var(--rb-bright-purple); }

/* ── Toast ────────────────────────────────────────────────────── */
.rb-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(16px); background: var(--rb-text); color: #fff; padding: 10px 22px; border-radius: 100px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 9999; white-space: nowrap; }
.rb-toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── High-specificity overrides (ID = 1-0-0 base) ────────────── */
#rb-sentiment-analysis .rb-btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 20px; min-height: 44px; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; border-radius: 10px; white-space: nowrap; cursor: pointer; text-decoration: none; border: none; transition: transform .12s, box-shadow .12s; -webkit-user-select: none; user-select: none; width: auto; }
#rb-sentiment-analysis .rb-sa-analyze-btn { font-size: 18px; }
#rb-sentiment-analysis .rb-btn-copy     { background: var(--rb-lime);          color: #fff;                    border: none; }
#rb-sentiment-analysis .rb-btn-outline  { background: #fff;                    color: var(--rb-bright-purple); border: 2px solid var(--rb-bright-purple); }
#rb-sentiment-analysis .rb-btn-ternary  { background: #fff;                    color: var(--rb-text-muted);    border: 1.5px solid var(--rb-text-muted); }
#rb-sentiment-analysis .rb-btn-upsell   { background: #fff;                    color: var(--rb-deep-purple);   border: none; }
#rb-sentiment-analysis .rb-btn-copy:hover    { background: var(--rb-lime);         color: #fff; }
#rb-sentiment-analysis .rb-btn-outline:hover { background: var(--rb-bright-purple); color: #fff; border-color: var(--rb-bright-purple); }
#rb-sentiment-analysis .rb-btn-ternary:hover { background: var(--rb-text-muted);   color: #fff; }
#rb-sentiment-analysis .rb-btn-upsell:hover  { background: #f5f5f8;                color: var(--rb-deep-purple); }
#rb-sentiment-analysis input.rb-search-input { border: none; width: auto; padding: 0; background: transparent; box-shadow: none; border-radius: 0; outline: none; }
#rb-sentiment-analysis input.rb-search-input:focus { border: none; outline: none; box-shadow: none; }
#rb-sentiment-analysis a { color: inherit; text-decoration: none; }
#rb-sentiment-analysis a:hover, #rb-sentiment-analysis a:visited { text-decoration: none; }
/* Sidenav link colors — beat generic (1,0,1) rule above so active/hover highlight shows */
#rb-sentiment-analysis .rb-sa-sidenav a { color: var(--rb-text-muted); }
#rb-sentiment-analysis .rb-sa-sidenav a:hover,
#rb-sentiment-analysis .rb-sa-sidenav a.rb-sa-nav-active { color: var(--rb-bright-purple); }
#rb-sentiment-analysis .rb-sa-sidenav.rb-sa-nav-open a { color: var(--rb-text); }
#rb-sentiment-analysis .rb-sa-sidenav.rb-sa-nav-open a:hover { color: var(--rb-bright-purple); }
#rb-sentiment-analysis *:focus-visible { outline: 3px solid var(--rb-bright-purple); outline-offset: 2px; }
#rb-sentiment-analysis input.rb-search-input:focus-visible { outline: none; }
#rb-sentiment-analysis .rb-clear-btn { background: none; border: none; cursor: pointer; color: var(--rb-text-muted); padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: none; width: auto; }
#rb-sentiment-analysis .rb-clear-btn:hover { background: rgba(0,0,0,.08); color: var(--rb-text); border: none; box-shadow: none; }

/* ── Mobile responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .rb-sa-analyze-row { flex-direction: column; }
  .rb-sa-analyze-row .rb-btn { width: 100%; justify-content: center; }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rb-sa-bird-pulse, .rb-spinner, .rb-sa-step--active .rb-sa-step-icon { animation: none; }
  .rb-btn:hover, .rb-btn:active { transform: none; }
  .rb-sa-topic-pos, .rb-sa-topic-neg { transition: none; }
}

/* ── Print / Save as PDF ──────────────────────────────────────── */
@media print {
  /* Preserve brand colors in print output */
  #rb-sentiment-analysis { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Hide everything except the results content */
  #rb-sentiment-analysis .rb-sa-search-card,
  #rb-sentiment-analysis .rb-sa-profile-card,
  #rb-sentiment-analysis .rb-sa-loading,
  #rb-sentiment-analysis .rb-sa-sidenav,
  #rb-sentiment-analysis .rb-sa-nav-trigger,
  #rb-sentiment-analysis .rb-sa-restart-row,
  #rb-sentiment-analysis .rb-sa-cta-card,
  #rb-sentiment-analysis .rb-toast { display: none !important; }

  /* Collapse grid → single column, remove background orbs */
  #rb-sentiment-analysis .rb-sa-results { display: block !important; }
  #rb-sentiment-analysis .rb-sa-results-main { margin-top: 0; }
  #rb-sentiment-analysis .rb-sa-wrapper { padding: 0; background: none; }
  #rb-sentiment-analysis .rb-orb { display: none; }

  /* Cards: no shadows, keep border, avoid mid-card page breaks */
  #rb-sentiment-analysis .rb-card {
    box-shadow: none !important;
    border: 1px solid #e5e7eb;
    break-inside: avoid;
    margin-bottom: 16pt;
  }

  /* Trend/donut canvas: constrain to page width */
  #rb-sentiment-analysis canvas { max-width: 100%; height: auto !important; }
}