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

:root {
    --primaryColor: #121212;
    --secundaryColor: #141E61;
    --White: #EEEEEE;
    --gris: #505268;
    --box-shadow: #121212;
}

.root {
    width: 100%;
    height: 100vh;
}

.sub_root {
    max-width: 880px;
    min-width: 360px;
    height: auto;
    min-height: 100%;
    margin: 0 auto;
}

.title {
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.title_text {
    color: #858d95;
    font-family: 'Ubuntu', sans-serif;
    font-weight: bold;
    font-size: 26px;
}

.container_input {
    width: 100%;
    height: 40px;
    margin-bottom: 60px
}

.buttonDelete_container {
    display: flex;
    margin-top: 12px;
    width: 100%;
    justify-content: flex-end;
}

.buttonDelete {
    background-image: url(https://cdn-icons-png.flaticon.com/512/159/159057.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border: none;
    background-color: transparent;
    width: 40px;
    height: 40px;
    cursor: pointer;
    filter: invert(30%);
    margin-right: 22px;
}

.historybutton {
    border: none;
    background-color: transparent;
    background-image: url(./../assets/menu.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    height: 40px;
    width: 40px;
    cursor: pointer;
    margin-left: 10px;
}

.historybutton_clear_container {
    display: flex;
    width: 100%;
    justify-content: end;
    padding-right: 52px;
    position: relative;
}

.historybutton_clear {
    background-color: var(--White);
    border: none;
    color: #293845;
    border-radius: 12px;
    width: 124px;
    height: 24px;
    cursor: pointer;
    position: relative;
    font-family: 'Ubuntu', sans-serif;
}

.calculator_input {
    color: #293845;
    border: none;
    outline: none;
    height: 40px;
    width: 100%;
    text-align: end;
    font-size: 46px;
    font-family: 'Signika Negative', sans-serif;
    padding: 0 12px;
}

.containerButtons {
    grid-column-gap: 6px;
    grid-row-gap: 28px;
    display: grid;
    width: 100%;
    min-width: 360px;
    grid-template-columns: repeat(5, auto);
    grid-template-rows: repeat(5, auto);
}

.containerButtons_buttons {
    display: flex;
    justify-content: center;
    align-items: center;
}

.button {
    height: 54px;
    width: 44px;
    border: none;
    background-color: transparent;
    font-family: 'Signika Negative', sans-serif;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
}

.button_reset {
    background-color: #d3455b;
    border-radius: 8px;
    color: white;
}

.containerButtons .containerButtons_buttons:last-child {
    background-color: #6558f5;
    grid-column: 2/6;
    border-radius: 8px;
    width: 92%;
}

.button20 {
    color: white;
    width: 100%;
}

.button_container15,
.button_container16,
.button_container17,
.button_container18 {
    grid-row: 1/2;
}

.button_container10,
.button_container11,
.button_container12 {
    grid-column: 5/6;
}

.button_container10 {
    grid-row: 2/3;
}

.button_container11 {
    grid-row: 3/4;
}

.button_container12 {
    grid-row: 4/5;
}

.calculator_operacion {
    width: 100%;
    display: flex;
    justify-content: end;
    margin-bottom: 12px;
}

.calculator_operacion p {
    color: #293845;
    font-family: 'Ubuntu', sans-serif;
    padding-right: 10px;
}

.buttonReset {
    grid-column: 1/2;
    grid-row: 1/2;
}

.containerButtons_buttons--mode {
    grid-row: 5/6;
    grid-column: 1/2;
}

.button_mode {
    background-color: #858d95;
    width: 44px;
    border-radius: 34px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: none;
    outline: none;
}

.button_mode:active {
    background-color: #293845;
}

.operacion {
    color: #293845;
    font-family: 'Ubuntu', sans-serif;
}

.button_mode_circule {
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background-color: white;
}

.container_containerbuttons {
    width: 100%;
}

.menuHistory {
    width: 100%;
    height: auto;
    min-height: 100%;
    background-color: var(--primaryColor);
    display: none;
    padding: 24px 0;
}

.buttonClose {
    border: none;
    outline: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 20px;
    background-image: url(https://cdn-icons-png.flaticon.com/512/58/58253.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.result_container {
    display: grid;
    place-items: center;
    grid-template-columns: repeat(2, auto);
    line-height: 3;
    text-align: center;
}

.result {
    color: var(--White);
    font-size: 24px;
    font-family: 'Ubuntu', sans-serif;
    width: 174px;
}

.HistoryTitle {
    display: flex;
    width: 100%;
    justify-content: center;
}

.HistoryTitle_text {
    color: var(--White);
    font-size: 26px;
    font-family: 'Ubuntu', sans-serif;
}

span {
    overflow-wrap: break-word;
    display: block;
    line-height: 1;
}

@media(min-width: 768px) {
    .sub_root {
        padding: 0 40px
    }
    .button {
        font-size: 28px;
    }
    .title_text {
        font-size: 22px;
    }
    .result {
        width: 100%;
    }
}


/*--------------  Dark Mode -----------------*/

body.dark .root{
    background-color: var(--primaryColor);
    transition: 0.5s ease;
}



body.dark .calculator_input {
    color: var(--White);
    background-color: transparent;
}

body.dark .title_text {
    color: var(--White);
}

body.dark .operacion {
    color: var(--White);
}

body.dark .button {
    color: var(--White);
}

body.dark .button_mode {
    justify-content: end;
    background-color: var(--secundaryColor);
}

body.dark .containerButtons .containerButtons_buttons:last-child {
    background-color: var(--gris);
}

body.dark .buttonDelete {
    filter: invert(90%);
}