@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

@font-face {
    font-family: "Tex Gyre Termes";
    src: url("/assets/fonts/texgyretermes-italic.woff2") format("woff2"),
         url("/assets/fonts/texgyretermes-italic.woff") format("woff");
    font-weight: normal;
    font-style: italic;
}

:root {
    /* COLORS */
    --lightGray: #f5f5f5;
    --red: #BF0C34;
    --dark-red: #9f082a;
    --white: #ffffff;
    --text-gray: #d9d9d9;
    --gray: #454545;
    /* FONT */
    --tex-gyre: "Tex Gyre Termes", sans-serif;
    --kanit: "Kanit", sans-serif;
    --roboto: "Roboto", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-x: hidden;
}

body::-webkit-scrollbar, 
main::-webkit-scrollbar {
    display: none;
}

main {
    background: url('../assets/mesh-bg.png') lightgray 50% / cover no-repeat;
}

footer {
    padding: 20px;
    width: 100vw;
    height: 7rem;
    text-align: center;
    background-color: var(--red);
    color: var(--white);
    font: 300 1.25rem/1.25rem var(--roboto);
}

footer h3,
footer p {
    padding: 5px;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 60px;
}

.calculator-header {
    width: 100%;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    background-color: var(--red);
}

.container-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.container-logo img {
    width: 64px;
    height: 64px;
    margin-left: 120px;
}

.container-logo h1 {
    color: var(--white);
    font: normal 500 2rem/normal var(--kanit);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 60px;
}

.nav-item {
    text-decoration: none;
    color: var(--white);
    font: normal 400 1.5rem/normal var(--kanit);
    gap: 80px;
}

.nav-item:last-child {
    margin-right: 120px;
}

/* Matrix Calculator Styling */
.input-fields {
    width: 100vw;
    height: 15rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dimension-gen {
    padding-top: 4rem;
    display: flex;
    flex-direction: row;
    gap: 4rem;
    color: var(--white);
}

.matrix {
    background: var(--red);
    width: 28.4375rem;
    height: 7.0625rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    font: 400 1.25rem/1.25rem var(--roboto);
    padding: 0 2rem;
    border-radius: 10px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}


.matrix input {
    width: 20rem;
    height: 2rem;
    border-radius: 5px;
    border-color: var(--text-gray);
    padding-left: 10px;
    font: normal 300 1rem/normal var(--roboto);
}

.matrix input::placeholder {
    font-family: var(--tex-gyre);
    font-size: 1rem; 
    padding: 0 3px;
}

.matrix input:focus {
    outline: none;
    font-family: var(--roboto);
    font: normal 400 1rem/normal var(--tex-gyre);
}

.dimension-gen button {
    margin-top: 2rem;
    padding: auto;
    align-items: center;
    text-align: center;
    width: 5rem;
    height: 3rem;
    font: normal 400 1rem/normal var(--roboto);
    background: var(--red);
    color: var(--white);
    border: 1px solid var(--red);
    border-radius: 10px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dimension-gen button:hover,
.arithmetic:hover {
    background: var(--white);
    color: var(--red);
    border: 1px solid var(--red);
}

.dimension-input:disabled {
    background: var(--lightGray);
    color: var(--gray);
}

.matrix-operations {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 50px;
    gap: 30px;
}

.matrix-btns,
.matrix-arithmetic {
    display: flex;
    flex-direction: column;
}

.matrix-grid {
    width: 22.5rem;
    height: 25.25rem;
    border: 1px solid var(--red);
    border-radius: 1rem;
    background: var(--white);
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.matrix-btns {
    position: relative;
    gap: 10px;
}

.matrix-arithmetic {
    gap: 1rem;
}

.matrix-btns button {
    color: var(--red);
    font: normal 400 1rem/normal var(--roboto);
    padding: 1rem;
    border: 1px solid var(--red);
    background: var(--white);
    border-radius: 0.625rem;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.matrix-btns button:hover {
    background: var(--red);
    color: var(--white);
    border: 1px solid var(--white);
}

.transpose {
    padding: 0.83rem 1.6rem;
}

.arithmetic {
    color: var(--white);
    border-radius: 0.625rem;
    font: normal 400 1rem/normal var(--roboto);
    border: 1px solid transparent ;
    background: var(--red);
    padding: 1rem 2rem;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.matrix-cell {
    width: 100%;
    height: 100%;
    text-align: center;
    font: normal 400 1rem/normal var(--roboto);
}

.matrix-cell:focus {
    outline: none;
    font: normal 400 1rem/normal var(--roboto);
}

.result { 
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 6rem 0;
    gap: 20px;
    /*background: var(--red);*/
    width: 100vw;
    height: 75vh;
    color: var(--white);
}

.results-text {
    width: 22rem;
    height: 12rem;
    border: 1px solid var(--lightGray);
    background: var(--red);
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.result-cell {
    border: 1px solid var(--red);
    border-radius: 1rem;
    text-align: center;
    color: var(--gray);
    font: normal 400 1rem/normal var(--roboto);
}

#container-result {
    table-layout: fixed;
    border: 1px solid var(--dark-red);  
}

.format {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 5rem;
    font: italic 400 3rem/normal var(--tex-gyre);
    gap: 15px;
}

.arrow {
    margin: 15px 0 0 12.5rem;
    font: normal 700 2.75rem / normal var(--roboto);
}

.format > h3:first-of-type {
    padding-left: 2rem;
}

.result-header {
    font: normal 400 1.25rem/1.25rem var(--roboto);
    padding: 1rem 2rem;
}