/* -- DIALOG STYLES -- */
#chart-edit .deep-dive {
  display: flex;
  align-items: stretch;
}

@media screen and (max-width: 725px){

  #chart-edit .deep-dive {
    display: block;
  }
}


/* -- METRIC SPECIFIC STYLES -- */
#chart-edit .tile {
  min-height: 360px;
  border-radius: 2px;
  position: relative;
  flex: 1;
  max-width: 75%;
}
#chart-edit .tile .instructions {
  color: #c3c9c7;
  text-transform: uppercase;
  margin: 20px;
}
#chart-edit .tile.empty {
  background: transparent;
  border: dashed 1px #c3c9c7;
}
#chart-edit .tile.empty .metric {
  display: none;
}
#chart-edit .tile .metric .mdl-card__menu {
  display: block;
}
#chart-edit .tile .metric .options.options-deepdive {
  display: block;
}
#chart-edit .tile .metric .header .filter-summary .add {
  display: block !important;
}

@media screen and (max-width: 725px){

  #chart-edit .tile {
    min-height: 320px;
  }
}


/* -- DATASET PICKER/GENERAL TABS -- */
#chart-edit .dataset-picker {
  margin-bottom: 10px;
}
#chart-edit .loading {
  text-align: center;
}

#chart-edit .controls {
  width: 300px;
  margin-left: 20px;
  max-width: 25%;
}

#chart-edit .mdl-tabs__tab-bar a.mdl-tabs__tab {
  color: #0dbfd6;
}
#chart-edit .mdl-tabs__tab-bar a.mdl-tabs__tab.is-active {
  color: #d81b60;
}
#chart-edit .mdl-tabs.is-upgraded .mdl-tabs__tab.is-active:after {
  background: #d81b60;
}

#chart-edit .mdl-tabs__panel {
  margin-top: 20px;
  height: calc(80vh - 190px);
  overflow-x: hidden;
  overflow-y: scroll;
}
#chart-edit .mdl-tabs__panel::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 10px;
}
#chart-edit .mdl-tabs__panel::-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;
}

@media screen and (max-width: 725px){

  #chart-edit .controls {
    width: 100%;
    margin: 0;
  }
  #chart-edit .mdl-tabs__panel {
    height: 260px;
    margin-bottom: 40px;
  }
}


/* -- "COLUMNS" TAB -- */
#chart-edit .fields .field {
  display: none;
  margin: 0 0 20px 0;
}
#chart-edit form.custom, #chart-edit form.custom select {
  margin: 0;
}

#chart-edit .fields .operation {
  display: none;
  padding: 6px 4px 0px;
}
#chart-edit .fields .operation > div {
  display: table;
  width: 100%;
  border-collapse: collapse;
  margin-top: -1px;
  font-size: 10px;
  text-transform: uppercase;
  overflow: hidden}
#chart-edit .fields .operation > div > div {
  display: table-row;
}
#chart-edit .fields .operation > div > div > a {
  display: table-cell;
  width: 33.3333%;
  text-align: center;
  outline-width: 0;
  color: #3f51b5;
}
#chart-edit .fields .operation .on {
  background: #cc0000;
  color: #e8efef;
}
#chart-edit .fields .operation .disabled {
  background: #f1f1f1;
  color: #ccc;
  cursor: default;
}


/* -- "STYLE" TAB -- */
#chart-edit [data-chart-type], #chart-edit [data-order-type]{
  width: 50px;
  height: 50px;
  background-size: 48px;
  background-position: center;
  background-repeat: no-repeat;
  min-width: 50px;
}

/* default chart type icons */
#chart-edit [data-chart-type=area]{
  background-image: url('/static/img/icons/charts/area-blue.png');
}
#chart-edit [data-chart-type=stackedarea]{
  background-image: url('/static/img/icons/charts/stacked-area-blue.png');
}
#chart-edit [data-chart-type=bar]{
  background-image: url('/static/img/icons/charts/bar-blue.png');
}
#chart-edit [data-chart-type=column]{
  background-image: url('/static/img/icons/charts/column-blue.png');
}
#chart-edit [data-chart-type=pie]{
  background-image: url('/static/img/icons/charts/pie-blue.png');
}
#chart-edit [data-chart-type=geo]{
  background-image: url('/static/img/icons/charts/geo-blue.png');
}
#chart-edit [data-chart-type=number]{
  background-image: url('/static/img/icons/charts/number-blue.png');
}
#chart-edit [data-chart-type=stackedcolumn]{
  background-image: url('/static/img/icons/charts/stacked-column-blue.png');
}
#chart-edit [data-chart-type=stackedbar]{
  background-image: url('/static/img/icons/charts/stacked-bar-blue.png');
}
#chart-edit [data-chart-type=line]{
  background-image: url('/static/img/icons/charts/multi-line-blue.png');
}
#chart-edit [data-chart-type=linebar]{
  background-image: url('/static/img/icons/charts/line-bar-blue.png');
}
#chart-edit [data-chart-type=bubble]{
  background-image: url('/static/img/icons/charts/bubble-blue.png');
}
#chart-edit [data-chart-type=scatter]{
  background-image: url('/static/img/icons/charts/scatter-blue.png');
}
#chart-edit [data-chart-type=heatmap]{
  background-image: url('/static/img/icons/charts/heatmap-blue.png');
}
#chart-edit [data-chart-type=datetime]{
  background-image: url('/static/img/icons/charts/value-blue.png');
}
#chart-edit [data-chart-type=cumulative]{
  background-image: url('/static/img/icons/charts/cumulative-blue.png');
}
#chart-edit [data-chart-type=geo]{
  background-image: url('/static/img/icons/charts/geo-blue.png');
}
#chart-edit [data-chart-type=donut]{
  background-image: url('/static/img/icons/charts/donut-blue.png');
}
#chart-edit [data-chart-type=icon]{
  background-image: url('/static/img/icons/charts/icon-blue.png');
}
#chart-edit [data-chart-type=table]{
  background-image: url('/static/img/icons/charts/table-blue.png');
}
/* active chart type icons */
#chart-edit [data-chart-type=area].is-active {
  background-image: url('/static/img/icons/charts/area-pink.png');
}
#chart-edit [data-chart-type=stackedarea].is-active {
  background-image: url('/static/img/icons/charts/stacked-area-pink.png');
}
#chart-edit [data-chart-type=bar].is-active {
  background-image: url('/static/img/icons/charts/bar-pink.png');
}
#chart-edit [data-chart-type=column].is-active {
  background-image: url('/static/img/icons/charts/column-pink.png');
}
#chart-edit [data-chart-type=pie].is-active {
  background-image: url('/static/img/icons/charts/pie-pink.png');
}
#chart-edit [data-chart-type=geo].is-active {
  background-image: url('/static/img/icons/charts/geo-pink.png');
}
#chart-edit [data-chart-type=number].is-active {
  background-image: url('/static/img/icons/charts/number-pink.png');
}
#chart-edit [data-chart-type=stackedcolumn].is-active {
  background-image: url('/static/img/icons/charts/stacked-column-pink.png');
}
#chart-edit [data-chart-type=stackedbar].is-active {
  background-image: url('/static/img/icons/charts/stacked-bar-pink.png');
}
#chart-edit [data-chart-type=line].is-active {
  background-image: url('/static/img/icons/charts/multi-line-pink.png');
}
#chart-edit [data-chart-type=linebar].is-active {
  background-image: url('/static/img/icons/charts/line-bar-pink.png');
}
#chart-edit [data-chart-type=bubble].is-active {
  background-image: url('/static/img/icons/charts/bubble-pink.png');
}
#chart-edit [data-chart-type=scatter].is-active {
  background-image: url('/static/img/icons/charts/scatter-pink.png');
}
#chart-edit [data-chart-type=heatmap].is-active {
  background-image: url('/static/img/icons/charts/heatmap-pink.png');
}
#chart-edit [data-chart-type=datetime].is-active {
  background-image: url('/static/img/icons/charts/value-pink.png');
}
#chart-edit [data-chart-type=cumulative].is-active {
  background-image: url('/static/img/icons/charts/cumulative-pink.png');
}
#chart-edit [data-chart-type=geo].is-active {
  background-image: url('/static/img/icons/charts/geo-pink.png');
}
#chart-edit [data-chart-type=donut].is-active {
  background-image: url('/static/img/icons/charts/donut-pink.png');
}
#chart-edit [data-chart-type=icon].is-active {
  background-image: url('/static/img/icons/charts/icon-pink.png');
}
#chart-edit [data-chart-type=table].is-active {
  background-image: url('/static/img/icons/charts/table-pink.png');
}

/* default order type icons */
#chart-edit [data-order-type=alphabetical]{
  background-image: url('/static/img/icons/order-abc-blue.png');
}
#chart-edit [data-order-type=valueasc]{
  background-image: url('/static/img/icons/order-valueasc-blue.png');
}
#chart-edit [data-order-type=valuedesc]{
  background-image: url('/static/img/icons/order-valuedesc-blue.png');
}
#chart-edit [data-order-type=top5]{
  background-image: url('/static/img/icons/order-top5-blue.png');
}
#chart-edit [data-order-type=bottom5]{
  background-image: url('/static/img/icons/order-bottom5-blue.png');
}
/*active order type icons */
#chart-edit [data-order-type=alphabetical].is-active {
  background-image: url('/static/img/icons/order-abc-pink.png');
}
#chart-edit [data-order-type=valueasc].is-active {
  background-image: url('/static/img/icons/order-valueasc-pink.png');
}
#chart-edit [data-order-type=valuedesc].is-active {
  background-image: url('/static/img/icons/order-valuedesc-pink.png');
}
#chart-edit [data-order-type=top5].is-active {
  background-image: url('/static/img/icons/order-top5-pink.png');
}
#chart-edit [data-order-type=bottom5].is-active {
  background-image: url('/static/img/icons/order-bottom5-pink.png');
}

#chart-edit h3 {
  font-size: 12px;
  font-weight: 400;
  color: #284854;
  margin: 6px 0;
  line-height: normal;
  text-align: center;
}

#chart-edit #show-icon-types{
  margin-top: 10px;
  background: #0dbfd6;
}


/* -- "OPTIONS" TAB -- */
.display-options-button {
  color: #FFFFFF;
  background: #0DBFD6;
  margin-bottom: 5px;
  width: 70%;
}

/* MDL radio restyles */
#chart-edit .percentage-buttons {
  width: 100%;
  margin-bottom: 12px;
}
#chart-edit .percentage-buttons label.mdl-radio {
  font-size: 13px;
  width: 30%;
}
#chart-edit .percentage-buttons .mdl-radio__outer-circle {
  border-color: #284854 !important}
#chart-edit .percentage-buttons .mdl-radio__inner-circle {
  background: #284854 !important;
}


/* MDL checkbox restyles */
#chart-edit .mdl-checkbox__label {
  font-size: 12px;
  margin-bottom: 12px;
  width: 100%;
}
#chart-edit .mdl-checkbox__box-outline {
  border-color: #284854 !important;
  border-radius: 0;
}  /* box outline */
#chart-edit .is-checked .mdl-checkbox__box-outline .mdl-checkbox__tick-outline {
  background-color: #284854;
}  /* background, inside box */
#chart-edit .mdl-checkbox.is-checked .mdl-checkbox__tick-outline {

  background: #284854 url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnDQogICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iDQogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIg0KICAgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIg0KICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgIHZlcnNpb249IjEuMSINCiAgIHZpZXdCb3g9IjAgMCAxIDEiDQogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4NCiAgPHBhdGgNCiAgICAgZD0iTSAwLjA0MDM4MDU5LDAuNjI2Nzc2NyAwLjE0NjQ0NjYxLDAuNTIwNzEwNjggMC40MjkyODkzMiwwLjgwMzU1MzM5IDAuMzIzMjIzMywwLjkwOTYxOTQxIHogTSAwLjIxNzE1NzI5LDAuODAzNTUzMzkgMC44NTM1NTMzOSwwLjE2NzE1NzI5IDAuOTU5NjE5NDEsMC4yNzMyMjMzIDAuMzIzMjIzMywwLjkwOTYxOTQxIHoiDQogICAgIGlkPSJyZWN0Mzc4MCINCiAgICAgc3R5bGU9ImZpbGw6IzI4NDg1NDtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZSIgLz4NCjwvc3ZnPg0K") repeat scroll 0% 0%;

}

/* axis options menu */
#chart-edit .axis-controls .button {
  height: 36px;
}
#chart-edit .axis-controls .button i.material-icons {
  position: relative;
  top: -5px;
}
#chart-edit .axis-controls .button span {
  position: relative;
  top: -12px;
}
#chart-edit .axis-controls {
  display: none;
  margin: 0 14px 28px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #E0E0E0;
}
#chart-edit .axis-controls label {
  color: #284854;
}
#chart-edit .axis-controls input {
  width: 100%;
}

/* -- ICON MODAL (technically not in the same modal) -- */

#icon-modal .icon-options{ max-height: calc(80vh - 220px); overflow-y: auto;}
#icon-modal span[data-icon-type]{
  width: 50px;
  height: 50px;
  background-size: 40px 40px;
  background-position: center;
  background-repeat: no-repeat;
  min-width: 50px;
}

/* -- COLOR MODAL (technically not in the same modal) -- */
#color-modal .color-options {
  margin-bottom: 10px;
}
#color-modal .color-container {
  position: relative;
}
#color-modal .colorticker {
  width: 100%;
  height: 20px;
  margin-bottom: 5px;
  cursor: pointer;
}
#color-modal .adjust-bucket-colorticker {
  width: 50%;
  height: 20px;
  cursor: pointer;
}
#color-modal .adjust-bucket-container {
  display: flex;
  flex-direction: row;
  align-items: center;
}
#color-modal .adjust-bucket-color {
  flex: 1 1 auto;
  width: 20%;
}
#color-modal .adjust-bucket-range {
  flex: 1 1 auto;
  width: 40%;
}

.adjust-bucket-slider-ctn {
  width: 300px;
  position: relative;
}

.adjust-bucket-slider-tick {
  width: 1px;
  height: 10px;
  background: gray;
  position: absolute;
  top: 4px;
}

#color-modal .filter-summary, #color-modal .filters {
  display: none;
}
#color-modal .colpick {
  background: #ffffff;
  border-radius: 0;
  border-color: #dddddd;
  z-index: 100;
  top: 0px !important;
  left: 30px !important;
}
#color-modal .colpick_hex_field, #color-modal .colpick_submit {
  border-radius: 0;
  background: #ffffff;
}
#color-modal .colpick_hue {
  height: 158px;
}
#color-modal .colpick_new_color, #color-modal .colpick_current_color {
  height: 25px;
}

span.highlight-color-label:hover span {
  display: block;
}

.highlight-color-label span {
  display: none;
  background: #C8C8C8;
  margin-left: 30px;
  padding: 5px;
  position: absolute;
  z-index: 1000;
  width:150px;
  height:50px;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
}

@media screen and (max-width: 725px){

  #color-modal .color-options {
    margin-bottom: 50px;
  }
}


/* -- BOTTOM RIGHT SAVE/CANCEL BUTTONS -- */
#chart-edit .chart-edit-save, #chart-edit .add-to-story {
  display: none;
}

#custom-order-button {
  background-color: rgb(25, 189, 212);
  margin-top: 5px;
}

#custom-order-menu {
  display: none;
}

#custom-order-menu ul {
  list-style: none;
  padding-left: 10px;
}

#custom-order-menu li {
  max-height: 30px;
}

.legend-color {
  width: 16px;
  height: 16px;
  display: inline-block;
  margin-left: 8px;
  margin-bottom: 4px;
}

.order-item-title {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.custom-order-drag-handle {
  color: darkgrey;
}

.order-item-placeholder {
  background-color: darkgrey;
  opacity: 0.5;
}
