/* fonts */
@font-face {
  font-display: swap;
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 300;
  src: url('../static/fonts/inter-tight-300.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400;
  src: url('../static/fonts/inter-tight-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 500;
  src: url('../static/fonts/inter-tight-500.woff2') format('woff2');
}

/* variables */
:root {
    --border-radius: 8px;
    --border-radius-half: 4px;

    --color-black: #000000;
    --color-blue: #1c71c4;
    --color-gold: gold;
    --color-gray-light: #f1f1f1;
    --color-gray-medium: #dddddd;
    --color-gray-dark: #757575;
    --color-green-light: #e5ecdb;
    --color-green-dark: #667551;
    --color-white: #ffffff;

    --font-inter: 'Inter Tight', sans-serif;

    --font-size-xsmall: 12px;
    --font-size-small: 14px;
    --font-size-regular: 16px;
    --font-size-medium: 21px;
    --font-size-large: 24px;
    --font-size-xlarge: 36px;
}

/* style */
* {
    box-sizing: border-box;
}

body {
    background: var(--color-gray-light);
    font-family: var(--font-inter);
    font-weight: 300;
    font-size: var(--font-size-regular);
    margin: 0;
    padding: 0;
    position: relative;
}

h1 {
    font-size: var(--font-size-xlarge);
    font-weight: 500;
    margin: 0;
    margin-bottom: 24px;
}

h1, h3, h4 {
    font-family: var(--font-inter);
}

aside {
    height: 100%;
    padding: 36px;
    padding-left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 25%;

    & div.wrapper {
        margin-bottom: 36px;
        overflow: hidden;

        & .inner {
            background: var(--color-white);
            border: 1px solid rgba(0, 0, 0, 0.15);
            border-top: 0;
            padding: 24px;

            &:last-child {
                border-bottom-left-radius: var(--border-radius);
                border-bottom-right-radius: var(--border-radius);
            }
        }

        & button {
            display: block;
            font-family: var(--font-inter);
            font-size: 11pt;
            margin-top: 12px;
            padding: 6px;
            width: 100%;

            &#create,
            &#import {
                display: none;
            }
        }

        & h3 {
            background: var(--color-green-dark);
            border-top-left-radius: var(--border-radius);
            border-top-right-radius: var(--border-radius);
            color: var(--color-white);
            font-size: var(--font-size-medium);
            font-weight: 500;
            margin: 0;
            padding: 16px 24px;
            position: relative;

            & meter {
                position: absolute;
                right: 0;
            }
        }

        & h4 {
            font-weight: 500;
            margin-bottom: 12px;
            margin-top: 0;
        }

        & label {
            display: block;
            margin: 8px 0;

            & input {
                margin-left: 0;
            }
        }

        & meter {
            display: block;
            width: 100%;

            & + p {
                margin-bottom: 0;
                margin-top: 8px;
                position: relative;
            }
        }

        & div#recent {
            display: none;

            & ol {
                font-size: var(--font-size-small);
                font-style: italic;
                list-style-position: inside;
                margin-bottom: 0;
                margin-top: 0;
                padding-left: 0;

                & li {
                    padding: 2px 0;

                    &:last-child {
                        padding-bottom: 0;
                    }
                }
            }
        }

        & div#search {
            & input {
                border: 1px solid var(--color-gray-medium);
                display: block;
                font-family: var(--font-inter);
                padding: 8px;
                width: 100%;

                & + p {
                    margin-top: 8px;
                }
            }
        }

        & span.percentage {
            position: absolute;
            right: 0;
        }
    }

    & hr {
        border: 0;
        border-top: 1px solid #e1e1e1;
        height: 0;
        margin: 18px 0;
    }

    & p {
        color: var(--color-gray-dark);
        font-family: var(--font-inter);
        font-size: var(--font-size-small);
        line-height: 150%;
        margin: 0;

        & a,
        & a:active,
        & a:link,
        & a:visited {
            color: var(--color-gray-dark);
        }
    }
}

main {
    max-width: calc(75%);
    padding: 36px;

    & section {
        background: var(--color-white);
        border: 1px solid rgba(0, 0, 0, 0.15);
        border-radius: var(--border-radius);
        margin-bottom: 36px;
        overflow: hidden;

        & h3 {
            border-bottom: 1px solid #e1e1e1;
            font-size: var(--font-size-medium);
            font-weight: 500;
            line-height: 24px;
            margin: 36px;
            margin-bottom: 0;
            padding-bottom: 24px;
            position: relative;

            & .stats {
                bottom: 0;
                display: inline-block;
                font-size: 0;
                font-style: normal;
                margin: auto;
                position: absolute;
                right: 0;
                top: 0;

                & meter {
                    vertical-align: middle;
                    width: 150px;
                }

                & span {
                    color: var(--color-black);
                    display: inline-block;
                    font-size: var(--font-size-regular);
                    font-weight: 400;
                    height: 24px;
                    line-height: 24px;
                    text-align: right;
                    vertical-align: middle;
                    width: 60px;
                }
            }
        }
    }
}

ul {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    list-style: none;
    margin: 0;
    padding: 28px 36px;

    & li {
        padding: 6px 0;

        & .mouseover {
            background: var(--color-gray-light);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-top: 12px solid var(--color-green-dark);
            border-radius: var(--border-radius);
            box-shadow: 0 0 12px rgba(0,0,0,0.1);
            font-family: var(--font-inter);
            left: 0;
            margin: 0;
            margin-left: 24px;
            padding: 24px;
            position: absolute;
            top: 0;
            visibility: hidden;
            width: 370px;
            z-index: 2;

            & .abundance {
                backdrop-filter: blur(10px);
                background: rgba(0, 0, 0, 0.33);
                border-bottom-left-radius: var(--border-radius);
                border-bottom-right-radius: var(--border-radius);
                font-size: 0;
                margin-top: -34px;
                padding: 4px;
                position: absolute;
                text-align: center;
                width: 320px;
                z-index: 3;

                & .wrapper {
                    display: block;
                    margin: 0 auto;
                    width: 100%;

                    & p {
                        color: var(--color-white);
                        font-size: 10px;
                        letter-spacing: 1px;
                        line-height: 26px;
                        margin: 0;
                        padding: 0;
                        z-index: 4;
                    }

                    & .month {
                        border-right: 1px solid rgba(255, 255, 255, 0.2);
                        display: inline-block;
                        float: left;
                        padding-top: 12px;
                        position: relative;
                        width: 8.33%;

                        &:after {
                            top: 0px;
                            color: var(--color-white);
                            font-size: 8px;
                            left: 0;
                            position: absolute;
                            right: 0;
                        }

                        &.january:after {
                            content: 'Jan.';
                        }

                        &.february:after {
                            content: 'Feb.';
                        }

                        &.march:after {
                            content: 'Mar.';
                        }

                        &.april:after {
                            content: 'Apr.';
                        }

                        &.may:after {
                            content: 'May';
                        }

                        &.june:after {
                            content: 'Jun.';
                        }

                        &.july:after {
                            content: 'Jul.';
                        }

                        &.august:after {
                            content: 'Aug.';
                        }

                        &.september:after {
                            content: 'Sep.';
                        }

                        &.october:after {
                            content: 'Oct.';
                        }

                        &.november:after {
                            content: 'Nov.';
                        }

                        &.december {
                            border-right: 0;

                            &:after {
                                content: 'Dec.';
                            }
                        }

                        & span {
                            background: var(--color-white);
                            border-radius: 4px;
                            box-sizing: content-box;
                            display: inline-block;
                            height: 14px;
                            margin-left: 1px;
                            margin-right: 0;
                            width: 3px;

                            &.zero {
                                background: transparent;
                            }

                            &.one {
                                height: 2px;
                                margin-bottom: 6px;
                                margin-top: 6px;
                            }

                            &.two {
                                height: 4px;
                                margin-bottom: 5px;
                                margin-top: 5px;
                            }

                            &.three {
                                height: 6px;
                                margin-bottom: 4px;
                                margin-top: 4px;
                            }

                            &.four {
                                height: 8px;
                                margin-bottom: 3px;
                                margin-top: 3px;
                            }

                            &.five {
                                height: 10px;
                                margin-bottom: 2px;
                                margin-top: 2px;
                            }

                            &.six {
                                height: 12px;
                                margin-bottom: 1px;
                                margin-top: 1px;
                            }

                            &.seven {
                                height: 14px;
                            }
                        }

                        & .fc {
                            clear: both;
                            float: none;
                        }
                    }
                }
            }

            & .image {
                border-radius: var(--border-radius);
                box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
                font-size: 0;
                overflow: hidden;
                position: relative;

                & img {
                    z-index: 1;
                }
            }

            & h4 {
                font-size: var(--font-size-medium);
                margin-bottom: 4px;
                margin-top: 24px;

                & a,
                & a:active,
                & a:link,
                & a:visited {
                    color: var(--color-black);
                }

                & + p {
                    color: var(--color-gray-dark);
                    font-size: var(--font-size-small);
                    margin-top: 0;
                }
            }

            & p {
                text-transform: capitalize;

                &:last-child {
                    color: var(--color-gray-dark);
                    font-size: 12px;
                    font-style: italic;
                    margin-bottom: 0;
                }

                & strong {
                    font-weight: 500;
                }
            }
        }

        & input {
            margin-left: 0;
        }

        & label {
            position: relative;
            user-select: none;
        }

        & mark {
            border-radius: var(--border-radius-half);
            bottom: 0;
            font-size: 10px;
            height: var(--font-size-regular);
            line-height: 10px;
            margin: auto;
            margin-left: 8px;
            padding: 3px 6px;
            position: absolute;
            text-transform: uppercase;
            user-select: none;
            top: 0;

            &.extirpated {
                background: var(--color-blue);
                color: var(--color-white);
            }

            &.rare {
                background: var(--color-gold);
                color: var(--color-black);
            }
        }
    }
}

meter {
    appearance: none;
    -webkit-appearance: none;
    background: var(--color-gray-light);
    border: 0;
    border-radius: var(--border-radius);
    box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.05);
    display: inline-block;
    height: 24px;
    width: 100%;

    &::-moz-meter-bar,
    &::-webkit-meter-bar {
        background: #27cd41;
        height: 100%;
        width: 100%;
    }
}