:root {
  /* ## Layout */
  /* 
The designs were created to the following widths:

- Mobile: 375px
- Desktop: 1440px */

  /*  Colors */
  /* Primary */

  --color-red-500: hsl(10, 79%, 65%);
  --color-blue-300: hsl(186, 34%, 65%);

  /* Neutral */

  --color-brown-950: hsl(25, 47%, 15%);
  --color-brown-400: hsl(28, 10%, 53%);
  --color-red-100: hsl(26, 66%, 93%);

  /* Typography */
  --font-primary: "DM Sans", sans-serif;
  --font-weight-regular: 400;
  --font-weight-bold: 700;

  /* Layout */
  --radius-lg: 1.6rem;
  --radius-sm: 0.4rem;
}
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /*1rem =10px*/
}

body {
  height: 100vh;
  font-family: var(--font-primary);
  font-size: 1.8rem;
  background-color: var(--color-red-100);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.h1 {
  font-size: 3.2rem;
  font-weight: var(--font-weight-bold);
}

.h2 {
  font-size: 2.4rem;
  font-weight: var(--font-weight-bold);
}

.h6 {
  font-size: 1.4rem;
  font-weight: var(--font-weight-regular);
}

/* layouts */

main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
}

.container-chart-component {
  width: 100%;
  max-width: 42rem;
  padding: 2rem;
}
/*  */
.component-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--color-red-500);
}

.component-header > div > p {
  color: #fff;
}

.contents {
  margin-top: 2rem;
  padding: 2rem;
  background: #fff;

  border-radius: var(--radius-lg);
}

.contents > h2 {
}

/* charts */
.chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 20rem;
  margin: 4rem 0;
}

.bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bar {
  width: 3.2rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-red-500);
  cursor: pointer;

  transition: opacity 0.15s ease;
}

.bar:hover {
  opacity: 0.75;
}
.bar--max {
  background-color: var(--color-blue-300);
}
.amount {
  background-color: var(--color-brown-950);
  color: #ffffff;
  font-size: 1.2rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.15s ease;
}

.bar-wrapper:hover .amount {
  opacity: 1;
  visibility: visible;
}

.day {
  margin-top: 0.6rem;
  font-size: 1.2rem;
  color: var(--color-brown-400);
}

/*  */
.component-footer {
  margin-top: 2.8rem;
  padding-top: 2.8rem;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  border-top: 0.2rem solid var(--color-red-100);
}

.total-month {
  color: var(--color-brown-400);
}
.total-month-value {
  color: var(--color-brown-950);
}
.right {
  text-align: right;
  font-size: 1.2rem;
}
#num {
  color: var(--color-brown-950);
  font-weight: var(--font-weight-bold);
}
#texts {
  color: var(--color-brown-400);
  font-weight: var(--font-weight-regular);
}
/* footer */
footer {
  margin-bottom: 1rem;
}
.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}
