body, html {
    height: 100dvh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: lightcoral;
}

* {
    padding: 0;
    margin: 0;
}

.main {
    width: 100vw;
    height: 100vh;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;

}

@font-face {
    font-family: "IBM_Plex_Sans_Medium";
    src: url("fonts/IBM_Plex_Sans/static/IBMPlexSans-Regular.ttf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "IBM_bold";
    src: url("fonts/IBM_Plex_Sans/Static/IBMPlexSans-Bold.ttf");
    font-weight: bold;
    font-style: normal;
}

.leftwindow {
    width: 40vw;
    height: 70vh;
    padding: min(10px, 5%);
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    grid-template-rows: repeat(20, 1fr);
    background-color: white;
    border-radius: 15px 0 0 15px;
}

.rightwindow {
    position: relative;
    left: -2vw;
    width: 40vw;
    height: 70vh;
    background-color: teal;
    padding: min(10px, 5%);
    border-radius: 0 15px 15px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: lightgrey;
}

.leftwindow, .rightwindow{
    box-shadow: 0 0 4px grey;
}

#header {
    font-family: "IBM_Plex_Sans_Medium", Arial;
    font-size: clamp(1em, 1.5em, 2em);
    margin: 5px;
    margin-left: 0;
    grid-row: 2;
    grid-column: 2/11;
    display: flex;
    flex-wrap: nowrap;
}

.fontclass{
    font-family: "IBM_Plex_Sans_Medium", Arial;
    font-size: 1em;
}

button, .radiobutton p, .frame p {
    font-family: IBM_bold, "Arial Black";
    font-size: 1em;
}

#clearall {
    grid-row: 2;
    grid-column: 17/20;
}

#amountlabel {
    grid-row: 4;
    grid-column: 2/20;
}

.ammountclass {
    border: 2px solid red;
    grid-row: 5;
    grid-column: 2/20;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 9vh;
}

.inputbaramount {
    grid-row: 5/6;
    grid-column: 2/20;
}

.inputterm {
    grid-row: 8/9;
    grid-column: 2/10;
}

.rateterm {
    grid-row: 8/9;
    grid-column: 11/20;
}

.inputbaramount, .inputterm, .rateterm {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.inputbaramount p {
    border-right: none;
    width: 10%;
    border-radius: 5px 0 0 5px;
}

.inputbaramount p, .inputterm p, .rateterm p {
    margin: 0;
    padding: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    text-align: center;
    box-sizing: border-box;
}

.inputterm p, .rateterm p {
    border-left: none;
    border-radius: 0 5px 5px 0;
}

.inputterm p {
    width: 30%;
}

.rateterm p {
    width: 15%;
}

.inputbaramount input {
    border-left: none;
    border-radius: 0 4px 4px 0;
    width: 85%;
}

.inputterm input, .rateterm input {
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.inputterm input {
    width: 75%;
}

.rateterm input {
    width: 75%;
}

.inputbaramount input,
.inputterm input,
.rateterm input {
    border: 1px solid #ccc;
    padding: 8px;
    margin: 0;
    height: 100%;
    box-sizing: border-box;
}

#termlabel {
    grid-row: 7;
    grid-column: 2/9;
}

#ratelabel {
    grid-row: 7;
    grid-column: 11/20;
}

#typelabel {
    grid-row: 10;
    grid-column: 2/20;
}

.radiobutton {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 2px solid lightgrey;
    border-radius: 5px;
    height: 70%;
    width: 100%;
    padding: 10px;
}

.radiobutton:hover {
    border: 2px solid yellowgreen;
}

button:hover{
    background-color: lightgreen;
}

.radiobutton#repayment {
    grid-row: 11;
    grid-column: 2/18;
}

.radiobutton#interest {
    grid-row: 13;
    grid-column: 2/18;
}

.radiobutton input[type="radio"] {
    margin-right: 8px;
}

.buttons {
    grid-row: 15/17;
    grid-column: 2/10;
}

button {
    width: 100%;
    height: 100%;
    background-color: yellowgreen;
    border-radius: 25px;
    border: 0;
}

.grey {
    color: grey;
}

.leftinput {
    border: 2px solid lightgrey;
    border-right: 0;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.frame{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    width: 100%;
    white-space: pre;
}

.frame h1{
    font-family: "IBM_Plex_Sans_Medium", Arial;
    font-size: 2em;
    color: white;
}