
/**
 * Set a min height on doc-section so it does not disappear when emtpy
 */
.doc-section:empty {
  min-height: 100px;
}

.doc-section {
  /* Allow for some space at the end of the document to drop components in */
  padding-bottom: 150px;
}

/*
 * Clearfix for the main container
 */
.doc-section:before,
.doc-section:after {
  content:"";
  display:table;
}
.doc-section:after {
  clear:both;
}


/**
 * Component Highlighting
 */

.doc-editable.doc-component-highlight,
.doc-component-highlight {
  /* Default */
  /*outline: thin dotted #333;*/
  box-shadow: 0 0 1px 2px rgba(123, 215, 253, 0.5);

  /* Webkit */
  /*outline: 5px auto -webkit-focus-ring-color;*/
  /*outline-offset: 1px;*/
}


/**
 * Container Highlighting
 */

.doc-container-highlight {
  outline: medium dashed rgba(255, 196, 13, 0.5);
}

[data-doc-container]:hover {
  outline: 1px dashed rgba(0, 0, 0, 0.2);
}

[data-doc-container]:empty {
  min-height: 100px;
  outline: 1px dashed rgba(0, 0, 0, 0.2);
  position: relative;
}

[data-doc-container]:empty:before {
  position: absolute;
  top: 0;
  right: 0;

  content: attr(data-doc-container);
  font-size: 12px;
  line-height: 1.2;
  padding: 1px 3px;

  color: rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.2);
}



/**
 * Content Editable
 */

.doc-editable {
  /* disable browser highlight of contenteditable */
  outline: none;
}

@-webkit-keyframes fadeIn {
  0% {   opacity: 0; }
  100% { opacity: 0.4; }
}

@keyframes fadeIn {
  0% {   opacity: 0; }
  100% { opacity: 0.4; }
}

.doc-editable:before {
  content: attr(data-doc-placeholder);
  opacity: 0.4;
  -webkit-animation: fadeIn 0.4s;
          animation: fadeIn 0.4s;
}

.doc-editable.doc-no-placeholder:before {
  content: normal;
  opacity: 1;
  -webkit-animation: none;
          animation: none;
}


/**
 * Image Placeholder
 */

.doc-image-empty {
  background-size: 100% 100%;
}


/**
 * Drag & Drop
 */

@-webkit-keyframes wiggle {
  0%, 100% {-webkit-transform: translateX(0);transform: translateX(0);}
  10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);transform: translateX(-10px);}
  20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);transform: translateX(10px);}
}

@keyframes wiggle {
  0%, 100% {-webkit-transform: translateX(0);transform: translateX(0);}
  10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);transform: translateX(-10px);}
  20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);transform: translateX(10px);}
}

@-webkit-keyframes pulse {
  0% { -webkit-transform: scale(1); transform: scale(1); }
  20% { -webkit-transform: scale(1.02); transform: scale(1.02); }
  100% { -webkit-transform: scale(1); transform: scale(1); }
}

@keyframes pulse {
  0% { -webkit-transform: scale(1); transform: scale(1); }
  20% { -webkit-transform: scale(1.02); transform: scale(1.02); }
  100% { -webkit-transform: scale(1); transform: scale(1); }
}

@-webkit-keyframes pulse-dragged {
  0% {  -webkit-transform: scale(1);  transform: scale(1); opacity: 1; }
  20% { -webkit-transform: scale(1.02); transform: scale(1.02); }
  100% { -webkit-transform: scale(1); transform: scale(1); opacity: 0.3; }
}

@keyframes pulse-dragged {
  0% {  -webkit-transform: scale(1);  transform: scale(1); opacity: 1; }
  20% { -webkit-transform: scale(1.02); transform: scale(1.02); }
  100% { -webkit-transform: scale(1); transform: scale(1); opacity: 0.3; }
}

.doc-dragged {
  -webkit-animation: pulse 0.3s;
          animation: pulse 0.3s;
  opacity: .4;
}

.doc-before-drop {
  -webkit-transition: all 0.3s;
          transition: all 0.3s;
  -webkit-transform: translateY(-25px);
      -ms-transform: translateY(-25px);
          transform: translateY(-25px);
}

.doc-after-drop {
  -webkit-transition: all 0.3s;
          transition: all 0.3s;
  -webkit-transform: translateY(25px);
      -ms-transform: translateY(25px);
          transform: translateY(25px);
}

.doc-dragged-placeholder {
  margin-top: 18px;
  margin-left: 12px;
  position: absolute;
  background: #09D;
  border-radius: 5px;
  padding: 0 10px;
  padding-left: 20px;
  /*border: 1px solid #efefef;*/
  color: #fff;
  height: 25px;
  line-height: 25px;
  box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.2);
}

.doc-drag-counter {
  position: absolute;
  top: 0;
  left: -10px;
  display: block;
  background: #09D;
  color: #fff;
  border-radius: 20px;
  height: 25px;
  width: 25px;
  text-align: center;
  line-height: 25px;
  font-weight: bold;
}

.doc-drag-no-drop {
  background: #dd0009;
  opacity: 0.5;
}

.doc-drag-no-drop .doc-drag-counter {
  background: #dd0009;
}

.doc-drop-marker {
  position: absolute;
  margin-top: -3px;
  min-width: 20px;
  height: 6px;
  border-radius: 3px;
  background: #09d;
}


/**
 * Longpress indicator
 */

@-webkit-keyframes ring {
  20% { -webkit-transform: scale(3.5); transform: scale(3.5); border: 3px solid rgba(0, 0, 0, 0); }
  100% { border: 3px solid rgba(0, 153, 221, 0.6); }
}

@keyframes ring {
  20% { -webkit-transform: scale(3.5); transform: scale(3.5); border: 3px solid rgba(0, 0, 0, 0); }
  100% { border: 3px solid rgba(0, 153, 221, 0.6); }
}

@-webkit-keyframes inner-ring {
  20% { border: 1px solid rgba(0, 153, 221, 0); }
  100% { border: 1px solid rgba(0, 153, 221, 0.8); -webkit-transform: scale(0.3); transform: scale(0.3); }
}

@keyframes inner-ring {
  20% { border: 1px solid rgba(0, 153, 221, 0); }
  100% { border: 1px solid rgba(0, 153, 221, 0.8); -webkit-transform: scale(0.3); transform: scale(0.3); }
}

.doc-longpress-indicator {
  position: absolute;
  margin-top: -6px;
  margin-left: -6px;
  width: 2px;
  height: 2px;
  pointer-events: none;
  border-radius: 10px;
  border: 3px solid rgba(0, 153, 221, 0);
  -webkit-animation: ring 0.4s ease-in;
          animation: ring 0.4s ease-in;

}

.doc-longpress-indicator div {
  position: absolute;
  margin-top: -8px;
  margin-left: -8px;

  width: 16px;
  height: 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 153, 221, 0);
  -webkit-animation: inner-ring 0.4s ease-in;
          animation: inner-ring 0.4s ease-in;
}


/**
 * Utils
 */

.doc-no-selection {
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}
