/* Lennon Music V8.3.9 — separate favorite actions, dual library view and overlay stacking. */
/* The global header must be above the content stacking context, not merely
   give the dropdown a large z-index inside a lower header. */
.app-shell .main-column > .topbar {
  position: relative !important;
  z-index: 90 !important;
  overflow: visible !important;
}
.app-shell .main-column > .main-content,
.app-shell .main-column > .site-footer {
  position: relative;
  z-index: 0;
}
.topbar .top-actions { position: relative; z-index: 2; overflow: visible !important; }
.topbar .top-actions .lm-profile-menu { z-index: 3 !important; }
.topbar .top-actions .lm-profile-dropdown {
  z-index: 9999 !important;
  overflow: visible;
}

/* Keep modal overlays (search and authentication) and the mobile drawer above
   the header, while the account menu stays above ordinary page content. */
body.menu-open .app-shell .main-column > .topbar { z-index: 0 !important; }

/* The single-song favorite belongs in the metadata area, not on the album art. */
.main-content .lm839-save-row { display: flex; margin: 15px 0 17px; min-width: 0; }
.main-content .lm839-favorite-button {
  display: inline-flex;
  direction: rtl;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  width: 100%;
  min-height: 49px;
  padding: 10px 15px;
  border: 1px solid #424650;
  border-radius: 12px;
  background: #292c34;
  color: #ebecef;
  font: 700 13px/1.65 'Vazirmatn', Tahoma, sans-serif;
  text-align: right;
  white-space: normal;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.main-content .lm839-favorite-button:hover { background: #343841; border-color: #767b87; transform: translateY(-1px); }
.main-content .lm839-favorite-button:focus-visible { outline: 2px solid #dce0e8; outline-offset: 3px; }
.main-content .lm839-favorite-button[disabled] { opacity: .65; cursor: progress; }
.main-content .lm839-favorite-button.is-liked {
  color: #f4e6e9 !important;
  background: #342c34 !important;
  border-color: #7a4758 !important;
}
.main-content .lm839-favorite-icon { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; }
.main-content .lm839-favorite-icon :is(svg, i) { width: 23px; height: 23px; font-size: 23px; }
.main-content .lm839-favorite-button.is-liked .fa-heart { color: #ff536b !important; fill: currentColor; }
.main-content .lm839-favorite-button[data-save-error] { border-color: #dc6979; }
/* Album info and single track info share the same visual rhythm. */
.main-content .lm827-single-copy .lm839-save-row,
.main-content .lm827-record-copy .lm839-save-row { max-width: 100%; }

/* The favorite panel includes two explicitly selectable collections. */
.lm839-favorites-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-width: 430px;
  padding: 6px;
  margin-bottom: 19px;
  border: 1px solid #393c45;
  border-radius: 15px;
  background: #22252c;
}
.lm839-favorites-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 43px;
  padding: 9px;
  color: #aeb3be;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  font: 700 13px/1.5 'Vazirmatn', sans-serif;
  cursor: pointer;
}
.lm839-favorites-switch button.is-active {
  background: #363a43;
  color: #f8f9fa;
  border-color: #4f5561;
  box-shadow: 0 2px 8px #0002;
}
.lm839-favorites-switch button:focus-visible { outline: 2px solid #f2f2f6; outline-offset: 2px; }
.lm839-favorites-switch button > span { font-size: 11px; opacity: .85; font-variant-numeric: tabular-nums; }
.lm839-favorites-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.lm839-favorites-heading > span { font-weight: 800; color: #eef0f4; font-size: 16px; }
[data-favorite-panel][hidden] { display: none !important; }
.lm839-saved-albums { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)) !important; gap: 14px; }
.lm839-saved-albums .lm-album-card { width: 100%; min-width: 0; }
@media(max-width: 519px) {
  .lm839-favorites-switch { max-width: none; }
  .lm839-favorites-switch button { font-size: 12px; gap: 6px; }
  .lm839-saved-albums { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px; }
}
@media(prefers-reduced-motion: reduce) { .main-content .lm839-favorite-button { transition: none; } }

/* V8.4.0: True two-axis centering for Font Awesome nested SVG hearts. */
.main-content .lm839-favorite-button {
  align-items: center !important;
}
.main-content .lm839-favorite-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  flex: 0 0 28px;
  padding: 0;
  line-height: 0 !important;
  vertical-align: middle;
}
.main-content .lm839-favorite-icon > i,
.main-content .lm839-favorite-icon > svg,
.main-content .lm839-favorite-icon > i > svg {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 23px !important;
  height: 23px !important;
  min-width: 23px;
  min-height: 23px;
  line-height: 0 !important;
  vertical-align: middle !important;
  flex: 0 0 23px;
}
.main-content .lm839-favorite-icon > i {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 23px !important;
}
.main-content .lm839-favorite-button [data-favorite-caption] {
  display: block;
  line-height: 1.65;
}
.lm840-refresh-status {
  margin: 11px 0 0;
  color: #b8bfca;
  font-size: 12px;
  line-height: 1.8;
}
.lm840-refresh-status[hidden] { display: none !important; }
[data-album-favorites-loading] [data-favorite-filter="albums"] { cursor: progress; }
