/* Graphs */
.graph-wrapper{
  box-shadow: 0 2px 4px 0 rgba(35,36,37,0.3);
  border-radius: 4px;
}

.graph-actions {
  padding: 24px 0;
}

.graph {
  padding-left: 10px;
  position: relative;
  z-index: 1;
}

.bars .graph {
  padding-left: 0;
}

.graph-container .graph {
  padding-right: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 4px 0 rgba(35,36,37,0.3);
}

.graph h3, .graph-data h3, .graph-data > p {
	font-size: 1em;
	font-weight: bold;
	line-height: 1.7em;
	padding: 27px 0;
  margin: 0;
}

.graph h3 {
  padding: 0;
  margin: 26px 16px 10px;
  line-height: inherit;
}

.graph .legend {
  margin: 10px 0;
  overflow: hidden;
}

.bars .graph .legend {
  margin-left: 20px;
}

.graph .legend div {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  float: left;
  width: 50%;
  padding-left: 18px;
  font-size: 0.75em;
  font-weight: 600;
}

.bars .graph .legend div {
  float: none;
  display: inline-block;
}

.graph .legend i {
  display: inline-block;
  margin-left: -18px;
  margin-right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 4px;
}

.graph svg {
  width: 100%;
  font-family: inherit;
  font-size: 1em;
  transform: translateZ(0); /* Fix any render glitches by using GPU */
}

.graph svg text {
  font-family: inherit;
  font-size: 0.75em;
  font-weight: 600;
}

.line .graph svg text {
  font-size: 0.75em;
}

.graph-wrapper .graph svg text:nth-child(2n),
.graph-container.line .graph svg text:nth-child(2n) {
  fill: none;
  stroke: none;
}

@media screen and (max-width:640px) {
  .line .graph svg text {
    font-size: 0.625em;
  }
}

/* Single-Detached Home and Condo Prices by City */
@media screen and (max-width:800px) {
  .graph-container.home-prices .graph svg {
    height: 420px;
  }

  .graph-container.home-prices .labels.mobile text {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    text-anchor: start;
  }
}

@media screen and (max-width:920px) {
  .graph-container.home-prices .labels.mobile text {
    font-size: 0.65em;
  }
}

/* Desktop graph does not fit well in the FAQ blocks */
.article-listing .answer svg .mobile,
.help-article .answer svg .mobile {
  visibility: visible;
}

.article-listing .answer svg .desktop,
.help-article .answer svg .desktop {
  visibility: hidden;
}

.help-article .answer .graph-container {
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

/* Graph data */
.graph {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background: white;
  border: 1px solid #F3F4F6;
  border-radius: 4px 4px 0 0;
}

.graph-data {
	background-color: #FFF;
	border: 1px solid #F3F4F6;
	border-radius: 3px;
	box-shadow: 0 2px 4px 0 rgba(35,36,37,0.3);
	margin-bottom: 20px;
  display: block;
}

.graph-data[hidden] {
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: fixed;
  left: 200vw;
  top: 0;
}

.graph-data table {
  border-radius: 4px;
}

.graph-data .title a {
	padding: 20px 0;
  cursor: pointer;
}

.graph-data table {
  width: 100%;
  border-collapse: collapse;
}

.graph-data h3, .graph-data > p {
	text-align: left;
	padding: 20px 0  20px 24px;
}

.graph-data th {
  border: none;
}

.graph-data th.month{
  font-weight: bold;
}

.graph-data thead tr {
	background: #2DBCB4;
	color: white;
	font-family: 'Montserrat', Arial, sans-serif;
}

.graph-data thead th {
	padding: 12px;
	text-align: left;
	font-size: 0.875em;
  font-weight: 700p
}

.graph-data tbody td {
	padding-top: 18px;
}

.graph-data .month{
	width: 20%;
	padding: 12px 12px 12px 20px;
	font-weight: 300;
}

.graph-data tbody .month{
	width: 20%;
	padding: 12px 12px 12px 20px;
	font-weight: 400;
}

.graph-data tr {
	border-bottom: 1px solid #EBEDEF;
}

.graph-data th[scope=row],
.graph-data td {
  text-align: left;
	padding: 12px;
	font-weight: bold;
	font-family: 'Montserrat', Arial, sans-serif;
	font-size: 0.875em;
}

.graph-data th[scope=row] {
  font-weight: 400;
}

@media screen and (min-width:768px) {

	/* Graphs */
  .graph {
    padding-left: 20px;
  }

  .graph-container .graph {
    padding-right: 20px;
  }

  .graph .legend {
    text-align: right;
    padding-right: 10px;
  }

  .graph .legend div {
    width: auto;
    float: none;
    display: inline-block;
    margin-right: 2em;
  }

  .js .graph-wrapper {
    display: flex;
  }

	.js .graph-wrapper .graph {
		flex: 1 1 auto;
	}

	.js .graph-wrapper .savings {
    flex: 0 0 auto;
		width: 275px;
		margin: 0;
	}

  .graph-data table {
    border-radius: 4px;
  }

  .graph-data .title a{
    padding-left: 10px;
  }
}

@media screen and (min-width: 1222px) {
  .graph-wrapper, .graph-data {
    max-width: 1202px;
    margin-left: auto;
    margin-right: auto;
  }
}