/* ! Change Flexbox of rows and function */
:root {
    --calculator-width: 394px;
    --calculator-height: 700px;
    --calculator-radius: 12px;
    --calculator-color: #010101;
    --calculator-operations-color: #ff7534;
    --calculator-seperator-width: calc(var(--calculator-width) - 20px);
    --calculator-seperator-height: 1px;
    --caclulator-seperator-color: #d9d9d9;
    --calculator-typer-height: 178px;
    --calculator-functions-height: 485px;
    --calculator-functions-button-hover: #564c4c;
    --calculator-functions-column-width: 68px;
    --calculator-functions-column-height: 431px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    height: 100vh;
    background: #191c2b;
    display: grid;
    place-content: center;
}

.calculator {
    min-height: var(--calculator-height);
    width: var(--calculator-width);
    background: var(--calculator-color);
    border-radius: var(--calculator-radius);
    user-select: none;
}

.calculator .typer {
    min-height: var(--calculator-typer-height);
}

.calculator .seperator {
    background: var(--caclulator-seperator-color);
    min-height: var(--calculator-seperator-height);
    width: var(--calculator-seperator-width);
    margin: 0 auto;
}

.typer #operation {
    color: white;
    font-size: 40px;
    min-height: 97.5px;
    padding: 20px;
    display: flex;
    justify-content: start;
    gap: 10px;
    overflow-wrap: anywhere;
    outline: none;
    caret-color: transparent;
}

.typer #operation sup {
    display: inline-block;
    bottom: 50px;
    font-size: 30px;
}

.typer #result {
    text-align: left;
    font-size: 30px;
    color: grey;
    padding: 20px;
}

.typer .result-symbol {
    margin-right: 10px;
}

.functions {
    color: white;
    font-size: 40px;
    min-height: var(--calculator-functions-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 60px;
    margin-top: 20px;
}

.functions .row {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.functions .orange {
    color: var(--calculator-operations-color);
}

.functions .red {
    color: red;
}

.functions span {
    cursor: pointer;
    position: relative;
    z-index: 0;
}

.functions span::after {
    content: "";
    position: absolute;
    background: transparent;
    height: 68px;
    width: 68px;
    border-radius: 50%;
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    z-index: -1;
    transition: background 0.1s;
}

.functions span:hover::after {
    background: rgba(128, 128, 128, 0.438);
}

.functions .delete {
    font-size: 28px;
}
.functions .modulus {
    font-size: 24px;
}

.functions .base {
    font-size: 30px;
    width: 15px;
}

.functions .exponent {
    font-size: 25px;
}

.functions .equal {
    position: relative;
    z-index: 1;
}

.functions .equal::after {
    background: var(--calculator-operations-color);
}

.functions .equal:hover::after {
    background: #f00;
}

@media (max-width: 400px) {
    body {
        background: var(--calculator-color);
        -webkit-tap-highlight-color: transparent;
        height: 100vh;
        position: relative;
    }

    .calculator {
        min-height: 100%;
        position: absolute;
        border-radius: 0;
    }

    .functions {
        gap: 90px;
    }
}
