/* Переключатель оформления у названия BALANSIR (Header.cshtml, SiteTheme): шар из трех секторов — золото, синий, зеленый.
   Сектор активной темы — сверху; при смене шар поворачивается на сектор вперед (--orb-turn задает скрипт
   _ThemeSwitchScript.cshtml, всегда в одну сторону), ореол принимает цвет темы. Блик сверху не вращается.
   Общий для всех тем: цвета заданы явно и генератором тем (Build-Themes.ps1) не меняются */
.brand-row{display:inline-flex;align-items:center;gap:12px;flex:0 0 auto}
.theme-switch{
  position:relative;flex:0 0 auto;width:24px;height:24px;padding:0;margin:0;
  border:0;border-radius:50%;background:none;cursor:pointer;
  -webkit-tap-highlight-color:transparent
}
.theme-switch__orb{
  position:absolute;inset:4px;border-radius:50%;
  /* сектор темы — 120°, по краям мягкий переход в соседний */
  background:conic-gradient(from -60deg,
    #d6b87c 0deg 108deg, #3d78f5 132deg 228deg, #2e9a66 252deg 348deg, #d6b87c 360deg);
  box-shadow:0 0 0 1px rgba(255,255,255,.22),0 0 8px rgba(224,196,138,.38);
  transform:rotate(var(--orb-turn,0deg)) scale(1);
  transition:transform .7s cubic-bezier(.65,0,.25,1),box-shadow .7s ease,opacity .2s ease;
  opacity:.85
}
/* блик и тонкое кольцо при наведении — на самой кнопке, не вращаются */
.theme-switch::before{
  content:"";position:absolute;inset:4px;border-radius:50%;z-index:1;pointer-events:none;
  background:radial-gradient(circle at 35% 28%,rgba(255,255,255,.45),rgba(255,255,255,0) 48%)
}
.theme-switch::after{
  content:"";position:absolute;inset:0;border-radius:50%;
  border:1px solid rgba(255,255,255,0);transition:border-color .25s ease
}
.theme-switch:hover .theme-switch__orb,.theme-switch:focus-visible .theme-switch__orb{
  opacity:1;transform:rotate(var(--orb-turn,0deg)) scale(1.08)
}
.theme-switch:hover::after,.theme-switch:focus-visible::after{border-color:rgba(255,255,255,.28)}
.theme-switch:focus{outline:none}
.theme-switch:focus-visible{outline:2px solid rgba(255,255,255,.45);outline-offset:2px}

html[data-theme="blue"] .theme-switch__orb{box-shadow:0 0 0 1px rgba(255,255,255,.22),0 0 9px rgba(126,163,255,.48)}
html[data-theme="green"] .theme-switch__orb{box-shadow:0 0 0 1px rgba(255,255,255,.22),0 0 9px rgba(127,204,163,.48)}

@media (prefers-reduced-motion:reduce){
  .theme-switch__orb{transition:none}
}
