/* BudunOS right rail variants
 * Body: bos-rightbar-v-{id}
 * Column: .bos-rightbar.bos-rightbar--{id}
 */

.bos-rightbar {
  --rb-gap: 14px;
}

/* Shared card hook inside rightbar */
.bos-rightbar > .theiaStickySidebar > .card,
.bos-rightbar > .card {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* ---------- Unified dock — one continuous column ---------- */
/* Shell lives on sticky inner (Theia) so padding/radius don't collapse */
body.bos-rightbar-v-dock .bos-rightbar {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.bos-rightbar-v-dock .bos-rightbar > .theiaStickySidebar,
body.bos-rightbar-v-dock .bos-rightbar:not(:has(> .theiaStickySidebar)) {
  padding: 6px 8px 8px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e9ebef;
  box-shadow: 0 14px 40px -28px rgba(20, 24, 32, 0.16);
  overflow: hidden;
}

body.night-mode.bos-rightbar-v-dock .bos-rightbar > .theiaStickySidebar,
body.night-mode.bos-rightbar-v-dock .bos-rightbar:not(:has(> .theiaStickySidebar)),
html[data-bs-theme="dark"].bos-rightbar-v-dock .bos-rightbar > .theiaStickySidebar,
html[data-bs-theme="dark"].bos-rightbar-v-dock .bos-rightbar:not(:has(> .theiaStickySidebar)) {
  background: var(--card-dark-color, #262d34);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Flatten every widget card into one rail */
body.bos-rightbar-v-dock .bos-rightbar .card,
body.bos-rightbar-v-dock .bos-rightbar .bos-mini-footer,
body.bos-rightbar-v-dock .bos-rightbar .bos-mini-footer-bar {
  margin: 0 !important;
  margin-bottom: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.bos-rightbar-v-dock .bos-rightbar .bos-mini-footer-bar {
  padding: 10px 6px 4px !important;
}

body.bos-rightbar-v-dock .bos-rightbar .card .card-header,
body.bos-rightbar-v-dock .bos-rightbar .card .card-body {
  background: transparent !important;
  border: 0 !important;
}

body.bos-rightbar-v-dock .bos-rightbar .card .card-header {
  padding: 12px 8px 2px !important;
}

body.bos-rightbar-v-dock .bos-rightbar .card .card-body {
  padding: 4px 8px 12px !important;
}

/* Soft section rules between dock sections */
body.bos-rightbar-v-dock .bos-rightbar > .theiaStickySidebar > * + *,
body.bos-rightbar-v-dock .bos-rightbar:not(:has(> .theiaStickySidebar)) > * + * {
  border-top: 1px solid #eef0f3;
}

body.night-mode.bos-rightbar-v-dock .bos-rightbar > .theiaStickySidebar > * + *,
body.night-mode.bos-rightbar-v-dock .bos-rightbar:not(:has(> .theiaStickySidebar)) > * + *,
html[data-bs-theme="dark"].bos-rightbar-v-dock .bos-rightbar > .theiaStickySidebar > * + *,
html[data-bs-theme="dark"].bos-rightbar-v-dock .bos-rightbar:not(:has(> .theiaStickySidebar)) > * + * {
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* Merits banner — inset pill, not a floating card */
body.bos-rightbar-v-dock .bos-rightbar .card.bos-merits-banner {
  margin: 8px 4px !important;
  border-radius: 14px !important;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--link-color) 12%, #fff) 0%,
      #f7f8fa 70%
    ) !important;
  border: 1px solid color-mix(in srgb, var(--link-color) 14%, #e9ebef) !important;
}

body.night-mode.bos-rightbar-v-dock .bos-rightbar .card.bos-merits-banner,
html[data-bs-theme="dark"].bos-rightbar-v-dock .bos-rightbar .card.bos-merits-banner {
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--link-color) 22%, #1a2229) 0%,
      #1e252b 70%
    ) !important;
  border-color: color-mix(in srgb, var(--link-color) 22%, transparent) !important;
}

body.bos-rightbar-v-dock .bos-rightbar .card.bos-merits-banner .card-body {
  padding: 12px !important;
}

/* Promoted / colored blocks stay inset chips inside the dock */
body.bos-rightbar-v-dock .bos-rightbar .card.bg-indigo,
body.bos-rightbar-v-dock .bos-rightbar .card.bg-teal {
  margin: 8px 4px !important;
  border-radius: 14px !important;
  overflow: hidden;
  background-image: none !important;
}

body.bos-rightbar-v-dock .bos-rightbar .card.bg-indigo {
  background: #5e72e4 !important;
}

body.bos-rightbar-v-dock .bos-rightbar .card.bg-teal {
  background: #2dce89 !important;
}

body.bos-rightbar-v-dock .bos-rightbar .card.bg-indigo .card-header,
body.bos-rightbar-v-dock .bos-rightbar .card.bg-teal .card-header,
body.bos-rightbar-v-dock .bos-rightbar .card.bg-indigo .card-body,
body.bos-rightbar-v-dock .bos-rightbar .card.bg-teal .card-body {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* Invitation CTA — calm inset, no orphan card chrome */
body.bos-rightbar-v-dock .bos-rightbar .card:has(.btn-primary) .card-body {
  padding: 16px 8px !important;
}

/* ---------- Frost stack ---------- */
body.bos-rightbar-v-glass .bos-rightbar .card.bos-merits-side,
body.bos-rightbar-v-glass .bos-rightbar .card.bos-merits-banner,
body.bos-rightbar-v-glass .bos-rightbar .card.bos-trending,
body.bos-rightbar-v-glass .bos-rightbar .card.bos-people {
  background: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

body.night-mode.bos-rightbar-v-glass .bos-rightbar .card.bos-merits-side,
body.night-mode.bos-rightbar-v-glass .bos-rightbar .card.bos-merits-banner,
body.night-mode.bos-rightbar-v-glass .bos-rightbar .card.bos-trending,
body.night-mode.bos-rightbar-v-glass .bos-rightbar .card.bos-people,
html[data-bs-theme="dark"].bos-rightbar-v-glass .bos-rightbar .card.bos-merits-side,
html[data-bs-theme="dark"].bos-rightbar-v-glass .bos-rightbar .card.bos-merits-banner,
html[data-bs-theme="dark"].bos-rightbar-v-glass .bos-rightbar .card.bos-trending,
html[data-bs-theme="dark"].bos-rightbar-v-glass .bos-rightbar .card.bos-people {
  background: rgba(30, 37, 43, 0.52) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3) !important;
}

body.bos-rightbar-v-glass .bos-rightbar .bos-mini-footer {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  padding: 8px;
  backdrop-filter: blur(12px);
}

/* ---------- Night ledger ---------- */
body.bos-rightbar-v-ink .bos-rightbar .card.bos-merits-side,
body.bos-rightbar-v-ink .bos-rightbar .card.bos-trending,
body.bos-rightbar-v-ink .bos-rightbar .card.bos-people {
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--link-color) 16%, transparent), transparent 55%),
    #0f1419 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e8eaed !important;
  box-shadow: 0 18px 48px -28px rgba(0, 0, 0, 0.65) !important;
}

body.bos-rightbar-v-ink .bos-rightbar .card.bos-merits-side .card-header,
body.bos-rightbar-v-ink .bos-rightbar .card.bos-trending .card-header,
body.bos-rightbar-v-ink .bos-rightbar .card.bos-people .card-header,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-side .card-header strong,
body.bos-rightbar-v-ink .bos-rightbar .bos-trending-head strong,
body.bos-rightbar-v-ink .bos-rightbar .bos-people-head strong,
body.bos-rightbar-v-ink .bos-rightbar .bos-trend-hash,
body.bos-rightbar-v-ink .bos-rightbar .bos-person-name {
  color: #f0f3f6 !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-trend-freq,
body.bos-rightbar-v-ink .bos-rightbar .bos-person-meta small,
body.bos-rightbar-v-ink .bos-rightbar .bos-people-head a,
body.bos-rightbar-v-ink .bos-rightbar .bos-merit-item span {
  color: #8b949e !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-trend-rank {
  background: color-mix(in srgb, var(--link-color) 28%, #0f1419) !important;
  color: #fff !important;
}

body.bos-rightbar-v-ink .bos-rightbar .card.bos-merits-banner {
  background: linear-gradient(135deg, color-mix(in srgb, var(--link-color) 45%, #0f1419), #161b22) !important;
  border: 1px solid color-mix(in srgb, var(--link-color) 35%, transparent) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 16px 40px rgba(0, 0, 0, 0.35) !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-kicker,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-label,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-num {
  color: #fff !important;
}

/* Icons — force bright strokes on dark panels */
body.bos-rightbar-v-ink .bos-rightbar .main-icon,
body.bos-rightbar-v-ink .bos-rightbar .bos-sb-ico,
body.bos-rightbar-v-ink .bos-rightbar .svg-container {
  color: #fff !important;
}

body.bos-rightbar-v-ink .bos-rightbar .main-icon svg,
body.bos-rightbar-v-ink .bos-rightbar .bos-sb-ico svg,
body.bos-rightbar-v-ink .bos-rightbar .svg-container svg,
body.bos-rightbar-v-ink .bos-rightbar .main-icon svg *,
body.bos-rightbar-v-ink .bos-rightbar .bos-sb-ico svg path,
body.bos-rightbar-v-ink .bos-rightbar .bos-sb-ico svg circle,
body.bos-rightbar-v-ink .bos-rightbar .bos-sb-ico svg rect,
body.bos-rightbar-v-ink .bos-rightbar .bos-sb-ico svg line,
body.bos-rightbar-v-ink .bos-rightbar .bos-sb-ico svg polyline,
body.bos-rightbar-v-ink .bos-rightbar .bos-sb-ico svg polygon,
body.bos-rightbar-v-ink .bos-rightbar .svg-container svg path,
body.bos-rightbar-v-ink .bos-rightbar .svg-container svg circle,
body.bos-rightbar-v-ink .bos-rightbar .svg-container svg rect,
body.bos-rightbar-v-ink .bos-rightbar .svg-container svg line {
  color: #fff !important;
  stroke: #fff !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-trending-head .bos-sb-ico,
body.bos-rightbar-v-ink .bos-rightbar .bos-people-head .bos-sb-ico,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-side .card-header .bos-sb-ico {
  color: #fff !important;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--link-color) 55%, transparent));
}

/* Merits banner ico + CTA — must pop on dark glow */
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-ico {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 18px color-mix(in srgb, var(--link-color) 35%, transparent);
}

body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn {
  background: #fff !important;
  color: #0f1419 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn:hover {
  background: #f0f3f6 !important;
  color: #0f1419 !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn .main-icon,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn .bos-sb-ico,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn .svg-container {
  color: #0f1419 !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn svg,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn svg *,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn svg path,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn svg circle,
body.bos-rightbar-v-ink .bos-rightbar .bos-merits-banner-btn svg line {
  color: #0f1419 !important;
  stroke: #0f1419 !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-mini-footer,
body.bos-rightbar-v-ink .bos-rightbar .bos-mini-footer a,
body.bos-rightbar-v-ink .bos-rightbar .bos-mini-footer-copy {
  color: #8b949e !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-person-action {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-person-action:hover {
  background: color-mix(in srgb, var(--link-color) 35%, #0f1419) !important;
  border-color: color-mix(in srgb, var(--link-color) 45%, transparent) !important;
  color: #fff !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-person-action svg,
body.bos-rightbar-v-ink .bos-rightbar .bos-person-action svg * {
  stroke: #fff !important;
  color: #fff !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-trend-item:hover,
body.bos-rightbar-v-ink .bos-rightbar .bos-person:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-people-head a {
  color: color-mix(in srgb, var(--link-color) 70%, #fff) !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-merit-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-mini-footer-bar {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.bos-rightbar-v-ink .bos-rightbar .bos-mini-footer .language-dropdown {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e8eaed !important;
}

/* ---------- Live ticker — dense magazine ---------- */
body.bos-rightbar-v-ticker .bos-rightbar .card.bos-merits-side,
body.bos-rightbar-v-ticker .bos-rightbar .card.bos-trending,
body.bos-rightbar-v-ticker .bos-rightbar .card.bos-people {
  border-radius: 12px !important;
  box-shadow: none !important;
  border-color: #e5e7eb !important;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-trending-head strong,
body.bos-rightbar-v-ticker .bos-rightbar .bos-people-head strong,
body.bos-rightbar-v-ticker .bos-rightbar .bos-merits-side .card-header strong {
  font-size: 11px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700 !important;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-trend-item {
  padding: 8px 4px !important;
  border-bottom: 1px dashed #eef0f3;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-trend-rank {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-trend-hash {
  font-size: 14px !important;
  letter-spacing: -0.02em;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-person {
  padding: 6px 0 !important;
  gap: 8px !important;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-person-avatar img {
  width: 32px !important;
  height: 32px !important;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-merit-item {
  min-width: 64px;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-merit-item img {
  width: 32px !important;
  height: 32px !important;
}

body.bos-rightbar-v-ticker .bos-rightbar .card.bos-merits-banner {
  border-radius: 12px !important;
  background: #111827 !important;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-merits-banner-body {
  color: #fff;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-merits-banner-kicker,
body.bos-rightbar-v-ticker .bos-rightbar .bos-merits-banner-label,
body.bos-rightbar-v-ticker .bos-rightbar .bos-merits-banner-num {
  color: #fff !important;
}

body.bos-rightbar-v-ticker .bos-rightbar .bos-merits-banner-btn {
  background: #fff !important;
  color: #111827 !important;
}
