/*
|   =========================================================
|   InvoicePlane Templates Sass Stylesheet - since 1.6.3
|   https://invoiceplane.com
|   =========================================================
|   The following styles are needed to display html Invoices
|   and Quotes. Used in templates to make pdf
|   =========================================================
*/
/*
|   =========================================================
|   Import InvoicePlane Stamp Styles
|   =========================================================
*/

@import "stamp";

/*
|   =========================================================
|   Base Styles
|   =========================================================
*/

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

a {
  color: $color_primary;
  text-decoration: underline;
}

body {
  position: relative;
  width: 21cm;
  height: 29.7cm;
  margin: 0 auto;
  color: $color_base;
  background: #FFFFFF;
  font-family: sans-serif;
  font-size: 14px;
}

header {
  padding: 10px 0;
  margin-bottom: 30px;
}

#logo {
  text-align: right;
  margin-bottom: 30px;
}

#invoice-logo {
  max-height: 125px;
  text-align: right;
}

.invoice-title {
  color: $color_primary;
  font-size: 2em;
  line-height: 1.4em;
  font-weight: normal;
  margin: 20px 0;
}

#company {
  float: right;
  text-align: right;
  width: 40%;
}

#client {
  float: left;
  width: 55%;
  margin-right: 5%;
}

.invoice-details {
  text-align: right;

  table {
    border-collapse: collapse;
    border-spacing: 0;
    text-align: right;
    width: 40%;
    margin: 0 0 0 auto;
    font-size: 12px;

    td {
      width: auto;
      margin: 0;
      padding: 0 0 0.5em 0;
    }

    &.large {
      width: 100%;
    }
  }
}

// Scope: views invoice & quote templates pdf (InvoicePlane.php)
table.item-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-bottom: 20px;
  font-size: 12px;

  tr:nth-child(2n-1) td {
    background: #F5F5F5;
  }

  th {
    padding: 10px 15px;
    border-bottom: 1px solid $color_base_light;
    white-space: nowrap;
    text-align: left;
    &.text-right {
      text-align: right;
    }
  }

  td {
    padding: 10px 15px;
  }

  .invoice-sums {
    text-align: right;
  }
}

.invoice-terms {
  color: $color_base_lighter;
  width: 100%;
  border-top: 2px solid $color_base_lighter;
  padding: 8px 0;
}

@page {
  footer: html_footer;
}

footer {
  text-align: center;
  font-size: 12px;
}

.text-right {
  text-align: right;
}

.text-red {
  color: $color_red;
}

.text-green {
  color: $color_green;
}
