// SASS overwrites the CSS invert function so we overwrite it back
@function invert($v) {
    @return #{"invert("}$v#{")"};
}

@import "Util";
@import "Colors";
@import "Fonts";
@import "Inputs";
@import "ConfigMenu";
@import "ContextMenu.scss";
@import "NoAds";
@import "Markdown";
@import "Info";
@import "Loader";

:root {
    --bar-height: 70px;
    --bar-cover-art-size: 40px;
    --main-gap: 10px;
    --main-corner-radius: 10px;
    --scrollbar-vertical-size: 8px;
    --cover-border-radius: 8px;
    --playbar-movement-anim-speed: 0.5s;
    --image-radius: 10px;
    --sidebar-icons-border-radius: 50vh; // 50vh = round / pill
    --song-transition-speed: 3s;
    --is_dark: calc(1 - var(--is_light));
}

::-webkit-scrollbar {
    width: var(--scrollbar-vertical-size);
}

.os-scrollbar-handle,
::-webkit-scrollbar-thumb {
    background-color: spiceColor("sidebar") !important;
    border-radius: 50vw;
}

.os-scrollbar-handle:hover,
::-webkit-scrollbar-thumb:hover {
    background-color: spiceColor("sidebar", 0.8) !important;
}

.main-type-mesto,
.main-type-mestoBold,
.main-type-ballad,
.main-type-balladBold,
.main-type-canon {
    @include spiceFont("info");
    letter-spacing: normal;
}

.main-type-ballad {
    font-weight: 500;
}

.lyrics-lyricsContainer-LyricsLine {
    @include spiceFont("glue");
    letter-spacing: -0.03em !important;
}

.main-rootlist-rootlistDivider {
    display: none;
}

.x-searchInput-searchInputSearchIcon,
.x-searchInput-searchInputClearButton {
    color: spiceColor("text") !important;
}

#dribbblish-search-box {
    display: none;
    order: 99;
    height: 28px;
    border-radius: var(--sidebar-icons-border-radius) !important;
    @include spiceFont("info", 14px, "Regular");
}

#main[search-box] {
    #dribbblish-search-box {
        display: block;
    }

    [data-testid="search-input"] {
        display: none;
    }
}

.main-home-homeHeader,
.x-entityHeader-overlay,
.x-actionBarBackground-background,
.main-actionBarBackground-background,
.main-entityHeader-overlay,
.main-entityHeader-backgroundColor {
    background-color: unset !important;
    background-image: unset !important;
}

.main-playButton-PlayButton.main-playButton-primary {
    color: white;
}

.connect-title,
.connect-header {
    display: none;
}

.connect-device-list {
    margin: 0px -5px;
}

/* Remove Topbar background colour */
.main-topBar-background {
    background-color: unset !important;
}
.main-topBar-overlay {
    background-color: spiceColor("main");
}

.main-entityHeader-shadow,
.connect-device-list-container {
    box-shadow: 0 4px 20px #21212130;
}

.main-trackList-playingIcon {
    image-rendering: pixelated;
    filter: grayscale(1);
}

.main-trackList-trackListRow:hover {
    background-color: spiceColor("selected-row", 0.2) !important;
}

.main-trackList-trackListRow:focus-within,
[aria-selected="true"] > .main-trackList-trackListRow {
    background-color: spiceColor("selected-row", 0.4) !important;
}

span.artist-artistVerifiedBadge-badge svg > path:first-of-type {
    fill: spiceColor("button");
}
span.artist-artistVerifiedBadge-badge svg > path:last-of-type {
    fill: spiceColor("text");
}

/* Full window artist background */
.main-entityHeader-background.main-entityHeader-gradient {
    opacity: 0.3;
}

.main-entityHeader-container.main-entityHeader-withBackgroundImage,
.main-entityHeader-background,
.main-entityHeader-background.main-entityHeader-overlay:after {
    height: 100vh;
}

.main-entityHeader-withBackgroundImage .main-entityHeader-headerText {
    justify-content: center;
}

.main-entityHeader-container.main-entityHeader-nonWrapped.main-entityHeader-withBackgroundImage {
    padding-left: 9%;
}

.main-entityHeader-background.main-entityHeader-overlay:after {
    background-image: linear-gradient(transparent, transparent), linear-gradient(spiceColor("main"), spiceColor("main"));
}

.artist-artistOverview-overview .main-entityHeader-withBackgroundImage h1 {
    font-size: 120px !important;
    line-height: 120px !important;
}

.main-playPauseButton-button {
    background-color: spiceColor("button");
    color: white;
}

/** Queue page header */
.queue-queue-title,
.queue-playHistory-title {
    color: spiceColor("text") !important;
}

/** Artist page */
.artist-artistOverview-heading {
    color: spiceColor("text") !important;
}
.artist-artistAbout-content .artist-artistAbout-cityBlock div,
.artist-artistAbout-content .artist-artistAbout-stats div {
    color: spiceColor("text") !important;
}
.artist-artistAbout-content div {
    color: spiceColor("text") !important;
}

/** Cards */
.main-card-card {
    border-radius: var(--main-corner-radius) !important;
}

.main-cardImage-imageWrapper {
    background-color: transparent;
    box-shadow: unset;
    -webkit-box-shadow: unset;
}

.main-cardImage-imagePlaceholder,
.main-cardImage-image {
    border-radius: var(--cover-border-radius);
}

.main-rootlist-rootlistDivider {
    background-color: unset;
}

.main-nowPlayingBar-nowPlayingBar {
    height: var(--bar-height);
}

.Root__top-bar {
    border-radius: var(--main-corner-radius) var(--main-corner-radius) 0 0;
}

.main-topBar-background {
    border-radius: var(--main-corner-radius) var(--main-corner-radius) 0 0;
}

.Root__main-view {
    background-color: spiceColor("main");
    border-radius: var(--main-corner-radius) var(--main-corner-radius) 0 0;
    overflow: hidden;
}

.main-buddyFeed-buddyFeed {
    box-shadow: unset;
    -webkit-box-shadow: unset;
    z-index: 0;
}

.main-buddyFeed-headerTitle,
.main-buddyFeed-activityMetadata .main-buddyFeed-username a {
    color: spiceColor("sidebar-text");
}

.main-buddyFeed-activityMetadata .main-buddyFeed-artistAndTrackName a,
.main-buddyFeed-activityMetadata .main-buddyFeed-artistAndTrackName span,
.main-buddyFeed-activityMetadata .main-buddyFeed-playbackContextLink,
.main-buddyFeed-activityMetadata .main-buddyFeed-timestamp {
    color: spiceColor("sidebar-text", 0.8);
}

.main-buddyFeed-buddyFeedRoot .main-avatar-avatar,
.main-buddyFeed-buddyFeedRoot .main-buddyFeed-overlay {
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--sidebar-icons-border-radius);
}

.main-avatar-avatar > div {
    width: 100% !important;
    height: 100% !important;
}

.view-homeShortcutsGrid-shortcut {
    overflow: hidden;
    background-color: spiceColor("selected-row", 0.4);
}

.view-homeShortcutsGrid-shortcut:hover {
    background-color: spiceColor("selected-row", 0.6);
}

.cover-art,
.view-homeShortcutsGrid-shortcut,
:not(.view-homeShortcutsGrid-imageWrapper) > .main-image-image:not(.main-avatar-image) {
    border-radius: var(--image-radius) !important;
}

.main-avatar-image,
.main-userWidget-box,
.main-avatar-userIcon,
.view-homeShortcutsGrid-shortcutLink {
    border-radius: var(--sidebar-icons-border-radius) !important;
}

.main-userWidget-box {
    background-color: transparent !important;
    padding: 0px;
    margin: 0px;
}

.main-avatar-avatar.main-avatar-withBadge:after {
    box-shadow: 0 0 0 2px spiceColor("sidebar");
    background-color: spiceColor("notification");
    right: 0;
}

.Root__now-playing-bar {
    border-radius: 0 0 var(--main-corner-radius) var(--main-corner-radius);
    background-color: unset;
}

.main-nowPlayingBar-container {
    border-radius: 0 0 var(--main-corner-radius) var(--main-corner-radius);
    background-color: spiceColor("main");
    border-top: 0;
    min-width: 518px;

    &.with-shadow {
        background: radial-gradient(ellipse at right 50% bottom -80px, spiceColor("sidebar", 0.55), spiceColor("main") 60%);
    }
}

.main-buddyFeed-findFriendsButton {
    color: spiceColor("sidebar-text");
}

.main-connectBar-connectBar {
    border-radius: 0 0 var(--main-corner-radius) var(--main-corner-radius);
    border: 2px solid spiceColor("main");
    border-top: 0;
    background-color: spiceColor("button") !important;
    color: spiceColor("text") !important;
}

.Root__nav-bar {
    height: 100%;
    z-index: 1;
    width: var(--sidebar-width) !important;
}

.main-buddyFeed-buddyFeedRoot {
    height: 100%;
}

.main-buddyFeed-buddyFeedRoot .os-content {
    padding-top: 0 !important;
}

html,
.Root__nav-bar,
.main-buddyFeed-buddyFeed {
    background-color: spiceColor("sidebar") !important;
}

html {
    background-position: center;
    background-repeat: no-repeat;
}

.Root__nav-bar .link-subtle,
.main-rootlist-rootlistItemLink:link,
.main-rootlist-rootlistItemLink:visited,
.main-rootlist-rootlistContent span,
.main-navBar-entryPoints span {
    z-index: 1;
    color: spiceColor("sidebar-text");
}

.main-navBar-navBarItem svg {
    width: 24px !important;
    height: 24px !important;
}

.main-navBar-navBarItem {
    position: relative;
    padding: 0px;
}

#spicetify-show-list > * {
    padding: 0px;
    margin: 0px 8px;
}

#spicetify-sidebar-config {
    z-index: 999;
}

.main-rootlist-statusIcons {
    z-index: 1;
    position: absolute;
    inset: 0;
    left: calc(var(--indentation) * var(--left-sidebar-item-indentation-width));
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    pointer-events: none;

    [href="/collection/tracks"] > & {
        display: none;
    }

    html.sidebar-hide-text & {
        left: 0px;
    }

    .main-playButton-button {
        width: 32px;
        height: 32px;
        margin: 0px;
        color: spiceColor("sidebar");
        background-color: spiceColor("main", 0.7);
        border-radius: var(--sidebar-icons-border-radius);
    }
}

.main-rootlist-expandArrow {
    z-index: 2;
    position: absolute;
    top: 20px;
    right: 12px;
    width: 16px;
    height: 16px;
    color: spiceColor("sidebar-text") !important;
    background-color: spiceColor("button");
    border-radius: 50%;
    box-shadow: 0 0 0 2px spiceColor("sidebar");
    opacity: 0;
}

li.GlueDropTarget:hover .main-rootlist-expandArrow {
    opacity: 1;
}

html:not(.sidebar-hide-text) .main-rootlist-expandArrow {
    opacity: 1;
}

.main-rootlist-expandArrow::before {
    font-size: 10px;
    padding-bottom: 3px;
}

html.sidebar-hide-text .main-rootlist-expandArrow {
    right: 4px;
}

html.sidebar-hide-text .main-navBar-navBarItem span,
html.sidebar-hide-text .main-rootlist-rootlistContent span,
html.sidebar-hide-text .main-rootlist-rootlistItem span,
html.sidebar-hide-text .GlueDropTarget span {
    display: none;
}

.main-rootlist-rootlist {
    margin-top: 0;
}

.main-rootlist-rootlist::before,
.main-rootlist-rootlist::after {
    z-index: 10;
    position: absolute;
    content: "";
    left: 0px;
    right: 0px;
    pointer-events: none;
    transition: height 0.5s ease;
}

.main-rootlist-rootlist.no-top-shadow::before {
    height: 0px;
}

.main-rootlist-rootlist.no-bottom-shadow::after {
    height: 0px;
}

.main-rootlist-rootlist::before {
    top: 0px;
    height: 5%;
    background: linear-gradient(to bottom, spiceColor("sidebar") 10%, transparent);
}

.main-rootlist-rootlist::after {
    bottom: 0px;
    height: 15%;
    background: linear-gradient(to top, spiceColor("sidebar") 10%, transparent);
}

.Root__nav-bar .os-scrollbar-vertical,
.main-buddyFeed-buddyFeedRoot .os-scrollbar-vertical {
    display: none;
}

.main-topBar-historyButtons {
    display: flex;
    align-items: center;
    gap: 8px;

    .main-topBar-button {
        margin: 0px;
        background-color: unset;
        width: 24px;
        height: 24px;
    }
}

.main-topBar-historyButtons svg {
    color: spiceColor("button");
    fill: spiceColor("button");
}

.playback-bar__progress-time,
.playback-bar__progress-time-elapsed,
.main-playbackBarRemainingTime-container {
    display: none;
}

.playback-bar {
    position: absolute;
    width: var(--main-view-width);
    left: var(--sidebar-width);
    bottom: calc(var(--main-gap) + var(--bar-height) - 12px / 2);
}

.Root.is-connectBarVisible .playback-bar {
    bottom: calc(var(--main-gap) + var(--bar-height) + 24px - 12px / 2);
}

.main-nowPlayingWidget-coverArt .cover-art {
    width: var(--bar-cover-art-size) !important;
    height: var(--bar-cover-art-size) !important;
}

.player-controls__buttons {
    margin-bottom: 0;
    width: 192px;
}

.progress-bar {
    --progress-bar-height: 2px;
    --fg-color: #{spiceColor("button")};
    --bg-color: #{spiceColor("text", 0.2)};
}

.progress-bar__slider {
    display: block !important;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar:hover .progress-bar__slider,
.progress-bar:active .progress-bar__slider {
    opacity: 1;
}

#main[playbar-transition] {
    .progress-bar:not(:active) .x-progressBar-progressBarBg > div:first-child > div {
        transition: transform var(--playbar-movement-anim-speed) ease;
    }

    .progress-bar:not(:active) .progress-bar__slider {
        transition-property: left, opacity;
    }
}

.playback-bar .prog-tooltip {
    position: absolute;
    min-width: 100px;
    top: -35px;
    left: 50%;
    transform: translateX(calc(-50%));
    padding: 0 5px;
    border-radius: 4px;
    text-align: center;
    color: spiceColor("text");
    background-color: spiceColor("button");
    pointer-events: none;
}

.playback-bar:not(:active) .prog-tooltip {
    transition: transform var(--playbar-movement-anim-speed) ease;
}

.minimal-player .player-controls__buttons {
    width: 120px;
    gap: 0px;
}

.minimal-player .player-controls__left,
.minimal-player .player-controls__right {
    --button-size: 16px !important;
    gap: 0px;
}

.minimal-player .volume-bar {
    flex: 0 1 70px;
}
.extra-minimal-player .player-controls__buttons {
    width: 64px;
}
.extra-minimal-player .main-shuffleButton-button,
.extra-minimal-player .main-repeatButton-button,
.extra-minimal-player .ExtraControls__connect-device-picker,
.extra-minimal-player .volume-bar .progress-bar-wrapper {
    display: none;
}
.extra-minimal-player .volume-bar {
    flex: 0 0 32px;
}

.main-trackInfo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    &.left {
        align-items: flex-start;
    }
}

.main-trackInfo-name {
    font-weight: 500;
}

.main-trackInfo-release a {
    color: spiceColor("subtext");

    &:hover,
    &:active {
        color: spiceColor("text");
    }
}

#main-trackInfo-year {
    display: block;

    #main[playbar-album-info="false"] & {
        display: none;
    }
}

.main-topBar-topbarContent .main-playButton-PlayButton {
    --size: 35px !important;
}

.main-entityHeader-image {
    border-radius: 5px;
}

.main-entityHeader-metaDataText,
.main-duration-container {
    color: spiceColor("subtext");
}

/** Sidebar */
.main-rootlist-rootlist .os-content {
    padding: 0 0 8px 0 !important;
}

.main-rootlist-rootlistDividerContainer {
    display: none;
}

.main-rootlist-rootlistItem a {
    align-items: center;
    border-radius: 4px;
    display: flex;
    height: 56px;
    padding: 0 12px;
}

.playlist-picture {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    border-radius: var(--sidebar-icons-border-radius);

    &[type="icon"] {
        padding: 2px;
    }
}

.main-rootlist-rootlistItem a span {
    margin-left: 24px;
}

.main-rootlist-rootlistItem {
    padding-left: calc(var(--indentation) * var(--left-sidebar-item-indentation-width));
    padding-right: 0;
    transition: padding-left 0.5s ease;
}

html.sidebar-hide-text .main-rootlist-rootlistItem {
    padding: 0;
}

.main-rootlist-dropIndicator {
    background: spiceColor("selected-row");
    height: 2px;
}

.main-rootlist-rootlistPlaylistsScrollNode {
    padding: 0px;
}

.main-collectionLinkButton-icon,
.main-createPlaylistButton-icon {
    margin: 0px;
}

.main-navBar-navBarLink,
.main-collectionLinkButton-collectionLinkButton,
.main-createPlaylistButton-button {
    gap: 24px;
    height: 56px;
}

li.GlueDropTarget {
    padding: 0 8px;
}

/** OS-specific window controls dodge */
#main:not([top-bar^="none"]) {
    .main-topBar-background,
    .main-topBar-topbarContent {
        -webkit-app-region: no-drag;
    }
}

#main:not([top-bar="none-padding"]) {
    .main-navBar-navBar,
    .main-buddyFeed-header,
    .main-navBar-entryPoints {
        padding-top: 8px !important;
    }
}

#main:not([top-bar^="none"]) {
    padding-top: 31px;
}

#main:not([top-bar^="none"])::before {
    z-index: 999;
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    right: 135px;
    height: 31px;
    background-color: rgba(0, 0, 0, 0.53);
    -webkit-app-region: drag;
    pointer-events: none;
}

#main[top-bar="solid"]::before {
    right: 0px;
    background-color: black;
}

#main[top-bar="none-padding"] .spotify__os--is-windows .main-navBar-navBar {
    padding-top: 24px;
}

#main[top-bar="none-padding"] .spotify__container--is-desktop:not(.fullscreen).spotify__os--is-windows .main-navBar-entryPoints {
    padding-top: 22px;
}

#main[top-bar="none-padding"] .spotify__os--is-windows .main-buddyFeed-header {
    padding-top: 32px;
}

.main-topBar-container {
    display: flex;
    gap: 8px;
    max-width: unset;
    padding: 16px 32px !important;
}

/** Custom elements */
.dribs-playlist-list {
    padding-bottom: 86px;
}

#dribbblish-back-shadow {
    position: fixed;
    width: var(--main-view-width);
    height: calc(var(--main-view-height) + var(--bar-height));
    box-shadow: 0 0 10px 3px #0000003b;
    border-radius: var(--main-corner-radius);
    z-index: 2;
    pointer-events: none;
}

/** Rearrange player bar */
.main-nowPlayingBar-left {
    order: 1;
    flex: 1;
    width: auto;
    min-width: 0 !important;
}

.main-nowPlayingBar-center {
    order: 0;
    flex: 1;
    width: auto;
    min-width: unset !important;
}

.main-nowPlayingBar-right {
    order: 2;
    flex: 1;
    width: auto;
    min-width: unset !important;

    button {
        span {
            display: block !important;
            color: spiceColor("subtext");
        }

        &:hover span,
        &.control-button--active span {
            color: spiceColor("text");
        }
    }
}

.main-nowPlayingWidget-nowPlaying {
    justify-content: center;

    & button {
        color: spiceColor("subtext");

        &:hover {
            color: spiceColor("text");
        }
    }
}

.player-controls {
    justify-content: flex-start;
    flex-direction: row;
}

.main-playPauseButton-button {
    background-color: transparent;
}

.main-playPauseButton-button svg {
    width: 32px !important;
    height: 32px !important;
    color: spiceColor("button");
}

/* Spotify style player bar */
#main[player-controls="spotify"] .main-nowPlayingBar-left {
    order: 0;
}

#main[player-controls="spotify"] .main-nowPlayingBar-center {
    order: 1;
}

#main[player-controls="spotify"] .main-nowPlayingWidget-nowPlaying {
    justify-content: left;
}

#main[player-controls="spotify"] .player-controls {
    justify-content: center;
}

/** Main container */
.contentSpacing,
.artist-artistDiscography-headerContainer {
    padding-left: 64px;
    padding-right: 64px;
}

@media (min-width: 1024px) {
    .contentSpacing,
    .artist-artistDiscography-headerContainer {
        padding-left: 128px;
        padding-right: 128px;
    }
}

.main-collectionLinkButton-collectionLinkButton .main-collectionLinkButton-icon,
.main-collectionLinkButton-collectionLinkButton .main-collectionLinkButton-collectionLinkText,
.main-createPlaylistButton-button {
    opacity: 1;
}

.main-collectionLinkButton-collectionLinkText,
.main-createPlaylistButton-text,
.main-navBar-navBarLink > span,
.main-rootlist-rootlistItemLink > span {
    @include spiceFont("info", 14px, "Regular");
    letter-spacing: normal;
    line-height: 20px;
    text-transform: none;
}

.main-likedSongsButton-likedSongsIcon,
.main-yourEpisodesButton-yourEpisodesIcon,
.main-createPlaylistButton-createPlaylistIcon {
    background: unset !important;
}

.main-createPlaylistButton-icon,
.main-collectionLinkButton-icon,
.main-createPlaylistButton-icon {
    height: 40px;
}

.main-likedSongsButton-likedSongsIcon svg,
.main-yourEpisodesButton-yourEpisodesIcon svg,
.main-createPlaylistButton-createPlaylistIcon svg {
    fill: spiceColor("sidebar-text");
    width: 32px;
    height: 32px;
}
.main-yourEpisodesButton-yourEpisodesIcon svg path {
    fill: spiceColor("sidebar-text");
}

/** Grid */
.Root__top-container {
    grid-template-areas:
        "nav-bar main-view buddy-feed"
        "nav-bar now-playing-bar buddy-feed";
    padding: var(--main-gap) 0;
}

html:not(.buddyfeed-visible) .Root__top-container {
    padding-right: var(--main-gap);
}

/** Minimal profile button */
span.main-userWidget-displayName,
.main-userWidget-box svg {
    display: none;
}

/** Sidebar config */
#dribs-hidden-list {
    background-color: spiceColor("main", 0.3);
}

#dribs-sidebar-config {
    position: relative;
    width: 100%;
    height: 0;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    top: -30px;
    left: 0;
}

#dribs-sidebar-config button {
    min-width: 60px;
    border-radius: 3px;
    background-color: spiceColor("main");
    color: spiceColor("text");
    border: 1px solid spiceColor("text");
}
#dribs-sidebar-config button:disabled {
    color: spiceColor("button-disabled");
}

.main-navBar-entryPoints {
    --left-sidebar-padding-left: 24px;
    --left-sidebar-padding-right: 24px;

    padding: 0px 8px;
}

.main-navBar-navBar .main-rootlist-wrapper > div:nth-child(2),
.main-navBar-entryPoints,
#spicetify-show-list,
.main-rootlist-rootlistContent .os-content {
    display: flex;
    flex-direction: column;
    gap: var(--sidebar-gap-left);
}

.main-buddyFeed-scrollableArea ol {
    display: flex;
    flex-direction: column;
    gap: var(--sidebar-gap-right);
}

.main-buddyFeed-friendActivity {
    padding: 0px 16px;
}

#spicetify-show-list:empty {
    display: none;
}

.main-rootlist-wrapper > div:nth-child(2) > li img,
.main-navBar-navBarLink > svg,
.main-navBar-navBarLink > .icon,
.main-rootlist-rootlistItemLink > svg {
    z-index: 1;
}

.main-collectionLinkButton-collectionLinkButton,
.main-createPlaylistButton-button {
    position: relative;
}

.main-navBar-navBarLink::before,
.main-collectionLinkButton-collectionLinkButton::before,
.main-createPlaylistButton-button::before,
.main-rootlist-rootlistItemLink::before {
    content: "";
    position: absolute;
    width: 100%;
    inset: 0px;
    left: -200%;
    opacity: 0.4;
    background-color: black;
    border-radius: var(--sidebar-icons-border-radius);
    pointer-events: none;
    transition: all calc(var(--sidebar-icons-hover-animation) * 0.2s) ease;
    transition-property: left, opacity;
}

.main-navBar-navBarLink:hover::before,
.main-collectionLinkButton-collectionLinkButton:hover::before,
.main-createPlaylistButton-button:hover::before,
.main-rootlist-rootlistItemLink:hover::before,
.main-navBar-navBarLinkActive::before,
.main-collectionLinkButton-selected::before {
    left: 0px;
}

.main-navBar-navBarLinkActive:hover::before,
.main-collectionLinkButton-selected:hover::before {
    opacity: 0.6;
}

.main-rootlist-rootlist .main-navBar-navBarItem:hover::before {
    margin: 0 8px;
}

.main-navBar-navBarLinkActive,
.main-collectionLinkButton-selected {
    background-color: transparent;
}

.main-navBar-navBar a:hover,
.main-navBar-navBar a:hover span {
    color: spiceColor("sidebar-text") !important;
}

div.GlueDropTarget.personal-library {
    padding: 0px;
}
div.GlueDropTarget.personal-library > * {
    padding: 0 16px;
    height: 56px;
    border-radius: 4px;
}

div.GlueDropTarget.personal-library > *.active {
    background: transparent;
}

/** Big cover, small cover */
.main-coverSlotExpanded-container {
    position: fixed;
    z-index: 2;
    width: 250px;
    height: 250px;
    bottom: calc(var(--main-gap) + var(--bar-height) + 10px);
    left: calc(var(--sidebar-width) + 10px);
}

.Root.is-connectBarVisible .main-coverSlotExpanded-container {
    bottom: calc(var(--main-gap) + var(--bar-height) + 24px + 10px);
}

html.right-expanded-cover .main-coverSlotExpanded-container {
    right: calc(var(--main-gap) * 2);
    left: unset;
}

html.right-expanded-cover.buddyfeed-visible .main-coverSlotExpanded-container {
    right: calc(var(--main-gap) + var(--buddy-feed-width));
    left: unset;
}

.main-coverSlotExpanded-container img {
    border-radius: 4px;
}

.cover-art {
    border-radius: 4px;
}

.main-nowPlayingWidget-coverExpanded .main-coverSlotCollapsed-container {
    opacity: 0;
    width: 10px;
    pointer-events: none;
}

.main-nowPlayingWidget-coverExpanded {
    transform: translateX(0px);
}

#main[player-controls="spotify"] .main-nowPlayingWidget-coverExpanded {
    transform: translateX(-27px);
}

/** Mini dribbblish */
.x-categoryCard-CategoryCard > div {
    background-color: spiceColor("main");
    width: calc(100% - 14px);
    height: calc(100% - 6px);
    margin: 3px 10px;
    border-radius: 5px;
}

.x-categoryCard-CategoryCard {
    height: 100px;
}

.x-categoryCard-image {
    width: 50px !important;
    height: 50px !important;
}

.x-heroCategoryCard-HeroCategoryCard > div {
    background-color: spiceColor("main");
    width: calc(100% - 20px);
    height: calc(100% - 6px);
    margin: 3px 16px;
    border-radius: 5px;
}

.connect-device-list-item:focus,
.connect-device-list-item:hover {
    background-color: spiceColor("selected-row", 0.3);
}

/* 1.1.56 */
.main-navBar-navBar {
    width: var(--sidebar-width) !important;
}

.main-entityHeader-container.main-entityHeader-nonWrapped {
    padding-left: 64px;
    padding-right: 64px;
}

@media (min-width: 1024px) {
    .main-entityHeader-container.main-entityHeader-nonWrapped {
        padding-left: 128px;
        padding-right: 128px;
    }
}

.main-userWidget-dropDownMenu > li > button {
    color: spiceColor("selected-row", 0.7);
    padding-left: 8px;
    text-decoration: none;
}
.main-userWidget-dropDownMenu > li > button:hover,
.main-userWidget-dropDownMenu > li > button:focus {
    color: spiceColor("text");
}

.main-userWidget-dropDownMenu svg {
    position: unset;
}
.main-userWidget-dropDownMenu > li svg {
    position: absolute;
}
.main-buddyFeed-buddyFeed.main-buddyFeed-buddyFeed-expanded {
    z-index: 4;
}

.main-actionBar-ActionBarRow button:not(.main-playButton-primary) {
    color: spiceColor("subtext");
}

/* explicit icon */
.main-tag-container {
    background-color: spiceColor("text");
}
/* progressbar tooltip text color */
.playback-bar .prog-tooltip {
    color: spiceColor("sidebar-text") !important;
}

/* edit button of CustomApps */
.reddit-sort-container button.switch,
.new-releases-header button.switch,
.lyrics-tabBar-header button.switch {
    background-color: spiceColor("subtext", 0.15) !important;
    color: spiceColor("text");
}

.reddit-sort-container button.switch:hover,
.new-releases-header button.switch:hover,
.lyrics-tabBar-header button.switch:hover {
    background-color: spiceColor("subtext", 0.3) !important;
}

.lyrics-lyricsContainer-LyricsBackground {
    background: linear-gradient(180deg, transparent 0px, transparent 60px, var(--lyrics-color-background) 61px) !important;
}

/* big cover opacity on hover */
.main-coverSlotExpanded-container:hover .cover-art,
.main-coverSlotExpanded-container:hover img {
    opacity: 0.5;
}

.collection-collectionEntityHeroCard-likedSongs,
.collection-collectionEntityHeroCard-likedSongs .main-cardHeader-link,
.collection-collectionEntityHeroCard-likedSongs .collection-collectionEntityHeroCard-descriptionContainer,
.x-heroCategoryCard-heroTitle,
.main-rootlist-expandArrow:focus,
.main-rootlist-expandArrow:hover,
.main-rootlist-textWrapper:focus,
.main-rootlist-textWrapper:hover {
    color: spiceColor("sidebar-text") !important;
}

/* translucent background cover */
.Root__top-container::before {
    z-index: 3;
    content: "";
    position: absolute;
    inset: var(--main-gap) var(--buddy-feed-width) var(--main-gap) var(--sidebar-width);
    pointer-events: none;
    background-image: var(--image-url);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    filter: blur(15px);
    border-radius: var(--main-corner-radius);
    opacity: lightOffset(0.07, 0.03);
    transition: background-image var(--song-transition-speed) linear;

    html:not(.buddyfeed-visible) & {
        inset: var(--main-gap) 0px var(--main-gap) var(--sidebar-width);
    }
}

// Fix lyrics-plus having a scrollbar when top-bar is `solid` or `transparent`
.lyrics-lyricsContainer-LyricsContainer {
    height: 100% !important;
}
.main-view-container__scroll-node-child {
    height: 100%;
    padding-bottom: 0px;
}

// Hide default Sporify "Offline" notice
.main-noConnection {
    display: none;
}

// ! WORKAROUNDS / TEMP FIXES
// Spotify UI breaks after advertisements #63
canvas[width="250"][height="250"] {
    display: none;
}

// workaround to remove gradient near album info #103
.main-trackInfo-container > div > div:before,
.main-trackInfo-container > div > div:after {
    display: none;
}

// workaround to re-center track-info
#main:not([player-controls="spotify"]) .main-trackInfo-container > div > div > div {
    display: flex;
    justify-content: center;
}
