/*** vars ***/
:root {
    --marker-info-width: 450px;
    --color-main: #B31942;
    --color-secondary: #0A3161;
    --color-black: #333;
    --color-white: #fff;
    --color-gray: #ccc;
}

/*** Basic general css rules ***/
*, *:before, *:after {
    box-sizing: border-box;
}

/*** Main tags and classes ***/

html {
    font-size: 62.5%;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--color-black);
    background: var(--color-white);
}

body.landing-open {
    overflow: hidden;
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

a {
    transition: all .3s;
    color: var(--color-main);
    text-decoration: none;
}

p {
    margin-bottom: 1.5rem;
}

button {
    transition: all .3s;
}

.button {
    display: inline-block;
    height: 35px;;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
    background: transparent;
    cursor: pointer;
    margin-bottom: 15px;
}

.button i {
    margin-left: 5px;
}

.main-container {
    display: flex;
}

.tertiary-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

/** Components **/
.admin-tool-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    border: 1px solid var(--color-gray);
    background-color: var(--color-white);
    color: var(--color-black);
    transition: all .3s;
    font-weight: bold;
}

.admin-tool-button span.left {
    margin-right: 3px;
    margin-left: 2px;
}

.admin-tool-button span.right {
    margin-left: 3px;
    margin-right: 2spx;
}

.admin-tool-button:hover {
    background-color: var(--color-gray);
}

/** Landing **/
.landing {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing.closed {
    display: none;
}

.landing-content {
    max-width: 600px;
    width: 100%;
    padding: 20px;
}

.landing-title {
    font-size: 3.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--color-main);
}

.landing-text {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.6rem;
    color: var(--color-secondary);
}

.landing-button {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    border: 1px solid var(--color-main);
    border-radius: 5px;
    background-color: var(--color-main);
    color: var(--color-white);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    margin-top: 50px;
}

.landing-button:hover {
    background-color: var(--color-white);
    color: var(--color-main);
}

/** Admin tools **/
.admin-tools {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 100;
    transition: all .3s;
}

.admin-tools.hidden {
    transform: translateX(-300%);
}

.admin-tools .admin-tool-button {
    margin-bottom: 10px;
}

/*** Map ***/
#map {
    width: calc(100% - var(--marker-info-width));
    height: calc(100vh - 50px);
    position: fixed !important;
    left: 0;
    top: 0;
    transition: width 0.5s;
    overflow: hidden !important;
}

#map .info-window-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
    text-align: center;
}

#map .info-window-text {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--color-black);
    text-align: center;
}

.admin-bar #map {
    height: calc(100vh - 32px);
    top: 32px;
}

#map.full-screen {
    width: 0;
}

#map.wider {
    width: 40%;
}

/*** Marker info ***/
.markers-info {
    margin-left: calc(100% - var(--marker-info-width));
    min-height: 100vh;
    width: var(--marker-info-width);
    background: white;
    transition: width 0.5s, margin-left 0.5s;
    position: relative;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
}


/* Markers info tools : fullscreen, wider */
.markers-tools {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    right: 450px;
    border-right: 1px solid var(--color-gray);
    background: white;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.5s;
}

body.wider .markers-tools {
    right: 60%;
}

body.full-screen .markers-tools {
    right: 100%;
    transform: translateX(100%);
}

.open-wider {
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s;
}

.open-full-screen {
    padding: 10px;
    cursor: pointer;
    border-top: 1px solid var(--color-gray);
    transition: all 0.3s;
}

.open-full-screen:hover, .open-wider:hover {
    opacity: 0.7;
}

body.full-screen .open-full-screen {
    border-bottom: 1px solid var(--color-gray);
}

/*** Single marker info ***/
.marker-info {
    padding-bottom: 70px;
}

.marker-info-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--color-main);
    padding: 10px 20px;
    color: var(--color-white);
}

body.full-screen .marker-info-title {
    padding-left: 60px;
}

.marker-info-subtitle {
    font-style: italic;
    padding: 5px 20px;
    font-size: 1.4rem;
    ;
    color: var(--color-secondary);
}

body.full-screen .marker-info-subtitle {
    padding-left: 60px;
}

.marker-info-content {
    padding: 30px 20px 20px;
}

.marker-info-content a {
    font-weight: 700;
}

.marker-info, .marker-planned, .marker-really-done {
    display: none;
}

.marker-planned.active, .marker-really-done.active {
    display: block;
}

.marker-tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.marker-tab {
    width: 50%;
    margin: 15px 0;
    padding: 10px;
    border: 2px solid transparent;
    background-color: #bdc3c7;
    color: black;
    cursor: pointer;
    transition: all .3s;
}

.marker-tab.active {
    position: relative;
    background: var(--color-main);
    color: white;
    cursor: default;
}

.marker-tab:not(.active):hover {
    border: 2px dashed var(--color-main);
}

.marker-tab.active:after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--color-main);
}

.markers-info.wider {
    width: 60%;
    margin-left: 40%;
}

.markers-info.full-screen {
    width: 100%;
    margin-left: 0;
}

.marker-done {
    color: var(--color-main);
}

.marker-info .edit-post-link {
    position: fixed;
    top: 20px;
    right: 20px;
}


.marker-buttons {
    display: flex;
    justify-content: flex-end;
    position: fixed;
    right: 0;
    bottom: 0;
    width: 450px;
    max-width: 100%;
    transition: all .5s;
    z-index: 99;
}

body.wider .marker-buttons {
    width: 60%;
}

body.full-screen .marker-buttons {
    width: 100%;
}

.marker-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    width: 50%;
    padding: 0 1rem;
    color: var(--color-black);
    background-color: transparent;
    text-decoration: none;
    font-size: 1.3rem;
    cursor: pointer;
    border: 1px solid transparent;
}

.marker-button-next {
    background-color: var(--color-main);
    color: var(--color-white);
}

.marker-button-prev {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.marker-button-next:hover {
    background-color: var(--color-white);
    color: var(--color-main);
    border-top: 1px solid var(--color-main);
}

.marker-button-prev:hover {
    background-color: var(--color-white);
    color: var(--color-secondary);
    border-top: 1px solid var(--color-secondary);
}

.marker-buttons .marker-button:first-child {
    border-right: none;
}

.marker-button[disabled] {
    cursor: not-allowed;
    color: var(--color-gray);
    background: var(--color-white);
    border-top: 1px solid var(--color-gray);
}

.marker-button[disabled]:hover {
    background: var(--color-white);
    border-color: var(--color-gray);
}

.marker-info img {
    max-width: 100%;
    height: auto;
}

.marker-subtitle {
    margin-bottom: 2rem;
}

.marker-info.active {
    display: block;
}

.wp-caption {
    max-width: 100% !important;
}

/** Gallery **/
.marker-info-gallery {
    width: 100%;
    padding: 0 20px;
}

.splide__slide img {
    height: 150px;
    width: auto;
}

/* Page 404 */
.page-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    flex-direction: column;
    background-position: center;
    background-size: cover;
    text-align: center;
}

/* animate rotate 920deg on load for 3 seconds */
.page-404 {
    animation: rotate 1s linear 1;
}

@keyframes rotate {
    0% {
        transform: scale(0) rotate(0deg);
    }

    50% {
        transform: scale(0.5) rotate(360deg);
    }

    100% {
        transform: scale(1) rotate(720deg);
    }
}

/* overlay black transparent */
.page-404:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.page-404 .container {
    position: relative;
    z-index: 1;
}

.title-404 {
    font-size: 5rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1rem;
    margin-top: 10rem;
}

.texte-404 {
    font-size: 2rem;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.button-404 {
    font-size: 1.5rem;
    color: var(--color-white);
    background: var(--color-main);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    transition: all .3s;
}

.button-404:hover {
    background: var(--color-secondary);
}

/* audio player */
.audio-player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: calc(100% - 450px);
    height: 50px;
    border-top: 1px solid var(--color-gray);
    border-right: 1px solid var(--color-gray);
    background: var(--color-white);
    z-index: 99;
    color: var(--color-black);
    transition: width .5s;
}

body.wider .audio-player-container {
    width: calc(100% - 60%);
}

body.full-screen .audio-player-container {
    width: 50%;
}

body.full-screen.has-audio-player .marker-buttons {
    width: 50%;
}

.audio-player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
}

.audio-player-button  {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 35px;
    width: 35px;
    padding: 2px 0 0 2px;
    color: var(--color-black);
    background-color: transparent;
    text-decoration: none;
    font-size: 1.3rem;
    cursor: pointer;
    border: 1px solid var(--color-gray);
    border-radius: 50%;
    line-height: 0;
}

.audio-player-button:hover {
    background-color: var(--color-gray);
}

#play-track .fa-play, #play-track .fa-pause {
    display: none;
}

#play-track.is-paused .fa-play {
    display: block;
}

#play-track.is-playing .fa-pause {
    display: block;
}

.time-container {
    text-align: center;
    font-size: 1.2rem;
}

.time-range-container {
    display: flex;
    align-items: center;
}

.time-range-container #seek-slider {
    margin: 0 1rem;
    width: 100%;
    /* style for range slider */
    -webkit-appearance: none;
    height: 5px;
    background: var(--color-gray);
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    border-radius: 5px;
}

.time-range-container #seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--color-main);
    cursor: pointer;
}

.time-range-container #seek-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--color-main);
    cursor: pointer;
}

.song-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

#volume-button .fa-volume-up, #volume-button .fa-volume-off {
    display: none;
}

#volume-button.is-unmuted .fa-volume-up {
    display: block;
}

#volume-button.is-muted .fa-volume-off {
    display: block;
}

.volume-container {
    position: relative;
    z-index: 1;
}

.volume-container #volume-range {
    position: absolute;
    bottom: calc(100% + 60px);
    left: -42px;
    cursor: pointer;
    display: none;
    transform: rotate(270deg);
    background: var(--color-white);
    padding: 8px;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--color-gray);
    border-radius: 15px;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
}

.volume-container.is-opened #volume-range {
    display: flex;
}

#volume-slider {
    -webkit-appearance: none;
    width: 100px;
    height: 5px;
    background: var(--color-gray);
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    border-radius: 5px;

}

#volume-slider:hover {
    opacity: 1;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--color-main);
    cursor: pointer;
}


/* ===================  */

/* Media queries  */
@media (max-width: 960px) {
    .main-container {
        display: block;
    }

    .markers-info {
        width: 100%;
        margin-left: 0;
        margin-top: 250px;
    }

    #map {
        width: 100%;
        height: 250px;
    }

    .admin-bar #map {
        height: 250px;
        top: 46px;
    }

    html #wpadminbar {
        position: fixed;
    }

    .admin-tools {
        top: 20px;
        transform: none;
    }

    body.has-audio-player .admin-tools {
        top: 70px;
    }
    
    .markers-tools {
        display: none;
    }

    .audio-player-container {
        position: relative;
        top: 0;
        left: 0;
        z-index: 99;
        margin-top:  250px;
        width: 100%;
        height: 60px;
    }

    .audio-player-container.is-fixed {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        margin-top: 0;
        border-bottom: 1px solid var(--color-gray);
        border-right: 0;
        border-top: 0;
    }

    body.full-screen .audio-player-container {
        width: 100%;
        margin-top: 0;
    }

    body .marker-buttons,
    body.full-screen.has-audio-player .marker-buttons {
        width: 100%;
    }

    .audio-player-container + .markers-info {
        margin-top: 0;
    }

    body.has-fixed-audio-player .markers-info {
        margin-top: 300px;
    }

    body.has-audio-player .marker-info .edit-post-link  {
        top: 70px;
    }

    .time-container {
        max-width: 180px;
        line-height: 0.9;
    }

    .time-range-container {
        margin-top: 4px;
    }

    .song-title {
        line-height: 1;
    }

    .song-number {
        display: none;
    }
}
