/*
    This file is part of the LIREC program developped for the SIMPLES project.
    It was developped by Baptiste Jacquet and Sébastien Poitrenaud for the
    LUTIN-Userlab from 2018 to 2020.
    Copyright (C) 2018  Baptiste Jacquet & Sébastien Poitrenaud

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

.editor-image {
  position: relative;
  display: block;
  max-width: 100%;
  height: auto;
  /* margin-bottom: 6px; */
  margin: auto;
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0);
/*
  top: 0;
  -webkit-filter: none;
  filter: none;
  -webkit-transition: top 0.25s, -webkit-filter 0.25s;
  transition: top 0.25s, filter 0.25s;
*/
}

.editor-image:hover {
  cursor: pointer;
/*
  position: relative;
  top: -5px;
  -webkit-filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.3));
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.3));
  -webkit-transition: top 0.05s, -webkit-filter 0.25s;
  transition: top 0.05s, filter 0.25s;
*/
}

.editor-image-container {
  margin: auto;
}

.frame {
  border: 4pt solid #343434;
}

.editor-block {
  margin-top: 1em; /* 5 */
  margin-bottom: 1em; /* 0 */
  /* border-radius: 8px; */
  width: 100%;
  border-right: solid 5px transparent;
}
/*.editor-block:hover {*/
.text-block:hover,
.letter-block:hover {
  border-right: solid 5px var(--lirec-color);
}

.editor-block.selected {
  background-color: #bfb;
}

.editor-block.image-block .editor-text {
  text-align: center;
}

.editor-block.image-block .editor-text .ql-editor{
  display: inline-block;
  min-width: 14pt;
}

.editor-block.text-block {
  display: grid;
  grid-template-columns: auto 1fr auto;
}

.editor-block.text-block .left-image {
  grid-column: 1;
}

.editor-block.text-block .right-image {
  grid-column: 3;
}

.editor-block.text-block .editor-text {
  grid-column: 2;
}

.editor-text {
  border: none;
  align-self: center;
  height: auto;
  font-family: Arial, sans-serif;
  font-size: 14pt;
  /*margin: 10px 1em 10px 1em;*/
  min-height: 18pt;
  margin-top: 1pt; /* 5 */
  margin-bottom: 1pt; /* 0 */
  margin-left: 5pt;
  margin-right: 5pt;
  overflow: hidden;
  cursor: text;
}

.ql-container.ql-snow {
  border: 0px;
}

.editor-text .ql-editor h1 {
  font-size: 28pt;
  text-align: center;
}

.editor-text .ql-editor h2 {
  font-size: 20pt;
}

.editor-text .ql-editor h3 {
  font-size: 18pt;
}

.editor-text .ql-editor h4 {
  font-size: 16pt;
}

.ql-editor {
  padding: 0;
}

.editor-text .ql-align-right {
  text-align: right !important;
}

/**
 * =============================================================================
 * Span classes.
 * =============================================================================
 */
 /* When the user manually sets no wrap */
.editor-text .ql-wrap-nowrap {
  white-space: nowrap;
  display: inline-block;
}
/* When the user manually sets wrap */
.editor-text .ql-wrap-wrap {
  white-space: normal;
}
/* When the editor automatically sets no wrap */
.editor-text .ql-wrap-auto-nowrap {
  white-space: nowrap;
  display: inline-block;
}

.editor-text .ql-bold {
  font-weight: bold;
}
/**
 * =============================================================================
 * End of Span classes.
 * =============================================================================
 */

/*  I M A G E   W I D G E T S   */

.img-widget,
.img-txt-widget {
  position: absolute;
  z-index: 500;
  display: none;
  width: 35px;
  height: 35px;
  margin: 2px;
  border-radius: 25px;
  background-color: white; /* #ddd; /* #e8e8e8; */
  border: 2px solid #4b4;
}

.img-txt-widget {
  width: 37px;
  height: 37px;
}

.block-delete-right,
.block-delete-left {
  width: 35px;
  height: 35px;
}

.img-widget img,
.img-txt-widget img {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  pointer-events: none;
  position: relative;
  left: 8px;
  top: 1px;
}

.block-new img {
  left: 4px;
  top: 4px;
}

.img-widget.block-new-left img,
.img-widget.block-new-right img {
  left: 3px;
  top: 3px;
}

.img-widget.block-move-left img {
  left: 10px;
}

.img-widget.block-move-right img {
  left: 12px;
}

.img-widget:hover,
.img-txt-widget:hover {
  background-color: #bfb;
  border-color: #bfb;
  cursor: pointer;
}

.img-widget.block-delete {
  border-color: red;
}

.img-widget.block-delete:hover {
  background-color: #fbb;
  border-color: #fbb;
  z-index: 1000;
}

.img-txt-widget.block-delete-left,
.img-txt-widget.block-delete-right {
  border-color: red;
}

.img-txt-widget.block-delete-left:hover,
.img-txt-widget.block-delete-right:hover {
  background-color: #fbb;
  border-color: #fbb;
  z-index: 1000;
}

/*                           P A L E T T E  */

#blockCmd {
  position: absolute;
  opacity: 1;
  width: 80px;
  height: 110px;
  border-radius: 20px;
  background-color: white; /* #f4f4f4; */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  border: 2px solid #ddd; /* rgba(0, 0, 0, 0); */
}

#blockCmd div {
  position: relative;
  width: 35px;
  height: 35px;
  margin: 2px;
  border-radius: 25px;
}

#blockCmd:hover {
  /* background-color: #eaeaea; */
  border: 2px solid #2bac51; /* #bbb;  /* #e4e4e4; */
}

#blockCmd div[data-toggle]:hover {
  cursor: pointer;
}

#blockCmd img {
  position: relative;
  pointer-events: none;
  left: 10px;
  top: 2px;
}

#blockCmd .block-new-up {
  left: -1px;
  top: -1px;
}

#blockCmd .block-new-down {
  left: -1px;
  top: -6px;
}

#blockCmd .block-new2-down img,
#blockCmd .block-new2-up img {
  left: 5px;
  top: 5px;
}

#blockCmd .block-move-down {
  top: -43px;
  left: 38px;
}

#blockCmd .block-move-down:hover {
  background-color: #bfb;
}

#blockCmd .block-move-up {
  top: -149px;
  left: 38px;
}

#blockCmd .block-move-up:hover {
  background-color: #bfb;
}

#blockCmd .block-delete {
  top: -2px;
  left: 38px;
}

#blockCmd .block-delete:hover {
  background-color: #fbb;
}

#blockCmd .block-new2-up {
  display: none;
  top: -256px;
  left: -2px;
}

#blockCmd .block-new2-down {
  display: none;
  top: -120px;
  left: -2px;
}

#blockCmd .block-new-down:hover,
#blockCmd .block-new2-down:hover,
#blockCmd .block-new-up:hover,
#blockCmd .block-new2-up:hover {
  background-color: #bfb;
}

#blockCmd .block-number {
  top: -148px;
  left: -1px;
  text-align: center;
  font-weight: 900;
  font-size: 20px;
  color: #4aa;
  -webkit-user-select: none; /* Safari 3.1+ */
  -moz-user-select: none; /* Firefox 2+ */
  user-select: none;
  pointer-events: none;
}
