@import url("../main.css");

/*************** GLOBAL VARIABLES ***************/
:root {
    /*********** TEXT ***********/
    --text-explicit: #ffffff;

    /******** BACKGROUND ********/
    --bg-playlist-search: #ffffff;
    --bg-explicit: #000000;
}

/********************* MAIN *********************/
main {
    /* Layout */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/**************** SPOTIFY IFRAME ****************/
/* Most styles handled by Spotify (cross-origin) */

/*************** PLAYLIST FILTERS ***************/
.playlist-filters {
    /* Layout */
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;

    /* Apperance */
    background-color: var(--bg-card-primary);
    border: 1px solid color-mix(
        in srgb,
        var(--bg-card-primary),
        #000000 20%
    );
    border-radius: 1rem;
}

.playlist-search {
    /* Layout */
    display: flex;
    align-items: center;
    padding: .5rem 1rem;
    border-radius: .5rem;
    gap: .5rem;

    /* Apperance */
    background-color: var(--bg-playlist-search);
    border: 1px solid color-mix(
        in srgb,
        var(--bg-playlist-search),
        #000000 20%
    );
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.playlist-search input {
    /* Layout */
    width: 100%;
    
    /* Apperance */
    font-family: var(--font-body);
    background-color: var(--bg-playlist-search);
    border: none;
}

.playlist-search input:focus {
    /* Apperance */
    outline: none;
}

.playlist-filter-group {
    /* Layout */
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.playlist-filter-header {
    /* Layout */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.playlist-filter-clear {
    /* Apperance */
    font-family: var(--font-body);
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    opacity: .8;
    transition: opacity 0.2s ease;
}

.playlist-filter-clear:hover {
    /* Apperance */
    opacity: 1;
}

.playlist-pills {
    /* Layout */
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.playlist-pill {
    /* Layout */
    padding: .5rem 1rem;
    
    /* Apperance */
    font-family: var(--font-body);
    background-color: var(--bg-button);
    color: var(--text-primary);
    border: 1px solid color-mix(
        in srgb,
        var(--bg-button),
        #000000 20%
    );
    border-radius: .5rem;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.playlist-pill:hover {
    /* Apperance */
    background-color: var(--bg-button-hover);
}

.playlist-pill.active {
    /* Apperance */
    background-color: var(--bg-button-active);
}

.playlist-no-results {
    /* Layout */
    text-align: center;
    padding: 2rem 1rem;

    /* Apperance */
    font-style: italic;
}

/******************* PLAYLIST *******************/
.playlist {
    /* Layout */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.song {
    /* Layout */
    display: flex;
    gap: 1rem;
    padding: 1rem;

    /* Apperance */
    border-radius: 1rem;
    border: 1px solid var(--border-primary);
}

.song img {
    /* Layout */
    display: block;
    box-sizing: border-box;
    width: 200px;
    height: 200px;

    /* Apperance */
    border-radius: .5rem;
    border: 1px solid var(--border-primary);
}

.song-content {
    /* Layout */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.song-title {
    /* Layout */
    display: flex;
    align-items: center;
    gap: .5rem;
}

.explicit-tag {
    /* Layout */
    padding: .1rem .3rem;
    font-size: 50%;

    /* Apperance */
    background: var(--bg-explicit);
    color: var(--text-explicit);
    border-radius: .2rem;
    font-weight: bold;
}

.song-artist {
    /* Apperance */
    opacity: .8;
}

.song-description {
    /* Layout */
    min-height: 4lh;
    max-height: 4lh;
    overflow-y: auto;

    /* Appearance */
    scrollbar-color: var(--text-primary) transparent;
}

.song-triggers-suggest, 
.song-triggers-add,
.song-lyrics {
    /* Layout */
    width: fit-content;

    /* Appearance */
    text-decoration: none;
    opacity: .7;
}

.song-triggers-add {
    /* Layout */
    padding-left: .3rem;
}

.song-triggers-suggest:hover,
.song-triggers-add:hover,
.song-lyrics:hover {
    /* Appearance */
    opacity: 1;
}

/* mobile */
@media (max-width: 768px) {
    
    /**************** SPOTIFY IFRAME ****************/
    .playlist iframe {
        /* Layout */
        height: 152px;
    }

    /******************* PLAYLIST *******************/
    .song {
        /* Layout */
        padding: .5rem;
        gap: .5rem;
        font-size: 65%;
    }

    .song img {
        /* Layout */
        width: 100px;
        height: 100px;
    }

    /*************** PLAYLIST FILTERS ***************/
    .playlist-filters {
        /* Layout */
        padding: .5rem;
        gap: 1rem;
    }

    .playlist-filter-header {
        /* Layout */
        gap: .5rem;
    }

    .playlist-filter-clear {
        /* Layout */
        font-size: 65%;
    }

    .playlist-pill {
        /* Layout */
        padding: .2rem .5rem;
        border-radius: .3rem;
        font-size: 65%;
    }
}