:root{
    --body-background: rgb(22, 22, 22);
    --button-color: #2a2a2a;
    --button-hover: #3d3d3d;
    --max-width: 35rem;
    font-size: 16px;
}

/* ------------- fonts ---------------- */
@font-face {
    font-family: 'Charm';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/charm.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'PT Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/pt-sans.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Tangerine';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/tangerine.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ----------- css styles ------------ */
*{
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'PT Sans', serif;
}
body{
    background: var(--body-background);
    margin: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    min-width: 300px;
    max-width: 100vw;
    max-height: 100vh;
}
.container{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.topBar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--max-width);
    margin: auto;
    padding: 5px 2.5vw;
}
.topBar svg{
    width: 2.5vh;
    height: 2.5vh;
    fill: rgb(140, 140, 140);
    transition: fill 500ms;
}
.topBar svg:hover{
    fill: rgb(180, 180, 180);
}
.signature{
    font-family: 'Tangerine', sans-serif;
    font-size: 2.3vh;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    color: rgb(140, 140, 140);
    letter-spacing: 2px;
    margin: 0;
}
.signature:hover{
    text-decoration: underline;
}


.calculator{
    flex-grow: 1;
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 0 2.5vw;
    margin: 0 auto;
}
.input-area{
    color: white;
    position: relative;
    background: transparent;
    padding: 0.5rem 0.5rem 1rem;
    width: 100%;
}
#topDisplay-container{
    position: relative;
    width: 100%;
    height: 4.8vh;
    margin: 1vh 0;
    overflow-x: auto;
    direction: rtl;
}
/* Hide scrollbar for Chrome, Safari and Opera */
#topDisplay-container::-webkit-scrollbar { display: none; }
/* Hide scrollbar for IE, Edge and Firefox */
#topDisplay-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
#topDisplay{
    position: absolute;
    right: 0;
    background: transparent;
    color: #dddddd;
    font-size: 3.5vh;
    height: 100%;
    margin: 0;
    direction: initial;
    cursor:grab;
}
#display{
    background: transparent;
    color: rgb(255, 255, 255);
    width: 100%;
    text-align: right;
    font-size: 6vh;
    border: 0;
    outline: 0;
}

#exponential-container {
    position: absolute;
    right: 10px;
    margin-top: 5px;
    color: rgb(73, 73, 73);
    font-size: 1.1rem;
}
#exponential-container.active{ color: whitesmoke}

.button-container{
    width: 100%;
}

.trigonometry{
    color: white;
    font-size: 2.5vh;
    cursor: pointer;
    user-select: none;
    margin: 0.6rem 0.2rem;
}
#trigonometric-mode{
    text-transform: capitalize;
    margin-right: 0.8rem;
}
#trigono-toggle{
    position: relative;
    display: inline-block;
    margin-top: 10px;
}
#trigonometric-container{
    background: var(--button-color);
    position: absolute;
    top: 150%;
    width: max-content;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    box-shadow: 0 0 10px rgb(73, 73, 73);
    z-index: 10;
    transform: rotateX(90deg);
    transform-origin: top;
    transition: transform 300ms;
}
#trigonometric-container.visible{
    display: grid;
    transform: rotateX(0);
}

.trigono-operator{
    text-align: center;
    padding: 15px;
}
.trigono-operator:hover{ background: var(--button-hover);}


.button-area{
    width: 100%;
    background: transparent;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 5px;
    border-bottom-left-radius: 10px;
}
.button{
    color: white;
    text-align: center;
    font-size: 2.7vh;
    background: var(--button-color);
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 5px;
    user-select: none;
    padding: 2vh 0 1.8vh;
    transition: background 80ms, transform 20ms;
}

.toggle-visibility{ display: none; }
.toggle-visibility.visible{ display: inline-flex; }

.button-pair{
    display: grid;
    grid-template-columns: repeat(2,1fr);
    grid-gap: 5px;
    background: var(--body-background) !important;
    padding: 0 !important;
}
.paired-button{
    background: var(--button-color);
    padding: 2vh 0 1.8vh;
}
#powerButton, #squareBut, #power-1{ font-family: 'Charm', serif;}

sup{
    font-size: 0.7rem;
    position: relative;
    top: -5px;
    z-index: 1;
}
sub{
    position: relative;
    top: 5px;
    z-index: 1;
}


@media screen and (min-width: 768px) {
    :root{ font-size: 18px;}
}
@media screen and (min-width: 1200px) {
    :root{ font-size: 22px;}
}
@media screen and (min-width: 1500px) {
    :root{ font-size: 25px;}
}