/* V8.3.6 – vertical dashboard quick-menu and persistent-player polish.
   This final stylesheet intentionally follows the older skin layers. */

/* The avatar is the popover's anchor. Hover is for mouse users; focus works
   with the keyboard; the JS adds .is-open for touch interaction. */
.top-actions .lm-profile-menu {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  isolation: isolate;
}
.top-actions .lm-profile-menu > .profile-link {
  display: grid !important;
  place-items: center !important;
  min-width: 46px;
  text-decoration: none;
}
.lm-profile-dropdown {
  position: absolute;
  z-index: 250;
  top: calc(100% + 12px);
  left: 0;
  right: auto;
  width: 238px;
  padding: 9px;
  display: grid;
  gap: 3px;
  background: #242830;
  border: 1px solid #494c55;
  border-radius: 16px;
  box-shadow: 0 17px 44px rgba(0,0,0,.46), inset 0 1px rgba(255,255,255,.05);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-9px) scale(.975);
  transform-origin: top left;
  transition: opacity .19s ease, transform .29s cubic-bezier(.19,1,.22,1), visibility .19s;
  direction: rtl;
}
/* Invisible hover bridge avoids closing while travelling from the avatar. */
.lm-profile-dropdown::before {
  content: '';
  position: absolute;
  height: 14px;
  top: -14px;
  right: 0;
  left: 0;
}
@media (hover: hover) and (pointer: fine) {
  .lm-profile-menu:hover > .lm-profile-dropdown {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateY(0) scale(1);
  }
}
.lm-profile-menu:focus-within > .lm-profile-dropdown,
.lm-profile-menu.is-open > .lm-profile-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
}
.lm-profile-dropdown-title {
  display: block;
  padding: 7px 10px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #aeb3be;
  border-bottom: 1px solid rgba(220,225,235,.09);
  margin-bottom: 4px;
}
.lm-profile-dropdown a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #d9dce4;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, transform .24s cubic-bezier(.19,1,.22,1);
}
.lm-profile-dropdown a > :is(i,svg) {
  display: inline-grid;
  place-items: center;
  width: 25px;
  min-width: 25px;
  height: 25px;
  color: #b9bec8;
  font-size: 13px;
}
.lm-profile-dropdown a:hover,
.lm-profile-dropdown a:focus-visible {
  background: #353a44;
  color: #fff;
  transform: translateX(-2px);
  outline: none;
}
.lm-profile-dropdown a:hover > :is(i,svg),
.lm-profile-dropdown a:focus-visible > :is(i,svg) {color: #e2e4e9;}
@media (max-width: 760px) {
  .lm-profile-dropdown { width: min(238px, calc(100vw - 26px)); }
}

/* The floating island exits through the entrance animation played backwards.
   Do not hide it before the 420ms reverse completes. */
#global-player.player.is-closing {
  visibility: visible !important;
  pointer-events: none !important;
  opacity: 1;
  animation: lm-player-pop .42s cubic-bezier(.22,1,.36,1) reverse both !important;
}

/* Exact centering of Font Awesome's SVG and its optional wrapper. */
#global-player #player-close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}
#global-player #player-close > :is(i,svg),
#global-player #player-close > i > svg {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  vertical-align: middle !important;
  line-height: 1 !important;
  flex-shrink: 0;
}
.lm-command-top > button[data-close-search] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.lm-command-top > button[data-close-search] > :is(i,svg),
.lm-command-top > button[data-close-search] > i > svg {
  display: block !important;
  margin: 0 !important;
  width: 17px !important;
  height: 17px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* Liked = filled red heart, with real server-backed state. */
#global-player .player-heart {
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  padding: 0 !important;
  margin-right: 5px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  color: #d0d3db;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
#global-player .player-heart > :is(i,svg),
#global-player .player-heart > i > svg {
  display: block;
  width: 21px;
  height: 21px;
  margin: 0;
  color: inherit;
}
#global-player .player-heart:hover { background: rgba(255,255,255,.08); transform: scale(1.07); }
#global-player .player-heart.is-liked,
#global-player .player-heart.is-liked:hover { color: #f05264 !important; }
#global-player .player-heart.is-liked svg { color: #f05264 !important; fill: currentColor; }
#global-player .player-heart:disabled { opacity: .66; cursor: wait; }
#global-player .player-heart:focus-visible { outline: 2px solid #a6acb8; outline-offset: 1px; }

@media (min-width: 761px) {
  #global-player .player-extras { transform: translateX(-17px); }
}
@media (max-width: 760px) {
  /* Keep the larger heart available on the narrow player; text can ellipsize. */
  #global-player .player-song { min-width: 0; }
  #global-player .player-info { min-width: 0; flex: 1 1 auto; }
  #global-player .player-heart { display: grid !important; width: 32px; height: 32px; flex: 0 0 32px; margin: 0 !important; font-size: 18px; }
  #global-player .player-heart > :is(i,svg),
  #global-player .player-heart > i > svg { width: 18px; height: 18px; }
  #global-player .player-extras { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  #global-player.player.is-closing { animation: none !important; }
  .lm-profile-dropdown, .lm-profile-dropdown a, #global-player .player-heart { transition: none !important; }
}
