html {
  /* font-size: 62.5%; */
  box-sizing: border-box;
}

*, *::before,*::after {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: normal;
    box-sizing: border-box;
}


#page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    min-height: 100vh;
}

#content-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2vh;
    padding-bottom: 2.5rem;
}



#footer {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 2.5rem;
    color: white;
    background-color: #EA738DFF;
}

h1 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    font-weight: bolder;
    text-transform: capitalize;   
}

header {
    padding: 0.5rem;
    margin-bottom: 10px;
}

body {
    background: linear-gradient(to right, #CBCE91FF, #EA738DFF);
}


#calculator {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px palevioletred solid;
    border-style: outset;
    margin-bottom: 10px;
    padding: 2px;    
    min-height: 456px;
    min-width: 330px;
    border-radius: 6px;
}

#calculator .calculator-grid {
    display: grid;
    justify-content: center;
    align-content: center;
    gap: 4px;
    grid-template-columns: repeat(4, 80px);
    grid-template-rows: minmax(52px, auto) repeat(6, 52px); 
}


.calculator-grid > button {
    font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    cursor: pointer;
    font-size: 1.5rem;
    border: 1px solid #FFFFFF;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.75);
    /* margin: 1px; */
}

.calculator-grid > button:hover {
    background-color: #CBCE91FF;
}

.span-two-vertical {
    grid-row: span 2;
}

.span-two-horizontal {
    grid-column: span 2;
}

#calculator .output {
    grid-column: 1 / -1;
    background-color: rgba(0, 0, 0, 0.60);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center; 
    padding: 1.5rem;
    margin-bottom: 6px;
    word-wrap: break-word;
    word-break: break-all;
    height: 126px;
    border-radius: 4px;
    overflow: hidden;
    /* border: 1px solid red; */
}


.output .previous-operand {
    color: rgba(255, 255, 255, 0.75);
    font-size: 2rem;
}

.output .current-operand {
    color: white;
    font-size: 3rem;
}


/* Need to fix position
has to be under outline */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-text);
    /* text-indent: -3.9em; add negative text offset to hide class name */
    display: grid;
    align-self: center;
    font-size: small;
    position: absolute; 
    bottom: 50%;
    background: radial-gradient(green, yellow); 
    color: #FFF; 
    border-radius: 2px;
    opacity: 0; 
    transition: 0.3s; 
    overflow: hidden;
    max-width: 100%; /* avoids very long sentences */
    pointer-events: none; /* prevents tooltip from firing on pseudo hover */
}

.tooltip:hover::before {
    opacity: 1;
    bottom: 100%;
}
