:root {
    /*  --- COLORS ---*/
    /*text*/
    --light: #fefffa;
    --medium: #74776f;
    --dark: #1d221b;
    /*main*/
    --primary: #204f0a;
    --map: #949482;
    --card: #eaeae0;
    --cardHover: #e2e2d4;
    --background: #f5f5ef;
    --map-border: #545443;
    --border: #1734092b;
    /*maps*/
    --maple: #c2911e;
    --balsam: #126057;
    --birch: #b0bf33;
    --hemlock: #c73c40;
    --glacier: #68b6bc;
    --loon: #464eb2;
    --oak: #c26a1e;
    --whitepine: #35773b;
}

.material-symbols-rounded {
    font-size: 40px;
    color: var(--primary);
    font-variation-settings: "FILL" 0, /* 0 = outlined, 1 = filled */ "wght" 400,
        /* Font weight (100-700) */ "GRAD" 0, /* Gradient, optional */ "opsz" 40; /* Optical size (20-48 recommended) */
}

/* 🔹 1. General Reset & Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 🔹 2. Base HTML & Body Styles */
html {
    font-size: 16px; /* Base font size */
    scroll-behavior: smooth; /* Enables smooth scrolling */
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none; /* For Firefox */
}

body::-webkit-scrollbar {
    display: none; /* For Chrome, Safari */
}

body {
    font-family: "Kumbh Sans", Arial, sans-serif;
    color: var(--dark);
    background-color: var(--background);
    /*  display: flex;
    justify-content: center;    */
}

/* 🔹 3. Main Wrapper (Centers Content) */
main {
    height: 100%;
    width: 100%;
    overflow: auto;
    padding: 40px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
}

.controls-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
    margin: auto 0;
}

h1 {
    padding: 4px 0 8px 0;
    margin: 0;
    color: var(--primary);
    font-family: "Averia Serif Libre", serif;
    font-weight: 400;
}

h2 {
    font-weight: 500;
    font-size: 18px;
    /*    margin: 32px 0 8px 0;*/
}

h3 {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    margin: 20px 0 16px 0;
}

ul,
p {
    margin: 0;
    max-width: 600px;
    line-height: 24px;
    color: var(--medium);
}

#intro {
    margin-bottom: 4px;
}

/*------ CARD STYLES ------*/

.question-header {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 32px;
    margin-bottom: 4px;
}

.question-header h2 {
    flex-grow: 1;
}

.question-counter {
    font-family: "Roboto Mono", monospace;
    font-size: 14px;
    letter-spacing: -2px;
    color: var(--medium);
    font-weight: 400;
    opacity: 1;
    line-height: 40px;
    margin-right: 8px;
}

.question-progress-container {
    width: 100%;
    height: 3px;
    background-color: var(--card);
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
}

.question-progress {
    background-color: var(--border);
    height: 100%;
    width: 0%;
    border-radius: 8px;
    opacity: 1;
}

#question-container {
    position: relative;
    height: 6em;
    overflow: hidden;
    width: 100%;
}

.question {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    color: var(--medium);
}

.question.active {
    opacity: 100%;
}

/*------ CARD STYLES ------*/

.card-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.card {
    display: flex;
    flex-grow: 1;
    align-items: center;
    overflow: hidden;
    background-color: var(--card);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--dark);
    cursor: pointer;
}

.text-wrapper {
    display: flex;
    min-width: 0;
    flex: 1 1;
    flex-direction: column;
    margin-left: 12px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.name,
.details {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.name {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
}

.details {
    font-size: 14px;
    font-family: "Roboto", sans-serif;
    font-style: italic;
    font-weight: 300;
    opacity: 60%;
}

.card img {
    height: 60px;
    width: 60px;
}

.card .material-symbols-rounded {
    font-size: 30px;
    color: var(--border);
    padding-right: 12px;
    padding-left: 4px;
}

.check-icon {
    display: none;
}

.add-icon {
    display: none;
    align-items: center;
}

.is-selected.card {
    border-color: var(--balsam);
}
.is-selected .check-icon {
    display: block;
    font-variation-settings: "FILL" 1;
    color: var(--balsam);
}

.is-selected .add-icon {
    display: none;
}

/*------ HOVER STYLES ------*/
.card:hover {
    background-color: var(--cardHover);
}
.card:hover .add-icon {
    color: var(--map);
}

/* Reset hover styles for mobile */
@media (hover: none) {
    .card:hover {
        background-color: var(--card);
    }
    .add-icon:hover {
        color: var(--border);
    }
}

/*------ MAP STYLES ------*/

.map-container {
    display: flex;
    margin: auto 0;
    width: 70%;
    max-width: 800px;
    max-height: calc(100vh - 80px);

    /* Sticky positioning */
    position: sticky;
    top: 0px;
}

button {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--dark);
    padding: 8px;
    padding-right: 10px;
    border: 2px solid var(--border);
    background-color: var(--background);
    border-radius: 8px;
    font-family: "Kumbh Sans", Arial, sans-serif;
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
}

button .material-symbols-rounded {
    color: var(--dark);
    font-size: 16px;
    padding-right: 4px;
    font-variation-settings: "FILL" 0, /* 0 = outlined, 1 = filled */ "wght" 600,
        /* Font weight (100-700) */ "GRAD" 0, /* Gradient, optional */ "opsz" 40; /* Optical size (20-48 recommended) */
}

#reset-button {
    position: absolute;
    display: none;
    bottom: 16px;
    right: 16px;
    opacity: 0.8;
}

/* Base holds space, determines the width and height. */
.svg-base {
    position: relative;
    height: auto;
    width: 100%;
    border-radius: 8px;
    background: var(--card);
}

.overlay {
    display: none;
    mix-blend-mode: overlay;
}

.is-visible {
    display: block;
}

.animation-container {
    display: none;
}
.animation-container.is-visible {
    display: block;
}

/*------ RESPONSIVE STYLES ------*/

@media (min-width: 1900px) {
    .forest-icon {
        font-size: 56px;
        margin-top: 60px;
    }

    h1 {
        font-size: 40px;
        padding: 8px 0;
    }

    h2 {
        font-size: 24px;
    }

    .question-header {
        margin-top: 36px;
        margin-bottom: 8px;
    }

    .question-progress-container {
        margin-bottom: 12px;
    }

    .question-counter {
        font-size: 16px;
    }

    ul,
    p {
        font-size: 20px;
        font-weight: 400;
        line-height: 28px;
        max-width: 800px;
    }

    #intro {
        margin-bottom: 8px;
    }

    .card img {
        height: 80px;
        width: 80px;
    }

    .name,
    .details {
        font-size: 18px;
        line-height: 24px;
    }

    .text-wrapper {
        margin-left: 24px;
    }

    .card .material-symbols-rounded {
        font-size: 36px;
        padding-right: 16px;
        padding-left: 4px;
    }

    #reset-button {
        font-size: 18px;
        padding: 16px;
    }

    #reset-button .material-symbols-rounded {
        font-size: 20px;
        padding-right: 8px;
        font-variation-settings: "FILL" 0,
            /* 0 = outlined, 1 = filled */ "wght" 800,
            /* Font weight (100-700) */ "GRAD" 0,
            /* Gradient, optional */ "opsz" 40; /* Optical size (20-48 recommended) */
    }
}

@media (min-width: 1610px) {
    main {
        gap: 100px;
    }
}

@media (max-width: 1310px) {
    .card .details {
        display: none;
    }

    .card {
        text-align: left;
    }

    .card img {
        height: 40px;
        width: 40px;
    }

    .text-wrapper {
        margin-left: 8px;
    }

    .name {
        font-size: 12px;
    }

    .card .material-symbols-rounded {
        font-size: 24px;
        padding: 8px;
    }
}

@media (max-width: 800px) {
    .forest-icon {
        display: none;
    }

    main {
        flex-direction: column;
        justify-content: unset;
        align-items: center;
        width: 100%;
        gap: 0;
        padding: 16px;
        /* Let map-container handle this so it can cover what goes behind it */
        padding-top: 0;
    }

    h1 {
        font-size: 24px;
    }

    .question-header {
        margin-top: 24px;
        margin-bottom: 4px;
    }

    .question-progress-container {
        margin-bottom: 8px;
    }

    .question-counter {
        font-size: 13px;
    }

    h3 {
        font-size: 12px;
        margin: 16px 0;
    }

    p {
        font-size: 14px;
        line-height: 20px;
    }

    .controls-container {
        order: 2;
        width: 100%;
        margin: 0;
    }

    .map-container {
        order: 1;
        margin: 0;
        /* Ignore half the padding */
        max-height: calc(40vh + 16px);
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 1;
        background: linear-gradient(
            to bottom,
            var(--background) 92%,
            transparent 100%
        );
        /* Take over top padding from main, also add padding to the bottom so
        that the sticky map has some space around it */
        padding: 16px 0;
    }

    #reset-button {
        font-size: 14;
        bottom: 24px;
        right: 8px;
        font-weight: 500;
    }
}
