/* Azmabegir navbar day/night switch. Only loaded by base_fa.html. */
html[lang="fa"] :is(.ks-nav .ks-theme, .nav-fa .theme-toggle).ks-theme-scene{
  --ks-scene-width:64px;
  --ks-scene-travel:30px;
  position:relative;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  width:calc(var(--ks-scene-width) + 4px)!important;
  min-width:calc(var(--ks-scene-width) + 4px)!important;
  height:44px!important;
  min-height:44px!important;
  padding:4px 2px!important;
  margin:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:inherit!important;
  cursor:pointer;
  line-height:1;
  transform:none!important;
  -webkit-tap-highlight-color:transparent;
}
html[lang="fa"] .ks-theme-scene .ks-scene-track{
  width:var(--ks-scene-width);
  height:34px;
  border-radius:999px;
  display:block;
  position:relative;
  overflow:hidden;
  pointer-events:none;
  direction:ltr;
  background:linear-gradient(115deg,#a3ddff 0%,#69bcf1 65%,#83ccf9 100%);
  border:1px solid rgba(75,135,186,.4);
  box-shadow:inset 0 2px 5px rgba(255,255,255,.3),0 1px 3px rgba(12,32,61,.12);
  transition:background .52s ease,border-color .52s ease,box-shadow .52s ease;
}
html[lang="fa"] .ks-theme-scene .ks-scene-thumb{
  position:absolute;
  top:3px;
  left:3px;
  width:26px;
  height:26px;
  border-radius:50%;
  z-index:3;
  background:#ffe28b;
  box-shadow:0 0 0 4px rgba(255,236,164,.24),0 0 13px rgba(255,212,90,.68),inset -2px -2px 3px #eeb74a;
  transition:transform .56s cubic-bezier(.2,1.4,.4,1),background .42s ease,box-shadow .42s ease;
}
html[lang="fa"] .ks-theme-scene .ks-scene-craters{
  position:absolute;
  inset:0;
  border-radius:inherit;
  opacity:0;
  transform:rotate(-35deg);
  background:radial-gradient(circle 3px at 35% 28%,#a6b8cf 98%,transparent 105%),
             radial-gradient(circle 4px at 66% 63%,#b2bed6 98%,transparent 105%),
             radial-gradient(circle 2px at 34% 76%,#b1c0d6 98%,transparent 105%);
  transition:opacity .4s ease,transform .5s ease;
}
html[lang="fa"] .ks-theme-scene .ks-scene-stars{
  position:absolute;
  inset:0;
  opacity:0;
  transform:translateY(5px);
  background:radial-gradient(circle 1.5px at 14% 28%,white 95%,transparent 100%),
             radial-gradient(circle 1px at 37% 62%,white 95%,transparent 100%),
             radial-gradient(circle 1.5px at 54% 19%,white 95%,transparent 100%),
             radial-gradient(circle 1px at 77% 69%,white 95%,transparent 100%),
             radial-gradient(circle 1px at 85% 34%,#e5ddff 95%,transparent 100%);
  transition:opacity .4s ease,transform .6s ease;
}
html[lang="fa"] .ks-theme-scene .ks-scene-cloud{
  position:absolute;
  width:24px;
  height:9px;
  right:5px;
  bottom:6px;
  border-radius:15px;
  background:rgba(255,255,255,.92);
  box-shadow:-6px 3px 0 1px rgba(255,255,255,.75),4px 2px 0 rgba(255,255,255,.6);
  transition:transform .5s ease,opacity .4s ease;
}
html[lang="fa"] .ks-theme-scene .ks-scene-cloud::before,
html[lang="fa"] .ks-theme-scene .ks-scene-cloud::after{
  content:"";
  position:absolute;
  border-radius:50%;
  background:rgba(255,255,255,.94);
}
html[lang="fa"] .ks-theme-scene .ks-scene-cloud::before{width:12px;height:12px;left:4px;top:-6px}
html[lang="fa"] .ks-theme-scene .ks-scene-cloud::after{width:9px;height:9px;right:2px;top:-4px}
html[data-theme="dark"][lang="fa"] .ks-theme-scene .ks-scene-track{
  background:linear-gradient(115deg,#161d47 0%,#2e356e 55%,#45538f 100%);
  border-color:rgba(160,173,255,.45);
  box-shadow:inset 0 2px 6px #080c2f68,0 1px 4px #0003;
}
html[data-theme="dark"][lang="fa"] .ks-theme-scene .ks-scene-thumb{
  transform:translateX(var(--ks-scene-travel)) rotate(18deg);
  background:#f3f2fb;
  box-shadow:0 0 0 3px rgba(225,233,255,.13),0 0 11px rgba(201,214,255,.35),inset -3px -3px 3px #bcc8db;
}
html[data-theme="dark"][lang="fa"] .ks-theme-scene .ks-scene-craters{opacity:1;transform:rotate(0deg)}
html[data-theme="dark"][lang="fa"] .ks-theme-scene .ks-scene-stars{opacity:1;transform:translateY(0)}
html[data-theme="dark"][lang="fa"] .ks-theme-scene .ks-scene-cloud{opacity:0;transform:translateX(-10px) translateY(10px)}
html[lang="fa"] .ks-theme-scene:hover .ks-scene-track{
  box-shadow:inset 0 2px 5px #ffffff50,0 0 0 3px rgba(124,58,237,.09),0 3px 12px #0a18352c;
}
html[lang="fa"] .ks-theme-scene:focus-visible{
  outline:3px solid var(--ksl-bright,var(--d-accent,#7c3aed))!important;
  outline-offset:2px!important;
}
html[lang="fa"] .ks-theme-scene:active .ks-scene-thumb{scale:.91}
html[lang="fa"] .ks-theme-scene.ks-scene-pop .ks-scene-track{animation:ks-scene-glimmer .5s ease}
@keyframes ks-scene-glimmer{0%,100%{filter:brightness(1)}45%{filter:brightness(1.2)}}
@media(max-width:640px){
  html[lang="fa"] :is(.ks-nav .ks-theme, .nav-fa .theme-toggle).ks-theme-scene{
    --ks-scene-width:56px;--ks-scene-travel:22px;
  }
}
@media(max-width:370px){
  html[lang="fa"] :is(.ks-nav .ks-theme, .nav-fa .theme-toggle).ks-theme-scene{
    --ks-scene-width:52px;--ks-scene-travel:18px;
  }
}
@media(prefers-reduced-motion:reduce){
  html[lang="fa"] .ks-theme-scene :is(.ks-scene-track,.ks-scene-thumb,.ks-scene-craters,.ks-scene-stars,.ks-scene-cloud){
    transition:none!important;animation:none!important;
  }
  html[lang="fa"] .ks-theme-scene.ks-scene-pop .ks-scene-track{animation:none!important}
}
/* A circular day/night reveal from the switch where View Transitions are supported. */
html.ks-scene-transitioning::view-transition-old(root),
html.ks-scene-transitioning::view-transition-new(root){
  animation:none!important;
  mix-blend-mode:normal;
}
html.ks-scene-transitioning::view-transition-new(root){z-index:1}
html.ks-scene-transitioning::view-transition-old(root){z-index:0}
