* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 32px 10px 10px 10px;

    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

#heading {
    margin: 0px;
    text-align: center;
}

#introduction {
    text-align: center;
}

#intro-end {
    height: 0px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-bottom: 1px gray solid;
}

#collapse-intro {
    border: none;
    background-color: white;
    padding: 0px 20px;
}

#collapse-intro > img {
    height: 32px;
}

#calculator {
    max-width: 512px;
    width: 100%;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    overflow-y: auto;

    border: 1px solid black;
    background-color: whitesmoke;
}

#expressions {
    display: grid;
    gap: 4px;
}

.expression {
    height: 48px;
    width: 100%;

    display: flex;
    align-items: center;
    gap: 4px;

    background-color: white;
    border: 1px solid gray;
}

.expression * {
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
}

.expression > input {
    flex: 1;
    height: 100%;

    font-size: 16px;
    padding: 0px 10px;

    border: none;
}

.remove-expression {
    cursor: pointer;
    height: 32px;
    margin: 8px;
}

.expression-error-wrapper {
    position: relative;
    height: 48px;
}

.expression-error {
    height: 32px;
    margin: 8px;
}

#expression-error-popup {
    position: absolute;
    transform: translate(-50%, -5px);
    z-index: 1;

    width: 240px;

    display: flex;
    padding: 4px;
    gap: 4px;
    flex-direction: column;
    align-items: center;

    background-color: lightcoral;
    border: 1px solid black;
}

.expression-error-button {
    border: 1px solid black;
    padding: 4px;
}

#expression-adder {
    height: 48px;

    cursor: pointer;
    border-radius: 0;
    border: 1px solid gray;
}

#expression-adder > img {
    height: 32px;
}

#calculator-padding {
    flex: 1;
}

.hidden {
    display: none !important;
}

@media screen and (min-width: 400px) {
    body {
        padding-bottom: 128px;
    }
    #introduction {
        width: 70%;
        min-width: 400px;
    }

    #intro-end {
        width: 70%;
        min-width: 400px;
    }
}
