/* Colour pallette */

:root {
    --primary: 99,72,246;
    --primary2: 255,164,24;
    --secondary: 82,222,199;
    --secondary2: 255,214,109;
    --on-primary: 255,255,255;
    --on-secondary: 121,121,121;
    --background: 255,255,255;
    --surface: 217,217,217;
    --drop-shadow: 0.1rem 0.2rem 0.2rem #333;
}

html, body {
    width: 100vw;
    display: flex;
    justify-content: center;
    pointer-events: none;
    margin: 0; border: 0; padding: 0; 
    font-family: sans-serif;
    font-size: 120%;
    height: calc(100vh - calc(100vh - 100%));
}

svg { font-family: sans-serif; }

input { pointer-events: auto; }

body>section { visibility: hidden; }
.visible { visibility: visible; }

h1 { color: rgb(var(--secondary2)); }
h2 { color: rgb(var(--background)); }
p { color: rgb(var(--background)); }

#map { 
    pointer-events: auto;
    position: fixed !important; 
    top:0 !important; 
    left:0 !important; 
    width: 100vw !important;
    height: 100% !important;
    z-index: -1 !important;
}

.leaflet-div-icon { 
    background: transparent !important;
    border: none !important;
}

.heatmap {
    opacity: 0.5 !important;
}

svg.townmarker { 
    margin-left: -1.5rem; 
    margin-top: -2rem; 
    width: 3rem !important; 
    fill: rgb(var(--primary)); 
}

/* Question card */

.question-card {
    z-index: 10;
    top: 5%;
    position: absolute;
    pointer-events: none;
    background: transparent;
    display: flex;
    text-align: center;
    flex-direction: column;
    width: min(90%,30rem);
    height: 60%;
}

.question-card>section:first-of-type {
    min-height: 10rem;
    padding: 1rem;
    color: rgb(var(--on-primary));
    border-radius: 1rem;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    backdrop-filter: blur(0.1rem);
    filter: drop-shadow(var(--drop-shadow));
    background-color: rgba(var(--on-secondary),0.4);
}

.question-card>section:first-of-type>img {
    max-width: min(20%, 5rem);
}

.question-card>section:nth-of-type(2) {
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Welcome page */

.welcome {
    display: flex;
    flex-direction: column;
    top: 10%;
    position: absolute;
    width: 100vw;
    height: 90%;
    background: linear-gradient(0deg, rgb(var(--primary)) 0vh, rgb(var(--primary)) 70vh, transparent 70vh);
    text-align: center;
}

.welcome>section:first-of-type {
    padding-top: 1rem;
    height: 20vh;
    background: radial-gradient(
        ellipse at bottom, 
        rgb(var(--primary)) 70%, 
        transparent calc(70% + 0.1rem), transparent 100vmax 
        );
    background-position: 50% 0;
    background-repeat: no-repeat;
    background-size: 120% 100%;
}

.welcome>section:nth-last-of-type(3) {
    flex: 1;
}

.welcome>section:nth-last-of-type(2) {
    flex: 1;
}

.welcome>button { font-size: 140%; }

.welcome>section:last-of-type {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    padding-bottom: 2rem;
}

.welcome>section:last-of-type img {
    max-width: min(20%, 5rem);
}


/* Bottom menu */

.icon-menu {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    top: calc(100% - 4rem);
    position: absolute;
    width: 100vw;
    height: 4rem;
    background: radial-gradient(
        ellipse at bottom, 
        rgb(var(--primary),0.6) 70%, 
        transparent calc(70% + 0.1rem), transparent 100vmax 
        );
    background-position: 50% 0;
    background-repeat: no-repeat;
    background-size: 120% 100%;
}

section.menu-controls {
    z-index: 20;
    display: none;
    justify-content: center;
}

section.menu-controls>svg {
    width: 5rem;
    pointer-events: auto;
}

section.menu-controls>svg>circle {
    fill: rgb(var(--primary2));
}

section.menu-controls>svg>text {
    fill: rgb(var(--on-primary));
}

section.menu-controls>svg>rect {
    fill: rgb(var(--primary));
}

section.menu-controls>svg>path {
    fill: rgb(var(--on-primary));
}

section.menu-controls>svg.active>rect {
    fill: rgb(var(--on-primary));
}

section.menu-controls>svg.active>path {
    fill: rgb(var(--primary));
}

section.question-controls {
    padding: 1rem;
    display: flex;
    font-size: 50%;
    gap: 1rem;
}

section.question-controls>section.progress {
    text-align:center;
    margin: auto;
    height: 100%;
    flex: 1;
}

section.question-controls>section.progress>p {
    background: rgb(var(--primary2));
    border-radius: 1rem;
    height: 1rem;
}

/* List Card */

.list-card {
    pointer-events: auto;
    z-index: 10;
    position: absolute;
    bottom: 3rem;
    width: min(30rem,90%);
    height: 80%;
    background: 
        linear-gradient(rgb(var(--background)), rgb(var(--background))) padding-box,
        linear-gradient(to top, rgb(var(--primary)), rgb(var(--background))) border-box;
    border-radius: 1rem;
    border: 0.3rem solid transparent;

    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    text-align: center;
}


.list-card>h2 {
    color: rgb(var(--primary));
    border-bottom: 0.3rem solid rgba(var(--on-secondary), 0.6);
    width: 100%;
    margin: 0;
}

.list-card>h2>button {
    font-size: 50%;
}

.list-card>ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    padding-bottom: 3rem;
}

/* Filter list */

.list-card>ul>li.filter>p {
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    background: rgb(var(--primary2));
    border-radius: 3rem;
}

.list-card>ul>li.filter>p>img {
    align-self:left;
    width: 2rem;
}

.list-card>ul>li.filter>input[type=range] {
    width: 80%;
    background: rgb(var(--primary));
    border-radius: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

.list-card>ul>li.filter>input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: rgb(var(--background));
    border-radius: 1rem;
    height: 1.5rem;
    width: 1.5rem;
}

.list-card>ul>li.filter>input[type=range]::-moz-range-thumb {
    background: rgb(var(--background));
    border-radius: 1rem;
    height: 1.5rem;
    width: 1.5rem;
}

.list-card>ul>li.filter>input[type=range]::-webkit-slider-runnable-track {
    background: rgb(var(--primary));
    border-radius: 1rem;
}

.list-card>ul>li.filter>div {
    display: flex;
    font-size: 50%;
    color: rgb(var(--surface));
    justify-content: space-around;
}

/* Place list */

.list-card>ul>li.top10>div {
    display: flex;
    align-items: center;
    padding: 0 1rem 0 1rem;
}

.list-card>ul>li.top10.active {
    background: rgb(var(--secondary));
}

.list-card>ul>li.top10>div>svg {
    width: 2rem;
}

.list-card>ul>li.top10>div>svg>rect {
    fill: transparent;
}

.list-card>ul>li.top10>div>svg>path {
    fill: rgb(var(--primary));
}

.list-card>ul>li.top10>div>svg.active>path {
    fill: rgb(var(--secondary2));
}

.list-card>ul>li.top10>div>h3 {
    color: rgb(var(--on-secondary));
    font-size: 80%;
    flex: 2;
}

.list-card>ul>li.top10>div>p {
    color: rgb(var(--primary));
    margin: 0;
}

.list-card>ul>li.top10>div>button {
    font-size: 50%;
    height: 2rem;
    margin-left: 1rem;
}

.list-card>ul>li.top10>dl {
    display: flex;
    flex-flow: row wrap;
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.5s;
}

.list-card>ul>li.top10>dl>dt {
    flex-basis: 20%;
    padding: 2px 4px;
    text-align: right;
}

.list-card>ul>li.top10>dl>dd {
     flex-basis: 70%;
    flex-grow: 1;
    margin: 0;
}

/* Button */

button.mustbe { --startcol: 92,222,209; --midcol: 82,222,199; --endcol: 72,222,189; }
button.quitelike { --startcol: 255,204,99; --midcol: 255,214,109; --endcol: 255,224,119; }
button.mustnot { --startcol: 255,164,24; --midcol: 255,164,24; --endcol: 255,164,24; }
button.rathernot { --startcol: var(--background); --midcol: var(--background); --endcol: var(--background); --on-primary: var(--on-secondary); }

button {
    font-size: 100%;
    pointer-events: auto;
    background: rgb(var(--primary));
    background: linear-gradient(0deg, 
        rgb(var(--startcol,99,72,246)) 0%, 
        rgb(var(--midcol,109,82,246)) 50%, 
        rgb(var(--endcol,119,92,246)) 100%);
    border-radius: 5em;
    filter: drop-shadow(var(--drop-shadow));
    color: rgb(var(--on-primary));
    cursor: pointer;
    padding: 0.5em 1em;
    min-width: 8em;
    max-width: 10em;
    word-break: break-word;
    border: 0;
}

/* poi icons */
.poiicon>svg {
    margin-top: -0.4rem;
    margin-left: -0.4rem;
    width: 1rem; 
    height: auto; 
    padding: 0.1rem; 
    background: rgba(var(--primary),0.5); 
}

.pin>svg {
    margin-left: -0.5rem;
    margin-top: -1rem;
    width: 2rem; 
    height: auto;
    fill: rgb(var(--primary));
}

.bookmark>svg {
    margin-left: -0.5rem;
    margin-top: -1rem;
    width: 2rem; 
    height: auto;
    fill: rgb(var(--primary2));
}
