* {
    box-sizing: border-box;
}

/* Font */
@font-face {
    font-family: 'Antartica';
    src: url("./font/Antarctica VAR-VF.ttf");
}

@font-face {
    font-family: 'Cardo';
    src: url("./font/Cardo-Regular.ttf");
}

@font-face {
    font-family: 'Cardo';
    src: url("./font/Cardo-Bold.ttf");
    font-weight: bold;
}

@font-face {
    font-family: 'Cardo';
    src: url("./font/Cardo-Italic.ttf");
    font-style: italic;
}



/* Split layout */
body {
    margin: 0;

    --fg: black;
    --bg: #ffffff;
    --bg-darker: #CFCCC8;
    --bg-darkest: #ada7a0;
    /* --highlight: rgba(255, 255, 255, .65); */
    --highlight: #455b5b2d;
    /* --highlight-light: rgba(255, 255, 255, .35); */
    --highlight-light: #455b5b12;
    --gutman-red: #bb1515;
    --gutman-red-light: #bb15156d;

    --marble-green: #2e4348;
    --marble-green-highlight: #455b5b57;

    --button-bg: #e2e4d1;
    
    /* font-family: 'PP Neue Montreal'; */
    font-family: 'Cardo';
    line-height: 1.5;
    font-weight: 350;
    /* font-size: clamp(1rem, 0.913rem + 0.435vw, 1.25rem); */
}

.description {
    font-size: 16px;
    line-height: 1.75;
    padding: 10px;
}


.split,
.cover {
    height: 100vh;
}


.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
}

.cover {
    width: 100%;
    background-image: url('./img/Poster\ with\ marmer.webp');
    background-size: cover;
    background-position: center center;
    display: flex;
    justify-content: end;
    flex-direction: column;
    /*! align-items: center; */
    height: 100vh;
}

.cover .artists .text,
.cover .cover-title {
    max-width: 600px;
    width: 100%;
}

.cover .cover-title {
    color: white;
    /* font-size: 92px; */
    font-size: clamp(4rem, 0.946rem + 6.522vw, 9.2rem);
    /* font-size: clamp(2.25rem, -0.446rem + 13.478vw, 10rem); */
    line-height: 1;
    padding: 2vw;
    font-weight: 100;

    /* max-width: 800px; */
}

.cover .artists {
    background: white;
    display: flex;
    justify-content: center;
    height: max-content;
    width: 100%;
    font-size: clamp(.5rem, 1rem + 6.522vw, 1rem);

    /* text-align: center; */
}


span.o {
    display: flex;
}
.cover .artists .text {
    padding: 20px 20px;
}

#music-player {
    /* --width: 300px;
    --height: 400px; */

    /* background: lightblue; */
    height: 100%;
    width: 100%;

    /* border-radius: 5px; */
    /* overflow-y: hidden; */
    /* border: 2px solid blue; */
    position: relative;
    z-index: 1000;

    background-color: var(--bg);

    /* box-shadow: 0px 0px 20px 0px lightblue ; */
    overflow: scroll;
}

#controls-and-cover {
    display: flex;
    flex-direction: column;
}

#controls {
    /* height: max-content; */
    height: 135px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /* background-color: var(--bg-darker); */
    background-color: var(--marble-green);
    background-image: url("./img/marmer.webp");
    background-size: 100%;
    background-position: center center;
    color: var(--button-bg);
    padding: 10px;
    padding-top: 0;

    position: fixed;
    bottom: -20px;
    width: 50%;

    gap: 10px;
}

#controls #buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    position: relative;
    bottom: 35px;
}

#controls button {
    aspect-ratio: 1;
    width: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0;
    background: var(--button-bg);
}

#controls button:hover {
    background-color: white;
}

#controls button img {
    width: 20px;
}

#controls #progress {
    width: 100%;
    display: none;
}

#controls button.play-pause {
    width: 60px;
    background-image: url('./img/play.svg');
    /* background-size: 200px; */
    background-position: center;
    background-repeat: no-repeat;
}

body.playing button.play-pause {
    background-image: url('./img/pause.svg') !important;
}


#tracklist {
    padding: 5vh 5vw;
    min-height: 80vh;
    line-height: 2;
    font-weight: 300;
    max-width: 50em;
    margin: auto;
    padding-bottom: 15vh;
}

#tracklist .composer,
#tracklist .track {
    font-size: clamp(1rem, 0.913rem + 0.435vw, 1.25rem);
    padding: 0 10px;
}

#tracklist .composer {
    font-weight: 600;
    line-height: 1.25;
    border-bottom: 1px solid var(--bg-darker);
    padding-bottom: .4em;
    cursor: pointer;
    position: relative;

}

#tracklist .track {
    /* margin-bottom: 10px; */
    /* padding: 5px 10px; */
    border-radius: .5em;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

#tracklist .title {
    /* font-weight: bold; */
}

#tracklist .title span {
    width: 2em;
    display: inline-flex;
    /* opacity: .5; */
}

#tracklist .track.current {
    /* background-color: rgba(240, 255, 255, 0.606); */
    background-color: var(--highlight);
}

#tracklist .track:not(.current):hover {
    /* background-color: rgba(240, 255, 255, 0.3); */
    background-color: var(--highlight-light);
}

#tracklist .duration {
    opacity: .3;
}


/* New progress bar */
.progress {
    top: -10px;
    width: 100%;
    position: relative;
    top: -35px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress .inner {
    background: white;
    height: 5px;
    width: 100%;
    position: relative;
    pointer-events: none;
    border-radius: 2px;
}

.progress .fill {
    width: var(--progress);
    background: #80a376;
    height: 100%;
    border-radius: 2px;
    pointer-events: none;
}

.progress .fill .handle {
    height: 18px;
    width: 3px;
    background: #e56441;
    z-index: 2;
    position: relative;
    left: 100%;
    top: -6px;
    border-radius: 2px;
}

.progress .handle-hover {
    height: 18px;
    width: 3px;
    background: #e56441;
    z-index: 2;
    position: absolute;
    left: var(--progress-hover);
    top: -6px;
    border-radius: 2px;
    opacity: 0;
    transition: opacity .125s;
}

.progress:hover .handle-hover {
    opacity: 1;
}

.progress,
.progress .fill {
    border-radius: 2px 0px 0px 2px;
}

.time-elapsed-remaining {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: -53px;
    pointer-events: none;
    /* opacity: .4; */
    opacity: .6;
}

.cover .artists br {
    display: none;
}

.cover .artists strong {
    font-weight: 550;
}

.current-track-title {
    position: relative;
    bottom: 10px;
    margin-top: -31px;
}



/* Mobile version */
/* @media (max-aspect-ratio:1/1) { */
@media (max-width: 768px) {
    .split {
        display: flex !important;
        flex-direction: column;
    }

    .cover {
        aspect-ratio: 1/1.6;
    }

    .cover .artists .text {
        padding: 10px 20px;
    }

    .cover-title {
        padding: 20px !important; 
    }

    #controls {
        width: 100% !important;
    }

    #tracklist {
        padding: 20px !important;
        padding-bottom: 20vh !important;
        height: unset;
    }

    .cover .artists br {
        display: unset;
    }

    .password {
        height: 100% !important;
        border-top: 1px solid var(--bg-darker);
        position: fixed !important;
        top: 0;
    }
    
    #music-player {
        overflow: unset !important;
    }
}



/* Password */
.password {
    display: flex;
    width: 100%;
    height: 100vh;
    position: absolute;
    background: white;
    z-index: 2;
    /* opacity: .95; */

    justify-content: center;
    align-items: center;

    --height: 40px;
    --border-radius: 5px;
}

.password.hidden {
    display: none;
}

.password .inner {
    display: flex;
    flex-direction: column;
    height: max-content;
    gap: 30px;
}

.password h3 {
    margin: 0;
    font-weight: 550;
}

.password p {
    margin: 0;
    line-height: 1.2;
    max-width: 300px;
}

input#password {
    height: var(--height);
    border: 2px solid;
    border-radius: 5px;
    padding: 0 15px;
    font-size: inherit;
    font-family: inherit;
    /* outline-color: var(--bg) !important; */
}


input#password:focus {
    outline: 2px solid var(--bg-darkest);
}

.password.try-again input#password {
    outline: 2px solid var(--gutman-red-light);
    border-color: var(--gutman-red);
}


.password button {
    height: var(--height);
    background-color: black;
    color: white;
    border-radius: var(--border-radius);
    border: 2px solid black;
    font-family: inherit;
    font-size: inherit;
    font-weight: bold;
}

.password button:hover {
    background-color: transparent;
    color: black;
    cursor: pointer;
}


/*  */
.o-icon {
    /*! width: 50%; */
}


/* Details text */
.description {
    white-space: pre-wrap;
    border-bottom: 1px solid var(--bg-darker);
    /*! padding-bottom: 0; */
}

details[open]>summary:before {
    /* transform: rotate(90deg); */
}

summary:before {
    content: 'info';
    /* border-width: .4rem;
    border-style: solid;
    border-color: transparent transparent transparent var(--bg-darkest); */
    position: absolute;
    /* top: 0.3rem; */
    top: 0rem;
    /* right: 1rem; */
    right: 10px;
    transform: rotate(0);
    transform-origin: .2rem 50%;
    transition: .25s transform ease;

    color: var(--bg-darkest);
    font-weight: normal;
}

summary:hover:before {
    color: var(--fg) !important;
}

details summary::-webkit-details-marker,
details summary::marker {
    display: none;
}

summary {
    list-style: none;
}



.o-icon {
max-width: 90%;
}


@media(max-width: 768px) {
    .cover { 
        height: 80vh !important;
    }    
}


