/* ---------------------- 
Stylesheet Guide
-------------------------

GENERAL
HEADER
UPLOAD BUTTON
BUTTONS
SELECT
RANGESLIDER
COLORPICKER
DRAW CONTROLS
SHAPE CONTROLS
TEMPLATE GALLERY
EMOJIS
FOOTER
MEDIA QUERIES

*/

/* ================= GENERAL ================== */

.tm-caps-container {
  position: relative;
  border-radius: 8px;
}

.tm-caps-container .canvas-container {
  z-index: 9;
}

.tm-caps-container .canvas-container,
.tm-caps-container .canvas-container canvas {
  max-width: 100%;
}

.tm-caps-content {
  position: relative;
  padding: 25px 30px 30px 30px;
  background: #f5f5f5;
}

.tm-caps-wrapper {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.tm-caps-img {
  width: 100%;
  height: auto;
}

.tm-caps-img-wrapper {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: -1;
}

.tmcaps .tooltipster-content {
  line-height: 1;
  padding: 8px 12px;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

.tmcaps.tooltipster-sidetip.tooltipster-top .tooltipster-arrow-border {
  border-top-color: #000;
}

.tmcaps.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-border {
  border-bottom-color: #000;
}

.tooltipster-sidetip.tooltipster-top .tooltipster-arrow-background,
.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-background,
.tooltipster-sidetip.tooltipster-left .tooltipster-arrow-background,
.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-background {
  visibility: hidden;
}

.tmcaps.tooltipster-sidetip .tooltipster-box {
  background: transparent;
  border: none;
}

.tmcaps .tooltipster-content {
  border-radius: 4px;
}

.tm-caps-content {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* ================= HEADER ================== */

.tm-caps-header {
  margin: 0;
  display: flex;
  background: #673AB7;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  overflow: hidden;
}

.tm-caps-header .tm-caps-menu {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #673AB7;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.2;
  padding: 20px;
  text-decoration: none;
  outline: none !important;
  transition: all 0.2s ease-in-out;
  text-align: center;
  width: 100%;
  margin: 0;
  border: none;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.tm-caps-header .tm-caps-menu:hover,
.tm-caps-header .tm-caps-menu.active {
  color: #fff;
  background: #000;
}

.tm-caps-header .tm-caps-menu span {
  margin-left: 5px;
}

.tm-caps-header button.tm-caps-menu {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.tm-caps-header .tm-caps-menu i {
  font-size: 14px;
}

.tm-caps-header-item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* ================= UPLOAD BUTTON ================== */

.tm-caps-hidden-file {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.tm-caps-hidden-file+label {
  margin: 0;
  cursor: pointer;
}

.tm-caps-hidden-file+label * {
  pointer-events: none;
}

.tm-caps-file-field {
  display: flex;
  flex-wrap: nowrap;
}

/* ================= BUTTONS ================== */

.tm-caps-text-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 15px 0;
  justify-content: flex-start;
}

.tm-caps-text-controls>div {
  display: flex;
  flex-wrap: wrap;
}

.tm-caps-text-controls>div.tm-caps-text-controls-3 {
  margin-left: auto
}

.tm-caps-btn-wrapper {
  position: relative;
  margin: 5px 5px 5px 0;
}

.tm-caps-text-controls>div.tm-caps-text-controls-3 .tm-caps-btn-wrapper {
  margin: 5px 0 5px 5px;
}

.tm-caps-btn {
  margin: 0;
  padding: 10px 15px;
  line-height: 1.5;
  border: 1px solid #ddd;
  background: #fff;
  color: #000;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  position: relative;
  font-weight: bold;
  border-radius: 2px;
  outline: none !important;
  box-shadow: none !important;
  font-size: 14px;
  text-align: center;
}

.tm-caps-btn.tm-caps-btn-primary {
  border: 1px solid #673AB7;
  background: #673AB7;
  color: #fff;
}

.tm-caps-btn.tm-caps-btn-primary:hover,
.tm-caps-btn:hover {
  border: 1px solid #000;
  background: #000;
  color: #fff;
}

.tm-caps-btn-wrapper .tm-caps-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 30px;
  height: 30px;
  padding: 0;
  font-weight: normal;
  font-size: 14px;
}

.tm-caps-cpicker {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E") left top/contain white;
  background-size: 10px 10px;
}

.tm-caps-btn.tm-caps-delete-drawings {
  margin-left: 20px;
  min-width: 50px;
}

/* ================= SELECT ================== */

.tm-caps-select {
  display: inline-block;
  width: 100%;
  height: 30px;
  padding: 0 1.5rem 0 .25rem;
  line-height: 28px !important;
  color: #000;
  vertical-align: middle;
  border: 1px solid #ddd;
  border-radius: 2px;
  font-size: 14px;
  max-width: 120px;
  background-color: #fff;
  font-weight: normal !important;
}

.tm-caps-select:focus {
  border-color: #000;
  outline: none
}

.tm-caps-select:focus::-ms-value {
  color: #000;
  background-color: #fff
}

.tm-caps-select::-ms-expand {
  opacity: 0
}

/* ================= RANGESLIDER ================== */

.tm-caps-sliders {
  display: flex;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 2px;
  margin-bottom: 20px;
  align-items: center;
}

.tm-caps-sliders>div {
  flex: 1;
  display: flex;
  padding: 15px 15px 20px 15px;
  flex-direction: column;
  border-right: 1px solid #ddd;
}

.tm-caps-sliders>div:last-child {
  border: none !important;
}

.tm-caps-sliders>div>label {
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 15px 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  color: #000;
  line-height: 1;
}

.tm-caps-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  outline: none;
  opacity: 1;
}

.tm-caps-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #000;
  cursor: pointer;
  border: none;
  box-shadow: none;
  border-radius: 100%;
}

.tm-caps-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #000;
  cursor: pointer;
  border: none;
  box-shadow: none;
  border-radius: 100%;
}

/* ================= COLORPICKER ================== */

.tm-caps-colorpicker {
  width: 30px;
  height: 30px;
  cursor: pointer;
  border: 1px solid #ddd;
  position: relative;
}

.tm-caps-colorpicker .layout_default.picker_wrapper {
  padding: 1em;
  z-index: 99;
}

.tm-caps-colorpicker>.layout_default.picker_wrapper>* {
  margin: 1em;
}

.tm-caps-colorpicker .picker_done,
.tm-caps-colorpicker .picker_sample {
  display: none !important;
}

.tm-caps-colorpicker .layout_default .picker_editor {
  width: 100%;
}

.tm-caps-colorpicker .picker_wrapper.popup {
  box-shadow: 2px 4px 10px 0 rgba(0, 0, 0, 0.4);
  border-radius: 4px;
}

.tm-caps-colorpicker .picker_wrapper.popup,
.tm-caps-colorpicker .picker_wrapper.popup .picker_arrow::before,
.tm-caps-colorpicker .picker_wrapper.popup .picker_arrow::after {
  background: #fff;
}

.tm-caps-colorpicker .picker_wrapper.popup .picker_arrow {
  margin: 0;
}

/* ================= DRAW CONTROLS ================== */

.tm-caps-draw-controls-inner {
  display: flex;
  margin-bottom: 20px;
  margin-top: 5px;
  align-items: stretch;
  justify-content: center;
}

.tm-caps-draw-controls-inner .tm-caps-sliders {
  margin: 0;
  width: 100%;
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.tm-caps-draw-controls-inner .tm-caps-colorpicker {
  width: 60px;
  height: 100%;
  cursor: pointer;
  border: 1px solid #ddd;
  position: relative;
  border-radius: 2px;
  border-left: none;
  border-radius: 0;
}

/* ================= SHAPE CONTROLS ================== */

.tm-caps-shape-controls-inner {
  display: flex;
  margin-bottom: 20px;
  align-items: stretch;
  justify-content: space-between;
}

.tm-caps-shape-controls-inner .tm-caps-colorpicker {
  width: 30px;
  height: 100%;
  cursor: pointer;
  position: relative;
  border-radius: 0;
}

.tm-caps-shape-controls-inner .tm-caps-cpicker {
  margin-top: 5px;
}

.tm-caps-shape-btns {
  display: flex;
  flex-wrap:wrap;
}

.tm-caps-shape-btns .tm-caps-btn {
  margin-right: 5px;
  margin-top: 5px;
}

.tm-caps-shape-btns .tm-caps-btn i {
  margin-right: 5px;
}

/* ================= TEMPLATE GALLERY ================== */

.tm-caps-gallery {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(245, 245, 245, 0.95);
  z-index: 99;
  overflow: auto;
  max-height: 100%;
}

.tm-caps-gallery-inner {
  padding: 30px
}

.tm-caps-gallery-list {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(auto-fill, minmax(min(80px, 100%), 1fr));
  column-gap: 15px;
  row-gap: 15px;
}

.tm-caps-gallery-list img {
  vertical-align: bottom;
  width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: pointer;
  border: 5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.tmcaps-live-search-container {
  position: relative;
  display: block;
  margin-bottom: 30px;
}

.tmcaps-live-search-container input[type="search"].tmcaps-live-search-box {
  border: 1px solid #ddd;
  border-radius: 4px;
  height: 40px;
  width: 100%;
  margin: 0;
  padding: 0 14px;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  transition: border 0.2s ease-in-out;
  font-size: 15px;
  background: #fff;
  color: #000;
}

.tmcaps-live-search-container input[type="search"].tmcaps-live-search-box:focus {
  border-color: #000;
}

.tmcaps-live-search-container i {
  position: absolute;
  top: 12px;
  right: 14px;
  line-height: 1;
  font-size: 16px;
  color: #673AB7;
  z-index: 1;
}

.tmcaps-no-results-message {
  display: none;
}

.tmcaps-no-results-message {
  font-weight: bold;
}

.tmcaps-live-search-container>i.fa-times {
  cursor: pointer;
}

/* ================= EMOJIS ================== */

.tm-caps-emoji {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(245, 245, 245, 0.95);
  z-index: 99;
  overflow: auto;
  max-height: 100%;
}

.tm-caps-emoji-inner {
  padding: 30px
}

.tm-caps-emoji-list {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(auto-fill, minmax(min(50px, 100%), 1fr));
  column-gap: 15px;
  row-gap: 15px;
}

.tm-caps-emoji-list img {
  vertical-align: bottom;
  width: 100%;
  height: auto;
  cursor: pointer;
  transform: scale(1);
  transition: transform 0.2s ease-in-out;
}

.tm-caps-emoji-list img:hover {
  transform: scale(1.1);
}

/* ================= FOOTER ================== */

.tm-caps-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.tm-caps-footer .tm-caps-btn span {
  margin-left: 5px;
}

.tm-caps-footer .tm-caps-btn {
  padding: 15px 25px;
  line-height: 1.2;
  border-radius: 4px;
}

/* ================= MEDIA QUERIES ================== */

@media only screen and (max-width: 640px) {
  .tm-caps-sliders {
    flex-direction: column;
    align-items: stretch
  }

  .tm-caps-sliders>div {
    border-right: none;
    border-bottom: 1px solid #ddd;
  }

  .tm-caps-text-controls>div {
    margin: 0;
    justify-content: flex-end;
    width: 100%;
  }

  .tm-caps-text-controls>div>.tm-caps-btn-wrapper {
    margin: 5px 0 5px 5px;
  }

  .tm-caps-content {
    padding: 15px 20px 20px 20px;
  }

  .tm-caps-header .tm-caps-menu span {
    display: none
  }

  .tm-caps-header .tm-caps-menu i {
    font-size: 120% !important;
  }

  .tm-caps-footer {
    justify-content: center;
    flex-direction: column;
  }

  .tm-caps-footer>.tm-caps-btn:last-child {
    margin-top: 10px;
  }

  .tm-caps-btn {
    padding: 8px 10px;
  }

  .tm-caps-colorpicker .layout_default.picker_wrapper {
    width:20em
  }
}