@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600&family=Roboto:wght@400;700&display=swap');

*, body {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	font-family: 'Quicksand', 'Roboto', sans-serif;
}

body {
    height: 100%;
    background: linear-gradient(180deg, rgba(131, 124, 255, 1) 0%, rgba(9, 9, 121, 1) 100%);
}

.calculator {
	border-radius: 1rem;
	box-shadow: 5px 5px 12px rgba(0,0,0,0.5);
    width: 300px;
    height: fit-content;
    margin: 30px auto;
    background-color: gray;
}

.calculator .display {
	background: #212121;
	padding: 1rem;
	border-top-right-radius: 1rem;
    border-top-left-radius: 1rem;
}

.display .calculator-display {
	width: 100%;
	border: 0px;
	background: #3B3B3B;
	border-radius: .725rem;
    padding: .650rem;
    box-shadow: inset 2px 3px 5px 0px rgba(0,0,0,0.7);
    outline: none;
}

.calculator-display output {
	display: block;
	border: none;
	outline: none;
	background: transparent;
	width: 100%;
}

output#user-input {
	font-size: 1.325rem;
	font-weight: 400;
	text-align: right;
	color: #60A07F;
}

output#result {
	font-size: 1.625rem;
	font-weight: 600;
	text-align: right;
	color: white;
}

.calculator .all-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 100%;
    grid-gap: .5rem;
    padding: 1rem;
    background: silver;
    border-bottom-right-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.all-buttons button {
    font-size: 1.325rem;
    padding: 1rem 0;
    font-weight: 700;
    background: #616161;
    border: 0px solid transparent;
    outline: none;
    text-decoration: none;
    border-radius: 100%;
    box-shadow: 4px 5px 5px 0px rgba(0,0,0,0.5);
    color: #DFDFDF;
    cursor: pointer;
    transition: all .15s ease-in-out;
}

.all-buttons .digits,
.all-buttons .decimal {
    background: #f7e9e9;
    color: #616161;
}

.all-buttons .allclear,
.all-buttons .clear {
    background: #d90000;

}

#exponent {
    padding: 0 0 5px 5px;
}

sup {
    background-color: inherit;
    font-size: .7rem;
}

button.equals {
	border-radius: 2.5rem;
}

button.equals:hover {
	background: limegreen;
	color: var(--white);
	transform: translateY(-0.2rem);
}

button.digits:hover,
button.decimal:hover {
	background: #bdbdbd;
	color: #212121;
	transform: translateY(-0.2rem);
}

button.operators:hover {
	background: mediumturquoise;
	color: #000;
	transform: translateY(-0.2rem);
}

button.allclear:hover,
button.clear:hover {
	background: lightcoral;
	color: #000;
	transform: translateY(-0.2rem);
}

button.digits:active,
button.operators:active,
button.decimal:active,
button.allclear:active,
button.clear:active,
button.equals:active {
    transform: translateY(0rem);
}

/* Tooltip container */
.tooltip {
	position: relative;
	display: inline-block;
	/* border-bottom: 1px dotted black;
	If you want dots under the hoverable text */
}

/* Tooltip text */
.tooltip .tooltiptext {
	visibility: hidden;
	width: 200px;
	background-color: black;
	color: #fff;
	font-size: 12px;
	text-align: center;
	padding: 5px 0;
	border-radius: 6px 6px 0 6px;

	/* Position the tooltip text */
	position: absolute;
	z-index: 1;
	bottom: 100%;
	left: 50%;
	margin-left: -210px;
	margin-bottom: -15px;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
	visibility: visible;
}