/*
0 - 600px:      Phone
600 - 900px:    Tablet portrait
900 - 1200px:   Tablet landscape
[1200 - 1800] is where our normal styles apply
1800px + :      Big desktop

$breakpoint arguement choices:
- phone
- tab-port
- tab-land
- big-desktop

ORDER: Base + typography > general layout + grid > page layout > components

1em = 16px
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; }

body {
  position: relative;
  height: 100vh; }

html {
  font-size: 62.5%; }
  @media only screen and (max-width: 75em) {
    html {
      font-size: 56.25%; } }
  @media only screen and (max-width: 56.25em) {
    html {
      font-size: 50%; } }
  @media only screen and (min-width: 112.5em) {
    html {
      font-size: 75%; } }

body {
  color: #555;
  font-family: Open Sans;
  font-size: 1.6rem;
  font-weight: 400; }

.clearfix::after {
  content: "";
  display: table;
  clear: both; }

.right {
  float: right; }

.red {
  color: #FF5049 !important; }

.red-focus:focus {
  border: 1px solid #FF5049 !important; }

.logo-img {
  width: 7rem;
  position: absolute;
  top: 3.5rem; }

.top {
  height: 40vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2)), url(../christine-roy-unsplash.jpg);
  background-size: cover;
  background-position: center;
  position: relative; }

.budget {
  width: 30%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff; }
  @media only screen and (max-width: 56.25em) {
    .budget {
      width: 45%; } }
  @media only screen and (max-width: 37.5em) {
    .budget {
      width: 80%; } }
  .budget__title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 350; }
  .budget__value {
    font-weight: 300;
    font-size: 4.6rem;
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: .2rem; }
  .budget__income, .budget__expenses {
    padding: 1.2rem;
    text-transform: uppercase; }
    .budget__income::after, .budget__expenses::after {
      content: "";
      display: table;
      clear: both; }
    .budget__income--text, .budget__expenses--text {
      float: left;
      font-size: 1.3rem;
      color: #444;
      margin-top: .2rem; }
    .budget__income--value, .budget__expenses--value {
      letter-spacing: .1rem;
      float: left; }
    .budget__income--percentage, .budget__expenses--percentage {
      float: left;
      width: 3.4rem;
      font-size: 1.1rem;
      padding: .3rem 0;
      margin-left: 1rem; }
  .budget__income {
    margin-bottom: 10px;
    background-color: #28B9B5; }
  .budget__expenses {
    background-color: #FF5049; }
    .budget__expenses--percentage {
      background-color: rgba(255, 255, 255, 0.2);
      text-align: center;
      border-radius: 3px; }

.row {
  max-width: 114rem;
  margin: 0 auto; }
  .row:not(:last-child) {
    margin-bottom: 8rem; }
    @media only screen and (max-width: 56.25em) {
      .row:not(:last-child) {
        margin-right: 6rem; } }
  @media only screen and (max-width: 56.25em) {
    .row {
      max-width: 60rem; } }
  @media only screen and (max-width: 37.5em) {
    .row {
      width: 90%; } }
  .row::after {
    content: "";
    display: table;
    clear: both; }
  .row [class^="col-"] {
    float: left; }
    .row [class^="col-"]:not(:last-child) {
      margin-right: 4rem; }
      @media only screen and (max-width: 56.25em) {
        .row [class^="col-"]:not(:last-child) {
          margin-right: 0;
          margin-bottom: 6rem; } }
    @media only screen and (max-width: 56.25em) {
      .row [class^="col-"] {
        width: 100% !important; } }
  .row .col-1-of-2 {
    width: calc((100% - 4rem) / 2); }
  .row .col-1-of-3 {
    width: calc((100% - 2 * 4rem) / 3); }
  .row .col-2-of-3 {
    width: calc(2 * ((100% - 2 * 4rem) / 3) + 4rem); }
  .row .col-1-of-4 {
    width: calc((100% - 3 * 4rem) / 4); }
  .row .col-2-of-4 {
    width: calc(2 * ((100% - 3 * 4rem) / 4) + 4rem); }
  .row .col-3-of-4 {
    width: calc(3 * ((100% - 3 * 4rem) / 4) + 2 * 4rem); }

/**********************************************
*** BOTTOM PART
**********************************************/
/***** FORM *****/
.add {
  padding: 1.4rem;
  border-bottom: 1px solid #e7e7e7;
  background-color: #f7f7f7;
  margin-bottom: 2rem; }
  .add__container {
    margin: 0 auto;
    text-align: center; }
  .add__type {
    width: 5.5rem;
    border: 1px solid #e7e7e7;
    height: 4.4rem;
    font-size: 1.8rem;
    color: inherit;
    background-color: #fff;
    margin-right: 1rem;
    font-weight: 300;
    transition: border 0.3s; }
  .add__description, .add__value {
    border: 1px solid #e7e7e7;
    background-color: #fff;
    color: inherit;
    font-family: inherit;
    font-size: 1.4rem;
    padding: 1.2rem 1.5rem;
    margin-right: 1rem;
    border-radius: 5px;
    transition: border 0.3s; }
  .add__description {
    width: 33.3%; }
  .add__value {
    width: 10%;
    min-width: 8rem; }
  .add__btn {
    font-size: 3.5rem;
    background: none;
    border: none;
    color: #28B9B5;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.1;
    margin-left: 1rem; }
    .add__btn:active {
      transform: translateY(2px); }
    .add__btn:focus {
      outline: none; }
  .add__type:focus, .add__description:focus, .add__value:focus {
    outline: none;
    border: 1px solid #28B9B5; }

/***** LISTS *****/
.container {
  width: 95%;
  margin: 6rem auto; }

.income {
  float: left;
  width: 45%;
  margin-right: 3rem; }
  @media only screen and (max-width: 56.25em) {
    .income {
      width: 100%;
      margin-right: 0;
      margin-bottom: 3rem; } }
  .income__title {
    color: #28B9B5; }

.expenses {
  float: left;
  width: 45%; }
  .expenses__title {
    color: #FF5049; }
  @media only screen and (max-width: 56.25em) {
    .expenses {
      width: 100%; } }

h2 {
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 15px; }

.item {
  padding: 13px;
  border-bottom: 1px solid #e7e7e7; }
  .item:first-child {
    border-top: 1px solid #e7e7e7; }
  .item:nth-child(even) {
    background-color: #f7f7f7; }
  .item__description {
    float: left; }
  .item__value {
    float: left;
    transition: transform 0.3s; }
  .item__percentage {
    float: left;
    margin-left: 2rem;
    transition: transform 0.3s;
    font-size: 1.1rem;
    background-color: #FFDAD9;
    padding: .3rem;
    border-radius: 3px;
    width: 32px;
    text-align: center; }

.income .item__value,
.income .item__delete--btn {
  color: #28B9B5; }

.expenses .item__value,
.expenses .item__percentage,
.expenses .item__delete--btn {
  color: #FF5049; }

.item__delete {
  float: left; }
  .item__delete--btn {
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    display: none; }
    .item__delete--btn:focus {
      outline: none; }
    .item__delete--btn:active {
      transform: translateY(2px); }

.item:hover .item__delete--btn {
  display: block; }

.item:hover .item__value {
  transform: translateX(-20px); }

.item:hover .item__percentage {
  transform: translateX(-20px); }

.unpaid {
  background-color: #FFDAD9 !important;
  cursor: pointer;
  color: #FF5049; }

.unpaid .item__percentage {
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1); }

.unpaid:hover .item__description {
  font-weight: 900; }
