@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,700&display=swap');

body {
    background-color: hsl(33, 100%, 98%);
}

.expense-chart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

.balance-header {
    display: block;
    background-color: hsl(10, 79%, 65%);
    width: 470px;
    height: 80px;
    padding: 16px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-radius: 14px;
}

.title-and-amount {
    float: left;
}

.title-and-amount .title {
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    color: hsl(27, 66%, 92%);
    font-weight: 400;
    margin-bottom: 0;
}

.title-and-amount .amount {
    margin-top: 8px;
    font-size: 24px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    color: hsl(27, 66%, 92%);
    margin-bottom: 0;
}

.expense-logo {
    width: auto;
    height: auto;
    padding: 16px;
    float: right;
}

.chart-info {
    background-color: hsl(0deg 0% 100%);
    padding: 16px;
    border-radius: 14px;
    margin-top: 20px;
    height: 456px;
}

.chart-info .chart-title {
    font-size: 26px;
    color: hsl(25, 47%, 15%);
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
}

/* Bar Chart */

  .chart-container{
    position: relative;
    margin-top: 40px;
  }
  
  svg{
    border-radius: .123rem;
  }
  .bar {
    fill: hsl(10, 79%, 65%);
    transition: all 150ms ease;
  }
  
  .bar:hover {
    fill: hsl(10, 64%, 81%);
  }
  
  .axis--x path {
    visibility: hidden;
  }
  
  .axis--y {
    visibility: hidden;
  }
  
  svg text{
    fill: black;
  }

  .tick line {
    visibility: hidden;
  }

  .tick text {
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    fill: hsl(28, 10%, 53%);
  }
  
  /* tip */
  .tip{
    width: 3rem;
    padding: 5px;
    font-size: 14px;
    font-weight: 700;
    color: hsl(27, 66%, 92%);
    font-family: 'DM Sans', sans-serif;
    background-color: hsl(25, 47%, 15%);
    text-align: center;
    box-shadow: 0px 2px 10px -2px #aaa;
    border: 1px solid #444;
    border-radius: 6px;
    transition: all 160ms cubic-bezier(0.455, 0.03, 0.515, 0.955);
  }
  .tip::after{
    content: " ";
    position: absolute;
    bottom: -.5rem;
    left: 50%;
    margin-left: -.5rem;
    border-style: none;
    border-width: .5rem .5rem 0 .5rem;
    border-color: #444 transparent transparent transparent;
  }

  .chart-breakline {
    width: 100%;
    height: 0.5px;
    background-color: hsl(28, 10%, 53%);
  }

  /*  */

  .month-balance {
    display: block;
  }

  .current--month {
    float: left;

  }

  .current--month .currentmonth--text {
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    color: hsl(28, 10%, 53%);
    margin-bottom: 0;
  }
  .current--month .currentmonth--amount {
    font-size: 30px;
    font-family: 'DM Sans', sans-serif;
    color: hsl(25, 47%, 15%);
    font-weight: 700;
    margin: 0px;
  }

  .previous--month {
    float: right;
  }

  .previous--month .previousmonth--percentage {
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    color:hsl(25, 47%, 15%);
    margin-top: 40px;
    margin-bottom: 0;
  }
  .previous--month .previousmonth--text {
    font-size: 18px;
    color: hsl(28, 10%, 53%);
    font-family: 'DM Sans', sans-serif;
    margin: 0;
  }
  

  @media only screen and (max-width: 480px) {
    .balance-header {
      width: 320px;
      padding: 9px;
    }

    .background-style {
      width: 320px;
      height: 250px;
    }

    rect {
      width: 36px;
    }

    .whole-chart {
      transform: translate(0px , 0px);
    }

    .previous--month .previousmonth--percentage {
      margin-top: 30px;
    }

    .chart-info {
      height: 408px;
      padding: 11px;
    }

    .expense-logo {
      padding: 8px;
    }

    .title-and-amount .title {
      font-size: 14px;
    }

    .title-and-amount .amount {
      font-size: 22px;
    }

    .chart-info .chart-title {
      font-size: 24px;
    }

    .current--month .currentmonth--text {
      font-size: 14px;
    }

    .current--month .currentmonth--amount {
      font-size: 28px;
    }

    .previous--month .previousmonth--percentage {
      font-size: 0.9rem;
    }

    .previous--month .previousmonth--text {
      font-size: 14px;
    }
  }