/*
  ФАЙЛ: top.css
  Назначение: стили верхней панели сайта, логотипа и кнопок языка/темы.
  Что редактируется в этом файле:
  - шапка страницы и логотип: .header, .site-title, .site-logo, .logo-juke, .logo-box
  - кнопка смены языка: .lang-btn, #langToggleIconWrap
  - кнопка смены темы и её иконки: .theme-btn, .theme-icon-*, .sun-icon, .moon-icon
  - поведение верхних элементов при открытых dropdown/кошельке и других служебных состояниях
  - мелкая адаптация шапки на мобильных устройствах
  Примечание: всё, что относится к верхней панели интерфейса, менять в этом файле.
*/

body.wallet-modal-open .dropdown-wrap{
  transform: none !important;
  -webkit-transform: none !important;
}

body.wallet-modal-open .dropdown-wrap{
  z-index: 100 !important;
}

#favoritesWrap.dropdown-wrap-hidden{
  display: block !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html[data-theme="dark"] .lang-btn, html[data-theme="dark"] .theme-btn{
  background: #2a2c31;
  border-color: #3a3c42;
  color: #f1f1f1;
}

.site-title{
  flex: 1;
  text-align: center;
  margin: 0;
  line-height: 1;
  position: relative;
}

.site-version{
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  display: block;
  margin: 0;
  padding: 0;
  font-size: 7px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .12px;
  white-space: nowrap;
  opacity: .46;
  color: currentColor;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.site-logo{
  display: block;
  height: 34px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.logo-juke{
  letter-spacing: 1px;
}

.logo-box{
  letter-spacing: 1px;
  margin-left: -1px;
}

@media (max-width: 480px){
  .site-title .logo-box {
    padding: 5px 9px;
    border-radius: 7px;
    transform: translateY(1px);
  }

}

.lang-btn, .theme-btn{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  caret-color: currentColor;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
  padding: 0;
  line-height: 1;
}

.lang-btn{
  color: #000;
  font-size: 14px;
  font-family: Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

.theme-btn:focus, .theme-btn:focus-visible, .lang-btn:focus, .lang-btn:focus-visible{
  outline: none !important;
  box-shadow: none !important;
}

.lang-btn:active, .theme-btn:active{
  background-color: #ff8c00 !important;
  border-color: #ff8c00 !important;
  color: #ffffff !important;
  transform: scale(0.93);
}

body.dark .theme-btn{
  background: #2a2c31;
  border-color: #3a3c42;
}

.theme-btn .theme-icon-svg{
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}

.theme-btn .theme-icon-stack{
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}

.theme-btn .theme-icon-layer{
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  transition: none;
}

.theme-btn .moon-icon{
  opacity: 1;
  fill: #000000;
  color: #000000;
}

.theme-btn .sun-icon{
  opacity: 0;
  fill: #ff8c00;
  color: #ff8c00;
}

html[data-theme="dark"] .theme-btn .moon-icon,
body.dark .theme-btn .moon-icon{
  opacity: 0;
}

html[data-theme="dark"] .theme-btn .sun-icon,
body.dark .theme-btn .sun-icon{
  opacity: 1;
}

.dropdown-wrap{
  position: relative;
  width: 100%;
  display: block;
  box-sizing: border-box;
}

body.dark .lang-btn{
  background: #2a2c31;
  border-color: #3a3c42;
  color: #f1f1f1;
}

.theme-transition-overlay .dark-scope .lang-btn, .theme-transition-overlay .dark-scope .theme-btn{
  background: #2a2c31 !important;
  border-color: #3a3c42 !important;
  color: #f1f1f1 !important;
}

.theme-transition-overlay .light-scope .lang-btn{
  background: #ffffff !important;
  border-color: #ccc !important;
  color: #222 !important;
}

.theme-transition-overlay .light-scope .theme-btn{
  background: #ffffff !important;
  border-color: #ccc !important;
}

.theme-transition-overlay .dark-scope .theme-btn{
  background: #2a2c31 !important;
  border-color: #3a3c42 !important;
}

.theme-transition-overlay .light-scope .theme-btn .moon-icon{
  opacity: 1 !important;
  fill: #000000 !important;
  color: #000000 !important;
}

.theme-transition-overlay .light-scope .theme-btn .sun-icon{
  opacity: 0 !important;
}

.theme-transition-overlay .dark-scope .theme-btn .moon-icon{
  opacity: 0 !important;
}

.theme-transition-overlay .dark-scope .theme-btn .sun-icon{
  opacity: 1 !important;
  fill: #ff8c00 !important;
  color: #ff8c00 !important;
}

.dropdown-wrap{
  position: relative;
  z-index: 1402;
  width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
}

.logo-juke{
  font-weight: 900;
}

.logo-box{
  display: inline-block;
  background: #ff8c00;
  color: #fff;
  padding: 1px 4px;
  border-radius: 0;
  font-weight: 900;
}

body:not(.dark) .logo-juke{
  color: #000;
}

body:not(.dark) .logo-box{
  color: #fff;
}

body.dark .logo-juke{
  color: #fff;
}

body.dark .logo-box{
  color: #000;
}

.site-title .logo-box, .logo-box{
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  background: #ff8c00 !important;
  border: 0 !important;
  overflow: visible !important;
}

.site-title{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.site-title .logo-juke{
  display: inline-block !important;
  line-height: 1 !important;
  transform: translateZ(0);
}

.site-title .logo-box{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  padding: 0px 4px !important;
  line-height: 1 !important;
  position: relative !important;
  top: 2px !important;
  transform: translateY(-3px) !important;
  z-index: 0;
}

body:not(.dark) .site-title .logo-juke{
  color: #000 !important;
}

body:not(.dark) .site-title .logo-box{
  color: #fff !important;
}

body.dark .site-title .logo-juke{
  color: #fff !important;
}

body.dark .site-title .logo-box{
  color: #000 !important;
}

.theme-transition-overlay .light-scope .site-title .logo-juke{
  color: #000 !important;
}

.theme-transition-overlay .light-scope .site-title .logo-box{
  color: #fff !important;
  background: #ff8c00 !important;
}

.theme-transition-overlay .dark-scope .site-title .logo-juke{
  color: #fff !important;
}

.theme-transition-overlay .dark-scope .site-title .logo-box{
  color: #000 !important;
  background: #ff8c00 !important;
}

.site-title, .site-title .logo-juke, .site-title .logo-box, .theme-transition-overlay .site-title, .theme-transition-overlay .site-title .logo-juke, .theme-transition-overlay .site-title .logo-box{
  -webkit-font-smoothing: antialiased;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.site-title, .site-title .logo-juke, .site-title .logo-box{
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.site-title .logo-box::before{
  content: "";
  position: absolute;
  inset: 0;
  background: #ff8c00;
  border-radius: 0;
  transform: translateY(1px);
  z-index: -1;
}

body.theme-freeze .site-title, body.theme-animating .site-title{
  opacity: 1 !important;
}

.lang-btn{
  overflow: hidden;
}

#langToggleIconWrap{
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#langToggleIconWrap svg{
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
}

#langToggleIconWrap img{
  width: 24px;
  height: 24px;
  display: block;
}

html[data-theme="dark"] #langToggleIconWrap img[alt="RU"], body.dark #langToggleIconWrap img[alt="RU"], .theme-transition-overlay .dark-scope #langToggleIconWrap img[alt="RU"], html[data-theme="dark"] #langToggleIconWrap img[alt="EN"], body.dark #langToggleIconWrap img[alt="EN"], .theme-transition-overlay .dark-scope #langToggleIconWrap img[alt="EN"]{
  filter: brightness(0) invert(1);
}

html[data-theme="light"] #langToggleIconWrap img[alt="RU"], body:not(.dark) #langToggleIconWrap img[alt="RU"], .theme-transition-overlay .light-scope #langToggleIconWrap img[alt="RU"], html[data-theme="light"] #langToggleIconWrap img[alt="EN"], body:not(.dark) #langToggleIconWrap img[alt="EN"], .theme-transition-overlay .light-scope #langToggleIconWrap img[alt="EN"]{
  filter: none;
}

body.theme-animating .dropdown-wrap, body.theme-freeze .dropdown-wrap{
  transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, filter !important;
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
}

.dropdown-wrap{
  width: var(--site-width) !important;
  max-width: var(--site-max-width) !important;
  box-sizing: border-box !important;
}

.dropdown-wrap{
  width: var(--site-visual-width) !important;
  max-width: var(--site-max-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body.theme-animating .dropdown-wrap, body.theme-freeze .dropdown-wrap{
  transform: none !important;
  -webkit-transform: none !important;
}

body.theme-animating .dropdown-wrap, body.theme-freeze .dropdown-wrap{
  width: var(--site-visual-width, min(500px, calc(100vw - 24px))) !important;
  max-width: var(--site-max-width, 500px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

.theme-transition-clone .dropdown-wrap{
  width: var(--site-visual-width, min(500px, calc(100vw - 24px))) !important;
  max-width: var(--site-max-width, 500px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  transform: none !important;
  -webkit-transform: none !important;
}

.dropdown-wrap{
  box-sizing: border-box;
}

.dropdown-wrap-hidden{
  display: none !important;
}

@media (max-width: 480px){
  .site-title {
    font-size: 34px;
  }

  

  

  

  

  .tracks-toggle {
    font-size: 15px;
    padding: 14px 14px;
  }

  .track-search {
    font-size: 15px;
    padding: 14px 44px 14px 14px;
  }

  .header {
    margin: 6px 0 18px 0;
  }

  

  

  

  

  

  

}


/* v22.1 LANGUAGE BUTTON BORDER FIX
   LIGHT: same gray border as the PLAY button (#ccc).
   DARK: keep the existing dark gray border (#3a3c42).
   Clicking the language switch must not recolor its border orange.
*/
html[data-theme="light"] .lang-btn,
body:not(.dark) .lang-btn{
  border-color: #ccc !important;
}

html[data-theme="dark"] .lang-btn,
body.dark .lang-btn{
  border-color: #3a3c42 !important;
}

html[data-theme="light"] .lang-btn:active,
body:not(.dark) .lang-btn:active{
  border-color: #ccc !important;
}

html[data-theme="dark"] .lang-btn:active,
body.dark .lang-btn:active{
  border-color: #3a3c42 !important;
}


/* v22.2 THEME TOGGLE BORDER: exact endpoint colors during snapshot animation */
.theme-transition-overlay .light-scope #themeToggle{
  border-color: #ccc !important;
  transition: none !important;
}

.theme-transition-overlay .dark-scope #themeToggle{
  border-color: #3a3c42 !important;
  transition: none !important;
}

/* v22.9 THEME BUTTON PRESS ENDPOINT — JS/Telegram detection independent
   The theme button never uses the generic orange pressed background. Its :active state
   immediately previews the destination theme using only the current html/body theme state.
   This is intentionally global so classic Telegram Desktop WebView also works even when
   the separate theme-animation script/host detector is unavailable.
*/
#themeToggle.theme-btn:active{
  transform: none !important;
  -webkit-transform: none !important;
  transition: none !important;
  animation: none !important;
}

html[data-theme="light"] #themeToggle.theme-btn:active,
body:not(.dark) #themeToggle.theme-btn:active{
  background: #2a2c31 !important;
  background-color: #2a2c31 !important;
  border-color: #3a3c42 !important;
  color: #f1f1f1 !important;
}
html[data-theme="light"] #themeToggle.theme-btn:active .moon-icon,
body:not(.dark) #themeToggle.theme-btn:active .moon-icon{
  opacity: 0 !important;
}
html[data-theme="light"] #themeToggle.theme-btn:active .sun-icon,
body:not(.dark) #themeToggle.theme-btn:active .sun-icon{
  opacity: 1 !important;
  fill: #ff8c00 !important;
  color: #ff8c00 !important;
}

html[data-theme="dark"] #themeToggle.theme-btn:active,
body.dark #themeToggle.theme-btn:active{
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: #ccc !important;
  color: #000000 !important;
}
html[data-theme="dark"] #themeToggle.theme-btn:active .moon-icon,
body.dark #themeToggle.theme-btn:active .moon-icon{
  opacity: 1 !important;
  fill: #000000 !important;
  color: #000000 !important;
}
html[data-theme="dark"] #themeToggle.theme-btn:active .sun-icon,
body.dark #themeToggle.theme-btn:active .sun-icon{
  opacity: 0 !important;
}
