/* 
    Created by Dave Becker: 10/22/19
    Edited by Ben Townsend: 10/22/19: Added screen
    Edited by Dave Becker: 10/27/19: Style changes & memory
    Edited by Jack Thompson: 10/27/19: History
    Edited by Dave Becker 10/28/19: History & colors
    Edited by Dave Becker 10/29/19: Information footer
    Edited by Dave Becker 10/30/19: Wrapped words to avoid overflow
    Edited by Ben Townsend 10/30/19: Added modeInfo
*/

body {
    margin: 0;
    background: linear-gradient(to bottom, #EAECC6, #2BC0E4); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.title {
    width: 100%;
    text-align: center;
    padding-bottom: 10px;
    padding-top: 10px;
}
#container {
    display: flex;
    justify-content: space-between;
    margin: 0;
    overflow: auto;
    padding-bottom: 80px;
}
#table-container {
    height: 100%;
    flex-shrink: 0;
    width: 40em;
}
#table-container table {
    padding: 10px;
    background-color: black;
    border-radius: 10px;
    border-collapse: separate;
    width: 40em;
    border-spacing: 12px;
    table-layout: fixed;
}
#history-container {
    margin-right: 40px;
    margin-left: 40px;
}
#memory-container {
    margin-left: 40px;
}
#container::after {
    content: "";
    flex: 0 0 40px;
}
#memory-container, #history-container {
    margin-top: 100px;
    flex: 1;

    /* Overflow solution */
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-all;
    word-break: break-word;
    overflow-wrap: anywhere;

    border: 2px solid black;
    border-radius: 10px;
    align-self: flex-start;
}
td {
    text-align: center;
    padding: 0;
}
td, .calc-btn, .history-item-button {
    border-radius: 10px;
}
td, .calc-btn, .memory-item-button {
    border-radius: 10px;
}
.calc-btn, .memory-item-button, .history-item-button {
    font-size: 2em;
    padding: 10px;
    width: 100%;
    min-height: 70px;
    height: 100%;
    border: none;
    background-color: #f0f0f0;
}
.calc-btn:not(.active):not(:disabled):hover {
    opacity: 0.8;
    cursor: pointer;
}
#screen{
    padding: 15px;
    height: 70px;
    font-size: 32px;
    background-color: white;
    overflow-wrap: break-word;
}
#modeInfo{
    text-align: left;
    color: white;
}
.red {
    /* background-color: rgb(247, 132, 41); */
    background-color: #e84118;
}
.blue {
    /* background-color: #3bfc9f; */
    background-color: #00a8ff;
}
.orange {
    /* background-color: #ecf752; */
    background-color: #fbc531;
}
.green {
    /* background-color: #fa504b; */
    background-color: #4cd137;
}
.grey {
    background-color: #a8a8a8;
}
.white {
    background-color: rgb(240, 240, 240);
}
/* Used when operator is selected */
.active {
    background-color: #D5D5D5;
    color: #e84118;
}
#history-list{
    list-style: none;
    padding: 0;
    margin: 0;
}
#history-list li {
    margin: 10px;
}
#memory-list{
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 120px;
}
#memory-list li {
    margin: 10px;
    position: relative;
}
.history-item-button:hover {
    cursor: pointer;
    background-color: #e6e6e6;
}
.memory-item-button:hover {
    cursor: pointer;
    background-color: #e6e6e6;
}
.close {
    top: -7px;
    right: 13px;
    position: absolute;
    text-decoration: none;
    color: red;
    font-size: 20px;
}
.close:hover {
    color: #902020;
}
.fa-circle {
    color: white;
}
#history-container {
    text-align: center;
    position: relative;
}
#history-head{
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    border-bottom: 1px solid black;
}
#history-container h2 {
    flex: 1;
    width: 100px;
}
#history-clear {
    height: 70px;
    background: none;
    border: none;
    border-left: 1px solid black;
    width: 60px;
    border-radius: 0 10px 0 0;
    padding: 0;
    font-size: 13px;
}
#history-clear:hover {
    background-color: #e6e6e6;
    cursor: pointer;
}

#footer{
    margin: 0;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}
#information {
    padding: 20px;
    width: 700px;
    border: 1px dashed black;
    background-color: lightgray;
}
#information p {
    font-size: 18px;
}
#information h2 {
    text-align: center;
}
.btn-default {
    height: 50px;
    top: 24px;
    left: 24px;
    position: absolute;
}