/*!
 * Copyright (c) 2018 ~ present dreamRs.
 *
 * Additional styles for esquisse addin
 *
 * @version 0.3.1
 */


.esquisse-container {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  width: 100%;
  height: 100%
}


/* Title */
.esquisse-title-container {
  -webkit-flex: none;
  -ms-flex: none;
  flex: none;
  position: relative;
  height: 45px;
  margin-bottom: 5px;
  padding: 0;
}
.esquisse-title {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  line-height: 44px;
  margin: 0;
  z-index: 0;
  color: white;
  text-align: center;
  font-size: 30px;
  font-family: 'Annie Use Your Telescope', handwriting;
}

.esquisse-title-container button.btn {
  position: relative;
  height: 31px;
  z-index: 10;
  color: #FFF;
  background: transparent;
  border: none;
  margin: 7px 5px 0px 5px;
}


/* Geom & aes block */
.esquisse-geom-aes {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 90px 1fr;
  grid-template-columns: 90px 1fr;
  -ms-grid-rows: 1fr;
  grid-template-rows: 1fr;
  grid-column-gap: 0px;
  grid-row-gap: 0px;
}


/* Controls menu */
.btn-group-justified-esquisse {
  display: table !important;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
}

.btn-group-esquisse {
  position: relative;
  /*display: inline-block;*/
  vertical-align: middle;
}

.btn-group-justified-esquisse>.btn-group-esquisse {
  display: table-cell;
  float: none;
  width: 1%;
}


.btn-group-justified-esquisse>.btn-group-esquisse .btn-esquisse-controls {
  width: 100%;
}

.btn-esquisse-controls {
  border-radius: 0 !important;
}

.sw-dropdown-content {
  border-radius: 4px !important;
}
.sw-dropdown-in {
  padding: 2px !important;
}

.esquisse-controls-appearance .sw-dropdown-in {
  padding: 0 !important;
  margin: 0 !important;
}


.esquisse-labs-options {
  display: grid;
  grid-template-columns: 1fr 40px;
  grid-template-rows: 1fr;
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  width: 100%;
}


/* dropdowns width */

.esquisse-controls-labs {
  min-width: 200px;
  width: 280px;
}

.esquisse-controls-axes {
  min-width: 350px;
  overflow-y: auto;
  max-height: 90vh;
}

.esquisse-controls-geoms {
  min-width: 350px; /*430px*/
}

.esquisse-controls-theme {
  min-width: 350px; /*430px*/
}

.esquisse-controls-filters {
  min-width: 350px;
  max-height: min(90vh, 600px);
  min-height: 30vh;
  padding-right: 5px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000 !important;
}

.esquisse-controls-code {
  min-width: 370px;
  z-index: 1000 !important;
}


/* color pickr */
.pcr-app[data-theme=monolith] {
  padding: 0 !important;
}
.sw-spectrum {
  border: none !important;
}
.sp-palette-container {
  border-right: none !important;
}
.sp-thumb-inner {
  border-radius: 3px !important;
  border: none;
}
.sp-palette .sp-thumb-el {
  width: 18px !important;
  height: 18px !important;
}
.sp-dragger {
  height: 8px !important;
  width: 8px !important;
  background: transparent !important;
}
.sp-clear, .sp-color, .sp-hue {
  border: none !important;
}

/* box drag and drop */
.container-drag-source, .box-dad {
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px !important;
  border: dashed 2px #ccc !important;
}



/* drop menu input */
.drop-input, .drop-input-main {
  height: 100%;
}
.drop-input-button:disabled {
  cursor: not-allowed;
  pointer-events: auto;
}


/* Color & Palette Picker */
.color-picker .bootstrap-select .dropdown-menu li a span.text {
  width: 100%;
  display: block;
}

.color-picker-plain .bootstrap-select .dropdown-menu li a span.text div {
  background: rgba(0,0,0,0) !important;
}



/* Style for variable badges */
.label-esquisse {
	display: inline;
	padding: .2em .6em .3em;
	font-size: 80%;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
	border-radius: .25em;
}
.label-discrete {
  background-color: #EF562D;
  color: #FFFFFF;
}
.label-continuous {
  background-color: #0C4C8A;
  color: #FFFFFF;
}
.label-datetime {
  background-color: #97D5E0;
  color: #FFFFFF;
}
.label-id {
  background-color: #848484;
  color: #FFFFFF;
}
.label-other {
  background-color: #2E2E2E;
  color: #FFFFFF;
}



/* Highligh code https://github.com/r-lib/pkgdown/blob/main/inst/highlight-styles/github-light.scss */

pre {background-color: #ffffff;}
pre code         /* Normal         */ {color:#24292e}
pre code span span.al /* Alert          */ {color:#ff5555; font-weight: bold}
pre code span span.an /* Annotation     */ {color:#6a737d}
pre code span span.at /* Attribute      */ {color:#d73a49}
pre code span span.bn /* BaseN          */ {color:#005cc5}
pre code span span.bu /* BuiltIn        */ {color:#d73a49}
pre code span span.cf /* ControlFlow    */ {color:#d73a49}
pre code span span.ch /* Char           */ {color:#032f62}
pre code span span.cn /* Constant       */ {color:#005cc5}
pre code span span.co /* Comment        */ {color:#6a737d}
pre code span span.cv /* CommentVar     */ {color:#6a737d}
pre code span span.do /* Documentation  */ {color:#6a737d}
pre code span span.dt /* DataType       */ {color:#d73a49}
pre code span span.dv /* DecVal         */ {color:#005cc5}
pre code span span.er /* Error          */ {color:#ff5555; text-decoration: underline}
pre code span span.ex /* Extension      */ {color:#d73a49; font-weight: bold}
pre code span span.fl /* Float          */ {color:#005cc5}
pre code span span.fu /* Function       */ {color:#6f42c1}
pre code span span.im /* Import         */ {color:#032f62}
pre code span span.in /* Information    */ {color:#6a737d}
pre code span span.kw /* Keyword        */ {color:#d73a49}
pre code span span.op /* Operator       */ {color:#24292e}
pre code span span.ot /* Others         */ {color:#6f42c1}
pre code span span.pp /* Preprocessor   */ {color:#d73a49}
pre code span span.re /* RegionMarker   */ {color:#6a737d}
pre code span span.sc /* SpecialChar    */ {color:#005cc5}
pre code span span.ss /* SpecialString  */ {color:#032f62}
pre code span span.st /* String         */ {color:#032f62}
pre code span span.va /* Variable       */ {color:#e36209}
pre code span span.vs /* VerbatimString */ {color:#032f62}
pre code span span.wa /* Warning        */ {color:#ff5555}


/* Version classique: controls dans dropdown */
.ggplot-output-container {
     height: 100%;
     min-height: 400px;
     overflow: auto;
}
 .ggplot-output-container .tabbable {
     height: inherit;
}
 .ggplot-output-container .tabbable .tab-content {
     height: inherit;
}
 .ggplot-output-container .tabbable .tab-content .tab-pane {
     height: inherit;
}

/* Version alt: controls dans sidebar */
 .ggplot-output-sidebar-container {
     flex: 1 1 auto;
     height: 100%;
     min-height: 400px;
     overflow: auto;
}
 .ggplot-output-sidebar-container .tabbable {
     height: inherit;
}
 .ggplot-output-sidebar-container .tabbable .tab-content {
     height: inherit;
}
 .ggplot-output-sidebar-container .tabbable .tab-content .tab-pane {
     height: inherit;
}
/* Conteneur du module geom+aes et du plot */
 .ggplot-geom-aes-container {
     display: flex;
     flex-flow: column;
     height: 100%;
}
 .esquisse-geom-aes-main {
    flex: 0 1 130px;
}
