/* SW TOP ACTIONS UNIFIED v1 (2026-09-28)
   Единый блок «личный кабинет + VK» — fixed, правый верхний угол.
   Страницы: index.php, minusa.php, karaoke.php, master.php, cover.php, music.php.
   Контейнер создаёт/наполняет /assets/codex/top-actions-unified.js */

html body > .swSiteTopActions{
  position:fixed!important;
  top:max(10px,env(safe-area-inset-top,0px))!important;
  right:max(10px,env(safe-area-inset-right,0px))!important;
  z-index:21474835!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  width:max-content!important;
  max-width:calc(100vw - 24px)!important;
  margin:0!important;padding:0!important;
  pointer-events:auto!important;
}
@media(min-width:1024px){
  html body > .swSiteTopActions{
    top:max(18px,env(safe-area-inset-top,0px))!important;
    right:max(18px,env(safe-area-inset-right,0px))!important;
    gap:10px!important;
  }
}

/* — ЛИЧНЫЙ КАБИНЕТ: иконка входа 24px + подпись «личный кабинет» в 2 строки — */
html body > .swSiteTopActions > a.swCabinet.swCabinet.swCabinet,
html body > .swSiteTopActions > a.swFastTopCabinet.swFastTopCabinet.swFastTopCabinet{
  position:relative!important;inset:auto!important;z-index:auto!important;
  display:inline-flex!important;flex-direction:column!important;align-items:center!important;
  gap:4px!important;box-sizing:border-box!important;
  width:auto!important;min-width:0!important;max-width:none!important;
  height:auto!important;min-height:0!important;
  margin:0!important;padding:8px 12px 6px!important;
  border:1px solid rgba(120,205,255,.30)!important;border-radius:12px!important;
  background:linear-gradient(145deg,rgba(10,44,68,.55),rgba(3,15,26,.62))!important;
  box-shadow:0 10px 26px rgba(0,0,0,.28)!important;
  color:#f5fbff!important;text-decoration:none!important;
  white-space:normal!important;
  transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease!important;
}
html body > .swSiteTopActions > a.swCabinet.swCabinet.swCabinet:hover,
html body > .swSiteTopActions > a.swCabinet.swCabinet.swCabinet:focus-visible,
html body > .swSiteTopActions > a.swFastTopCabinet.swFastTopCabinet.swFastTopCabinet:hover,
html body > .swSiteTopActions > a.swFastTopCabinet.swFastTopCabinet.swFastTopCabinet:focus-visible{
  transform:translateY(-1px)!important;border-color:rgba(166,226,255,.66)!important;
  box-shadow:0 14px 32px rgba(0,0,0,.34),0 0 22px rgba(67,184,255,.16)!important;
  outline:none!important;
}
html body > .swSiteTopActions > a.swCabinet.swCabinet.swCabinet > i,
html body > .swSiteTopActions > a.swFastTopCabinet.swFastTopCabinet.swFastTopCabinet > i{
  flex:0 0 24px!important;width:24px!important;height:24px!important;
  display:block!important;border-radius:0!important;
  background:transparent center/contain no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='none' stroke='%23ffffff' stroke-width='34' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M60 148V100a44 44 0 0 1 44-44h332a44 44 0 0 1 44 44v312a44 44 0 0 1-44 44H104a44 44 0 0 1-44-44v-48'/%3E%3Cpath d='M24 256h294'/%3E%3Cpath d='m232 168 94 88-94 88'/%3E%3C/svg%3E")!important;
  box-shadow:none!important;filter:none!important;font-size:0!important;
}
html body > .swSiteTopActions > a.swCabinet.swCabinet.swCabinet > i::before,
html body > .swSiteTopActions > a.swCabinet.swCabinet.swCabinet > i::after,
html body > .swSiteTopActions > a.swFastTopCabinet.swFastTopCabinet.swFastTopCabinet > i::before,
html body > .swSiteTopActions > a.swFastTopCabinet.swFastTopCabinet.swFastTopCabinet > i::after{
  content:none!important;
}
html body > .swSiteTopActions > a.swCabinet.swCabinet.swCabinet > span,
html body > .swSiteTopActions > a.swFastTopCabinet.swFastTopCabinet.swFastTopCabinet > span{
  position:static!important;width:auto!important;height:auto!important;
  clip:auto!important;overflow:visible!important;
  display:block!important;
  font:600 9px/1.22 Arial,system-ui,sans-serif!important;
  letter-spacing:.09em!important;text-transform:lowercase!important;
  color:rgba(255,255,255,.85)!important;white-space:normal!important;text-align:center!important;
}
html body > .swSiteTopActions > a.swCabinet.swCabinet.swCabinet > span br,
html body > .swSiteTopActions > a.swFastTopCabinet.swFastTopCabinet.swFastTopCabinet > span br{
  display:inline!important;
}

/* — VK-пилюля: 104×54 на десктопе, 50×50 на мобиле — */
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity{
  position:relative!important;inset:auto!important;z-index:auto!important;
  display:inline-flex!important;align-items:center!important;
  visibility:visible!important;opacity:1!important;pointer-events:auto!important;
  flex:0 0 104px!important;width:104px!important;min-width:104px!important;max-width:104px!important;
  height:54px!important;min-height:54px!important;
  margin:0!important;padding:7px 10px 7px 7px!important;gap:8px!important;
  border:1px solid rgba(130,205,255,.46)!important;border-radius:999px!important;
  background:linear-gradient(145deg,rgba(17,68,111,.88),rgba(5,22,39,.94))!important;
  box-shadow:0 14px 36px rgba(0,0,0,.30),0 0 20px rgba(67,184,255,.14),inset 0 1px 0 rgba(255,255,255,.16)!important;
  color:#f5fbff!important;text-decoration:none!important;
  transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease!important;
}
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity:hover,
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity:focus-visible{
  transform:translateY(-2px)!important;border-color:rgba(166,226,255,.82)!important;
  outline:none!important;
}
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity .swVkCommunity__mark{
  flex:0 0 40px!important;width:40px!important;height:40px!important;
  display:grid!important;place-items:center!important;overflow:hidden!important;
  border-radius:50%!important;
}
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity .swVkCommunity__mark img{
  width:27px!important;height:27px!important;display:block!important;
}
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity .swVkCommunity__copy{
  display:grid!important;place-items:center start!important;
}
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity .swVkCommunity__copy strong{
  font:800 12px/1 Arial,system-ui,sans-serif!important;letter-spacing:.02em!important;
}
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity .swVkCommunity__copy small,
html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity .swVkCommunity__arrow{
  display:none!important;
}
@media(max-width:1023px){
  html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity{
    flex:0 0 50px!important;width:50px!important;min-width:50px!important;max-width:50px!important;
    height:50px!important;min-height:50px!important;padding:5px!important;gap:0!important;
  }
  html body > .swSiteTopActions > a.swVkCommunity.swVkCommunity.swVkCommunity .swVkCommunity__copy{
    display:none!important;
  }
}

/* — служебное: скрывать в рабочих/модальных состояниях; JS-дубль кабинета скрыт — */
html:is(.upload-active,.sw-processing-final-active) body > .swSiteTopActions,
body:is([data-page-state="uploading"],[data-page-state="processing"],[data-page-state="queued"],[data-page-state="paid-processing"]) > .swSiteTopActions{
  display:none!important;
}
body:is(.modal-open,.sw-modal-open,.minus-modal-open) > .swSiteTopActions,
html:is(.sw-modal-open,.swImpactGrowthOpen) body > .swSiteTopActions,
body.sw-everywhere-modal-open > .swSiteTopActions{
  visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
html body a#swMobileCabinetEntry.swMobileCabinetEntry.swMobileCabinetEntry{
  display:none!important;
}

/* — легаси-клон кабинета (глобус-эмодзи) скрыт — */
html body a.swIndexCabinetClone.swIndexCabinetClone.swIndexCabinetClone{
  display:none!important;
}
