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

/* + + + + + STYLING: GLOBAL RESET + + + + + */

/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin/padding */
* {
  margin: 0;
  padding: 0;
}

/* Improve text rendering */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* global button reset */
button {
  all: unset;
  cursor: pointer;
}

/* + + + + + STYLING: GLOBAL COLOURS + + + + + */

:root {
  --body: #d1d2c8;
  --chassis: #53514a;
  --display-screen: #858173;
  --btn-nums: #95a37e;
  --btn-ops: #c97b63;
  --btn-controls: #e6d5b8;
  --text-heading: #5d362a;
  --text-body: #4d3d34;
  --text-button: #42302b;
}

/* + + + + + STYLING: TEXT & FONTS + + + + + */
h1 {
  color: var(--text-heading);
  font-family: 'Lora', serif;
  font-weight: 600;
}
p {
  color: var(--text-body);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}
#display-screen,
button {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 20px;
}

/* STYLING: COLOURS, ROUNDED CORNERS */
body {
  padding: 10px 30px;
  background-color: var(--body);
}
#calc-chassis {
  background-color: var(--chassis);
  border-radius: 20px;
  padding: 40px 15px;
}
#display-screen {
  background-color: var(--display-screen);
  padding: 20px;
  border-radius: 3px;
}
button {
  border-radius: 10px;
  text-align: center;
  color: var(--text-button);
}
.btn-nums {
  background-color: var(--btn-nums);
}
.btn-ops {
  background-color: var(--btn-ops);
}
.btn-controls {
  background-color: var(--btn-controls);
}

/* + + + + + + + LAYOUT: FLEXBOX & SIZING + + + + + + + */

#calc-chassis {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 350px;
  margin-top: 40px;

  /* control for overflow, part 1 */
  justify-content: flex-end;
}

#display-screen {
  width: 85%;

  /* control for overflow, part 2 */
  float: right;
  text-align: end;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#button-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 85%;
}

button {
  width: 60px;
  height: 60px;
}
