/* Some colours are referenced from: https://codeberg.org/comaps/comaps/src/branch/main/android/app/src/main/res/values/colors.xml */
:root {
    --bg-light: #eeeeee;
    --bg-dark: #111111;
    --base-green: #558b2f;
    --light-green: #7cbc7b;
    --base-accent: #37653f;
    --base-accent-pressed: #588157;
    --accent-button-text: #ffffff;
    --text: #000000;
    --text-dark: #ffffff;
    --button-pressed: #999999;
    --button-pressed-dark: #666666;
}

@font-face {
    font-family: Roboto;
    src: url(3party/roboto/RobotoVariable.ttf);
}

/* inter-200 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: normal;
    font-weight: 200;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-200.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-200italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: italic;
    font-weight: 200;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-200italic.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-300 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: normal;
    font-weight: 300;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-300.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-300italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: italic;
    font-weight: 300;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-300italic.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-regular - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: italic;
    font-weight: 400;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-italic.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-500 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-500.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-500italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: italic;
    font-weight: 500;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-500italic.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-600 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-600.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-600italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: italic;
    font-weight: 600;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-600italic.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-700 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-700.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-700italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Inter";
    font-style: italic;
    font-weight: 700;
    src: url("./3party/inter/inter-v19-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-700italic.woff2")
        format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

h1,
h2,
button {
    padding-left: 6px;
    font-weight: normal;
    padding-right: 6px;
}

body,
button {
    font-family: "Inter", Roboto, sans-serif !important;
    margin: 0;
}

header {
    height: 40px;
    background-color: var(--bg-light);
    color: var(--text);
    padding: 10px;
    font-size: 30px;
    display: flex;
    align-items: center;
}

header img {
    width: 40px;
}

#logomark {
    width: 100px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

#download-comaps {
    position: fixed;
    right: 10px;
    color: var(--text-dark);
    font-weight: bold;
}

/* UI is mobile first */

#map {
    height: calc(100vh - 188px);
    width: 100vw;
    border-top: #828282 solid 1px;
    border-bottom: #828282 solid 1px;
}

#poi-info {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 8000;
    min-height: 100px;
    width: 100vw;
    background-color: var(--bg-light);
    max-height: 126px;
    overflow-y: auto;
    color: var(--text);
}

#open-in,
#copy-as {
    background-color: var(--bg-light);
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    display: none;
}

#open-in {
    z-index: 9998 !important;
}

#copy-as {
    z-index: 9999 !important;
}

button {
    background-color: var(--base-accent);
    color: var(--accent-button-text);
    font-size: 18px;
    border-radius: 50px;
    padding: 10px;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: var(--base-accent-pressed);
}

#popover {
    background-color: rgba(125, 125, 125, 0.5);
    position: fixed;
    width: 100vw;
    height: 100vh;
    left: 0%;
    top: 0%;
    display: none;
}

#poi-info button {
    padding: 6px;
    width: 100%;
    background-color: var(--bg-light);
    border-radius: 0px;
    color: var(--text);
    text-align: left;
}

#poi-info h2 {
    padding-left: 6px;
}

#poi-info button:hover {
    background-color: var(--button-pressed);
}

.outline-button {
    background-color: var(--bg-light) !important;
    color: var(--base-green) !important;
    border-color: var(--base-green);
    border-style: solid;
    border-width: 2px !important;
    border-radius: 4px !important;
    margin-left: 4px;
    margin-right: 4px;
    max-width: 200px;
    text-align: center !important;
}

.outline-button:hover {
    background-color: var(--base-green) !important;
    color: var(--accent-button-text) !important;
}

#mobile-controls {
    display: flex;
    padding: 4px;
    justify-content: center;
}

.mobile-only {
    display: block;
}

.full-screen-error {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10000;
    background-color: var(--bg-light);
    color: var(--text);
    width: 100vw;
    height: 100vh;
}

#full-screen-error p,
#full-screen-error h1 {
    padding-left: 6px;
    padding-right: 6px;
}

#map p {
    font-size: 18px;
}

/* Desktop mode */
@media (min-width: 60em) {
    #poi-info {
        position: fixed;
        left: 0;
        top: 60px;
        z-index: 8000;
        width: 350px;
        max-height: none;
        padding: 15px;
        overflow-y: auto;
        color: var(--text);
    }
    #map {
        height: calc(100vh - 60px);
        width: calc(100vw - 380px);
        position: fixed;
        left: 380px;
        top: 60px;
        border-left: #828282 solid 1px;
        border-top: #828282 solid 1px;
    }

    #mobile-controls {
        display: none;
    }
    #open-in,
    #copy-as {
        position: initial;
        display: block !important;
        width: auto;
    }

    .mobile-only {
        display: none;
    }
}

@media (max-width: 360px) {
    #wordmark {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {
    header {
        background-color: var(--bg-dark);
        color: var(--text-dark);
    }
    #logomark {
        color: var(--text-dark);
    }
    #poi-info {
        background-color: var(--bg-dark);
        color: var(--text-dark);
    }
    #poi-info,
    #poi-info button {
        background-color: var(--bg-dark);
        color: var(--text-dark);
    }
    #poi-info button:hover {
        background-color: var(--button-pressed-dark);
    }

    .outline-button {
        background-color: var(--bg-dark) !important;
    }

    #open-in,
    #copy-as {
        background-color: var(--bg-dark) !important;
    }

    #full-screen-error {
        background-color: var(--bg-dark);
        color: var(--text-dark);
    }
}
