:root {
    --linky-red: #db3e25;
    --linky-light-blue: #97d5ee;
    --linky-dark-blue: #003e7d;
    --background-cream: #fffaf0;

    --profile-container-padding: 20px;
    --max-width: 800px;

    --top-menu-item-height: 30px;
    --top-menu-item-padding: 15px;

    /* The font (Josefin Sans) is weird and this makes it look centered in its container */
    --font-top-padding: 3px;
}

@media (max-width: 600px) {
    * {
        --profile-container-padding: 10px;
    }

    main {
        font-size: 1.2em;
    }

    .fake-phone {
        /* Override the increased font size inside the fake phone */
        font-size: 1rem;
    }
}

body {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0;
    background-color: var(--background-cream);
    font-family: 'Josefin Sans', sans-serif;
    color: var(--linky-dark-blue);
    display: flex;
    flex-direction: column;
}

nav {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 10px;
    background-color: var(--linky-light-blue);

    svg {
        width: auto;
        height: var(--top-menu-item-height);
        display: block;
        fill: var(--linky-red);
        /* background-color: white; */
    }

    a {
        text-decoration: none;
        color: var(--linky-red);
        padding: var(--top-menu-item-padding);
        line-height: var(--top-menu-item-height);
        display: block;
    }

    a.logo {
        width: fit-content;
    }

    a:visited {
        color: var(--linky-red);
    }

    .dropdown {
        --dropdown-min-width: 140px;
        text-align: right;
        min-width: var(--dropdown-min-width);

        #menu-toggle {
            svg .bar {
                transition: all 0.3s cubic-bezier(.4, 2, .6, 1);
                transform-origin: center;
            }
        }

        .dropdown-content {
            display: none;
            position: absolute;
            right: 0;
            background-color: var(--linky-light-blue);
            min-width: var(--dropdown-min-width);
            text-align: left;
            z-index: 1;

            a {
                color: black;
                padding: 8px 16px;
                text-decoration: none;
                display: block;
            }

            a:hover {
                color: var(--linky-red);
            }
        }

        &.show .dropdown-content {
            display: block;
        }

        &.show #menu-toggle svg {

            /* Symetric animation */
            /* .middle.one {
                transform: rotate(45deg);
            }

            .middle.two {
                transform: rotate(-45deg);
            }

            .top {
                transform: translateY(-50%);
            }

            .bottom {
                transform: translateY(50%);
            } */

            /* Asymetric animation */
            .middle {
                opacity: 0;
            }

            .top {
                transform: scale(1.2) translateX(-20%) translateY(20%) rotate(45deg);
            }

            .bottom {
                transform: scale(1.2) translateX(-20%) translateY(-20%) rotate(-45deg);
            }
        }
    }
}

main {
    flex-grow: 1;
    width: 100%;
}

main,
.fake-phone {
    padding: var(--profile-container-padding);
    display: flex;
    flex-direction: column;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

footer {
    margin-top: 20px;
    text-align: right;
    background-color: var(--linky-light-blue);
    height: calc(var(--top-menu-item-height) + var(--top-menu-item-padding) * 2);
    padding: var(--profile-container-padding);
    padding-top: calc(var(--profile-container-padding) + var(--font-top-padding));
    display: flex;
    align-items: center;
    justify-content: flex-end;

    a {
        display: inline-block;
        text-decoration: none;
        margin: 0 0 0 10px;
        color: var(--linky-red);
    }
}

.notification {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;

    .error {
        background-color: var(--linky-red);
        color: white;
    }
}

form {
    input[type='submit'] {
        margin: 30px auto 0 auto;
        display: block;
        width: 200px;
        color: white;
        background-color: var(--linky-red);
        border-radius: 5px;
        border-width: 0;
        padding: 10px;
        cursor: pointer;
    }
}

a {
    color: var(--linky-red);
    text-decoration: none;
}

h1 {
    margin-bottom: 10px;
    text-align: center;
}

h2 {
    margin-top: 15px;
    margin-bottom: 5px;
}

p {
    margin-top: 10px;
    margin-bottom: 10px;
}

input {
    padding: 4px;
    padding-top: calc(4px + var(--font-top-padding));
}

textarea {
    padding: 5px;
    padding-top: calc(5px + var(--font-top-padding));
}

select {
    padding-top: 4px;
}