.metric-item {
  margin:10px; position: relative; background: #ffffff; border-radius: 5px;
}
.metric-item.embedded {
  margin: 0;
}
.metric-tile-item-1x1 {
  width: 320px;
}
.metric-tile-item-2x1 {
  width: 660px;
}
.metric-tile-item-2x2 {
  width: 660px;
}
@media screen and (max-width: 725px){
  .metric-tile-item-2x1, .metric-tile-item-2x2 { width: 320px;}
}

.chart-wrapper {
  overflow: hidden;
}

.metric {
  min-height: 150px;
  height: 100%;
  font-family: 'Open Sans', Arial, Verdana, Sans-Serif;
  page-break-inside: avoid;
}
.metric.mdl-card {
  width: 100%;
}
.metric .header {
  line-height: normal;
  padding: 5px;
  border-bottom: solid 1px rgba(120, 120, 120, 0.31);
  overflow: visible;
  padding-right: 50px;
}
.metric .header .title-wrapper {
  font-size: 18px;
  font-weight: 300;
  position: relative;
}
.metric .header .title-wrapper .title {
  color: #333;
  text-decoration: none;
  outline: 0;
  display: inline-block;
  border: 1px dashed transparent;
}
#chart-container .metric .header .title-wrapper a.title:hover {
  color: #0dbfd6 !important;
}
.metric .header .interact {
  padding: 5px 10px;
  position: absolute;
  top: 5px;
  right: 5px;
  background: #03aafd;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}
.metric .header .title-wrapper .editable {
  cursor: text;
}
.metric .header .title-wrapper .editable:focus {
  border-color: #dadada;
  background: #ffffff;
}
.metric .header .title-wrapper a.edit {
  display: inline-block;
  vertical-align: top;
  width: 26px;
  height: 26px;
  background: #03aafd url(../img/icons/pen.png) no-repeat center center;
  background-size: 18px 18px;
  font-size: 1px;
  line-height: 1px;
  text-indent: -10000px;
}
.metric .header .filter-summary {
  font-size: 14px;
  line-height: 18px;
  margin: 0;
  line-height: normal;
  padding: 3px 0 0 0;
  position: relative;
  cursor: default;
}
.metric .header .filter-summary .applied-filters {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#deep-dive .metric .header .filter-summary .applied-filters {
  white-space: normal;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.metric .header .filter-summary .add {
  display: none;
}
.metric .header .filter-summary .add > a {
  display: inline-block;
  position: relative;
  padding: 3px 5px;
  font-weight: bold;
  background: #0dbfd6;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  text-align: center;
  border-radius: 4px;
  line-height: inherit;
  height: 20px;
}
.metric .header .filter-summary .add .menu {
  position: absolute;
  top: 0px;
  left: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  max-height: 400px;
}

div.add > div.mdl-menu__container {
  z-index: 1100;
}

.metric .header .source-wrapper {
  font-size: 12px;
}
.metric .header .source-wrapper .source {
  text-decoration: none;
  outline: 0;
  display: inline-block;
  border: 1px dashed transparent;
}
.metric .header .source-wrapper .editable {
  cursor: text;
}
.metric .header .source-wrapper .editable:focus {
  border-color: #dadada;
}
.metric .header .source-wrapper a.edit {
  display: inline-block;
  vertical-align: top;
  width: 20px;
  height: 20px;
  background: #03aafd url(../img/icons/pen.png) no-repeat center center;
  background-size: 12px 12px;
  font-size: 1px;
  line-height: 1px;
  text-indent: -10000px;
}
.metric .number-wrapper {
  position: relative;
  font-size: 20px;
  width: 100%;
  height: 100%;
  display:none;
}
.metric .number-wrapper .n {
  font-size: 50px;
  line-height: 50px;
  text-align: center;
}
.metric .number-wrapper .number-label {
  font-size: 16px;
  text-align: center;
  color: #999;
}

.metric .mdl-card__media {
  background-color: transparent;
  overflow: hidden;
}

.metric .mdl-card__menu {
  display: none;
  right: 0;
  top: 0;
}
.metric .mdl-card__menu button.mdl-button {
  background: rgba(255,255,255,0);
}
.metric .mdl-card__menu button.mdl-button:hover {
  background: rgba(236,236,236,1);
}

.metric .options {
  list-style: none;
  display: none;
}
.metric .chart-pinned {
  height: 26px;
  width: 26px;
  background: #03aafd;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  color: #fff;
  text-align: center;
  line-height: 26px;
}

.metric-item .options-explore, .metric-item .options-dashboard {
  display: none;
}

#deep-dive .metric .options.options-deepdive {
  display: none;
  z-index: 9;
  height: 100%;
}

.metric .options-active {
  background-color: #fff;
  border-color: #ccc #ccc #fff #ccc;
}
.metric .options-menu {
  position: absolute;
  display: none;
  top: 34px;
  right: 5px;
  background: #fff;
  margin: 0;
  padding: 0;
  list-style-type: none;
  border: solid 1px #ccc;
  z-index: 10;
  min-width: 100px;
}
.metric .options-menu li {
  border-bottom: solid 1px #ccc;
}
.metric .options-menu li:last-child {
  border-bottom-width: 0;
}
.metric .options-menu a {
  text-decoration: none;
  display: block;
  padding: 8px;
}

.metric .chart-wrapper .title {
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  margin: 0 0 5px 0;
  display: none;
}
.metric .chart-wrapper .title .n {
  font-weight: bold;
}
.metric .chart-wrapper .image {
  cursor: pointer;
}
.metric .chart-wrapper .large {
  display: none;
}
/*.metric .chart { height: 200px; }*/
.metric .header,
.metric .number,
.metric .message,
.metric .percent,
.metric .chart {
  display: none;
}

.metric-large {
  width: 686px;
} /* 478px */
.metric-large .chart {
  height: 400px;
}
.metric-large .chart .small {
  display: none;
}
.metric-large .chart .large {
  display: block;
}

.metric-number .number-wrapper {
  display: block;
}
.metric-number .number,
.metric-number-and-percentage .number {
  display: block;
  position: relative;
  top: 50%;
  -ms-transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}
.metric-percentage .percent,
.metric-number-and-percentage .percent {
  display: block;
}
/*.metric-chart > div { padding-bottom: 10px; }*/
.metric-chart .header,
.metric-chart .chart {
  display: block;
  position: relative;
  width: 100%;
}

.metric .message {
  text-align: center;
  margin: 20px;
  font-size: 18px;
  color: #999;
}

.metric-print {
  float: none;
}
.metric-print .options {
  display: none;
}

#temp {
  visibility: hidden;
  position: absolute;
  width: 100%;
}

.metric .toggle {
  width: 40px;
  height: 40px;
  display: block;
  border: solid 1px #ccc;
  background: #fff;
  text-align: center;
  line-height: 40px;
  font-size: 30px;
  font-weight: bold;
  color: #555;
}
.metric .toggle:before {
  position: absolute;
  top: 15px;
  left: 8px;
  width: 0px;
  height: 0px;
  border: solid 10px transparent;
  border-top-color: #555;
  display: block;
  content: "";
}


#chart-container.dashboard .metric-number .header, #deep-dive .metric-number .header {
  display: block;
  width: 100%;
  padding-right: 50px;
}
#chart-container.dashboard .metric-number .filter-summary {
  display: none;
}
.metric a.filter {
  color: #2ba6cb;
  text-decoration: none;
  line-height: inherit;
}
.metric .filters {
  margin: 5px 0 0 0;
  font-size: 12px;
  max-height: 300px;
  position: absolute;
  /* making z-index smaller than 999 as material ui menu wont work if it is bigger */
  z-index: 900;
  width: 99%;
}
.metric .filters .add .toggle:before {
  display: none;
}
.metric .filters .add .menu {
  position: absolute;
  top: 0;
  left: 39px;
}
.metric .filters .add.active .menu {
  display: block;
}
.metric .filters .filter {
  position: relative;
  margin: 0 0 5px 0;
  background: #f1f1f1;
  vertical-align: top;
  margin: 0 5px 0 0;
  padding: 10px;
  border-radius: 5px;
  display: none;
  overflow-y: scroll;
  overflow-x: hidden;
  height: 100%;
  max-height: inherit;
}
.metric .filters .filter .field-name {
}
.metric .filters .filter .values {
  font-size: 12px;
  line-height: normal;
}
.metric .filters .filter .values ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
  line-height: 1.6;
}
.metric .filters .filter .values li {
  display: inline-block;
  width: 25%;
  padding: 0 20px 5px 0;
  vertical-align: top;
  position: relative;
}
.metric .filters .filter .values .alphabet {
  padding-bottom: 10px;
}
.metric .filters .filter .values .alphabet li {
  width: initial;
  padding: 0 10px 0 0;
  cursor: pointer;
}
.metric .filters .filter .values .alphabet li.selected {
  color: #03aafd;
}
.metric .filters .filter .values .alphabet li.empty {
  opacity: 0.4;
}
.metric .filters .filter .values .number-filter label {
  float: left;
}
.metric .filters .filter .values > div {
  clear: both;
}
.metric .filters .filter .values label {
  display: block;
  position: relative;
  padding: 0 0 0 18px;
  font-size: inherit;
  margin: 0;
  color: #4d4d4d;
}
.metric .filters .filter .values input[type='checkbox'] {
  margin: 0;
  position: absolute;
  top: 3px;
  left: 0;
}
.metric .filters .filter .values .button {
  cursor: pointer;
  font-family: inherit;
  font-weight: normal;
  line-height: normal;
  margin: 0 0 1.25em;
  position: relative;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  background-color: #0dbfd6;
  border: none;
  color: white;
  box-shadow: none;
  padding-right: 1.125em;
  padding-left: 1.125em;
  padding-top: 0.625em;
  padding-bottom: 0.5625em;
  -webkit-appearance: none;
  font-size: inherit;
}

.metric.filtering-enabled .filter-summary .add {
  display: inline-block;
}
#chart-container.dashboard .metric.filtering-enabled .filter-summary .add {
  display: none;
}

.metric-item .dataset-card {
  width: 660px;
}
.metric-item .dataset-card .title {
  padding: 30px;
}
.metric-item .dataset-card .title h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 40px;
  max-height: 120px;
}
.metric-item .dataset-card .title h5 {
  font-weight: 400;
  font-size: 13px;
  color: #656666;
}

.metric-item .story-tile {
  width: 320px;
}

.metric.hoverinfo-enabled .header, .metric.hoverinfo-enabled .chart-wrapper {
  width: 100%;
  float: left;
}
.hoverinfo {
  width: 35%;
  position: absolute;
  left: 100%;
  top: 0;
  height: 100%;
  background: #e8efef;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 14px;
  z-index: 9;
}
.hoverinfo .hoverinfo-header {
  padding: 14px;
}
.hoverinfo-title {
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 600;
}
.hoverinfo .indicator-section {
  text-transform: uppercase;
}
.hoverinfo .variable-section {
  padding: 14px;
  border-top: 1px solid #fff;
}
.variable-subsection {
  padding-left: 14px;
}
.hoverinfo .variable-subsection:not(:last-child){
  padding-bottom: 14px;
}
.hoverinfo .variable-title {
  text-transform: uppercase;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.hoverinfo .variable-title span {
  text-transform: capitalize;
}
.hoverinfo .variable-list {
  font-style: italic;
  line-height: 1.1em;
}
.hoverinfo .close-hover-info {
  position: absolute;
  top: 7px;
  right: 10px;
  color: #888;
  font-size: 22px;
  cursor: pointer;
}
#color-modal .hoverinfo {
  display: none;
}
#embed-modal .metric, #export-modal .metric {
  overflow: hidden;
  position: relative;
}

.metric .legend {
  padding: 6px 8px;
  background: rgba(255,255,255,0.9) !important;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  border-radius: 3px;
  line-height: 18px;
  color: #555;
}
.metric .legend span {
  width: 18px;
  height: 18px;
  float: left;
  margin-right: 8px;
  opacity: 0.9;
}

#addhover-modal .metric.hoverinfo-enabled .chart-wrapper {
  width: 100%;
}
#addhover-modal .metric.hoverinfo-enabled .hoverinfo {
  display: none;
}

#branding {
  width: 100%;
  position: absolute;
  overflow: hidden;
  text-align: right;
  bottom: 10px;
  right: 10px;
  display: none;
  z-index: 1;
}
#branding img {
  width: 220px;
}

.leaflet-container.chart {
  background: #fff;
}
.leaflet-popup {
  margin-bottom: 20px;
}
.leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 0;
  border: 1px solid #ccc;
  box-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}
.leaflet-popup-content-wrapper .leaflet-popup-content {
  margin: 5px 10px;
}
.leaflet-container a.leaflet-popup-close-button, .leaflet-popup-tip-container {
  display: none;
}
.leaflet-container .zip-name {
  font-size: 80%;
}


.metric-content + div {
  border-top: 1px solid rgba(0,0,0,.1);
}

/* metric notes */
.notes.mdl-card__supporting-text {
  width: 100%;
  padding: 0;
}
.notes .notes-edit {
  padding: 16px;
}
.notes .notes-edit .mdl-textfield {
  width: 100%;
  padding: 20px 6px;
}
.notes .notes-public {
  padding: 16px 24px 8px;
}
.notes .bottom-buttons {
  display: flex;
  justify-content: flex-end;
}

/* metric date picking */
.metric .pika-single {
  top: 10px;
  left: 40%;
}

.metric .table-chart {
  overflow: auto;
}
.metric .table-chart::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 10px;
}
.metric .table-chart::-webkit-scrollbar-thumb {
  border-radius: 7px;
  background-color: rgba(0,0,0,.5);
  box-shadow: 0 0 1px rgba(255,255,255,.5);
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
}
.metric .table-chart tbody tr:nth-child(n+151){
  display: none;
}
.metric .table table.mdl-data-table {
  background: none;
}
.metric .table table th {
  cursor: pointer;
}
.metric .table table th .material-icons {
  display: none;
  vertical-align: middle;
}
.metric .table table th.asc .material-icons.drop-down {
  display: inline-block;
}
.metric .table table th.desc .material-icons.drop-up {
  display: inline-block;
}

.metric .table .truncated-warning {
  padding: 8px;
  font-size: 12px;
  text-align: center;
  font-style: italic;
}

.metric .icon-label{
  line-height: 20px;
  text-align: center;
  font-size: 20px;
  margin-top: 15px;
  letter-spacing: 4px;
  font-weight: bold;
}
