/*******************************
        Global Overrides
*******************************/
body {
  display: flex;
}

#main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

::-moz-selection {
  background-color: rgba(31, 189, 238, 0.5);
  border-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj4KICA8ZyBmaWxsPSIjMUZCRUVGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG9wYWNpdHk9Ii45NSI+CiAgICA8cGF0aCBkPSJNMTAgNjBDNC40NzcxNTI1IDYwIDAgNTUuNTI0MDYxOCAwIDUwIDMuNTUyNzEzNjhlLTE1IDQ0LjQ3NzE1MjUgNC40NzU5MzgxOCA0MCAxMCA0MEwyMCA0MCAyMCA1MEMyMCA1NS41MjI4NDc1IDE1LjUyNDA2MTggNjAgMTAgNjB6TTQwIDUwQzQwIDU1LjUyMjg0NzUgNDQuNDc1OTM4MiA2MCA1MCA2MEw1MCA2MEM1NS41MjI4NDc1IDYwIDYwIDU1LjUyNDA2MTggNjAgNTBMNjAgNTBDNjAgNDQuNDc3MTUyNSA1NS41MjQwNjE4IDQwIDUwIDQwTDQwIDQwIDQwIDUwIDQwIDUweiIvPgogIDwvZz4KPC9zdmc+Cg==')
    20 fill repeat;
  border-style: solid;
  border-width: 20px;
}

::selection {
  background-color: rgba(31, 189, 238, 0.5);
  border-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj4KICA8ZyBmaWxsPSIjMUZCRUVGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG9wYWNpdHk9Ii45NSI+CiAgICA8cGF0aCBkPSJNMTAgNjBDNC40NzcxNTI1IDYwIDAgNTUuNTI0MDYxOCAwIDUwIDMuNTUyNzEzNjhlLTE1IDQ0LjQ3NzE1MjUgNC40NzU5MzgxOCA0MCAxMCA0MEwyMCA0MCAyMCA1MEMyMCA1NS41MjI4NDc1IDE1LjUyNDA2MTggNjAgMTAgNjB6TTQwIDUwQzQwIDU1LjUyMjg0NzUgNDQuNDc1OTM4MiA2MCA1MCA2MEw1MCA2MEM1NS41MjI4NDc1IDYwIDYwIDU1LjUyNDA2MTggNjAgNTBMNjAgNTBDNjAgNDQuNDc3MTUyNSA1NS41MjQwNjE4IDQwIDUwIDQwTDQwIDQwIDQwIDUwIDQwIDUweiIvPgogIDwvZz4KPC9zdmc+Cg==')
    20 fill repeat;
  border-style: solid;
  border-width: 20px;
}

.documentFirstHeading {
  position: relative;
  border-bottom: 2px solid @purpleBackground;

  &::before {
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 30px;
    border-bottom: 3px solid @pink;
    content: '';
  }
}

.documentDescription {
  color: #b8c6c8;
  font-size: 1.125rem;
}

.tile .tile:not(.inner)::after {
  position: absolute;
  top: -9px;
  left: -9px;
  width: ~'calc(100% + 18px)';
  height: ~'calc(100% + 18px)';
  border: 1px solid rgba(120, 192, 215, 0);
  border-radius: 3px;
  content: '';
}

.tile .tile-add-button {
  display: none;
}

.tile.selected .tile-add-button {
  display: inline-block;
}

.tile .tile.selected::after,
.tile .tile.selected:hover::after {
  border-color: rgba(120, 192, 215, 0.5);
  border-width: 2px;
}

.tile .tile:hover::after {
  border-color: rgba(120, 192, 215, 0.25);
}

.ui.drag.tile:not(:last-child) {
  margin-bottom: 2rem;
}

.tile .ui.image {
  width: 100%;
}

.DraftEditor-editorContainer,
.DraftEditor-root,
.public-DraftEditor-content {
  height: inherit;
  text-align: initial;
}

.public-DraftEditor-content[contenteditable='true'] {
  -webkit-user-modify: read-write-plaintext-only;
}

.public-DraftEditor-content[contenteditable='true'] {
  caret-color: #e40166;
}

.public-DraftEditor-content {
  min-height: 20px;
}

.DraftEditor-root {
  position: relative;
}

.DraftEditor-editorContainer {
  position: relative;
  z-index: 1;
}

.public-DraftEditor-block {
  position: relative;
}

.public-DraftEditorPlaceholder-root {
  position: absolute;
  z-index: 1;
  color: @inputPlaceholderColor;
}

.DraftEditorPlaceholder-hidden {
  display: none;
}

.tile.align.left {
  img {
    margin-right: 1em !important;
    margin-bottom: 1em;
    float: left;
  }

  .ui.image {
    width: auto;
  }
}

.tile.align.right {
  img {
    margin-bottom: 1em;
    margin-left: 1em !important;
    float: right;
  }

  .ui.image {
    width: auto;
  }
}

.tile.align.center {
  img {
    margin-right: auto;
    margin-left: auto;
  }
}

.tile.align.full {
  width: 100% !important;
}

.tile.align:not(.right):not(.left) {
  clear: both;
}

.title.tile .public-DraftEditorPlaceholder-inner {
  font-size: @h1;
  font-weight: @headerFontWeight;
  line-height: @headerLineHeight;
}

.tile {
  h1:last-child,
  h2:last-child,
  h3:last-child,
  h4:last-child,
  h5:last-child {
    margin: @headerMargin;
  }

  p {
    margin: @paragraphMargin;
  }

  .toolbar {
    position: absolute;
    z-index: 1;
    top: -32px;
    left: 50%;
    display: flex;
    padding: 4px;
    background-color: rgba(255, 255, 255, 0.975);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translate(-50%, 0);

    form {
      display: flex;
    }

    & > svg {
      display: inline-block !important;
      box-sizing: content-box;
      padding: 4px;
      margin-right: 4px;
      color: #826a6a !important;
    }

    .ui.input > input {
      padding: 0;
      border: none;
    }

    .ui.icon.button {
      padding: 4px;
      margin-left: 4px;
      border-radius: 1px;
      color: #826a6a !important;

      &:hover {
        background-color: #edf1f2 !important;
      }
    }

    .ui.buttons:first-child {
      & .ui.icon.button {
        margin-left: 0;
      }
    }

    &.add-tile {
      z-index: 100;
      top: -10px;
      left: -9px;
      transform: none;
    }
  }

  .ui.active.basic.icon.button {
    border: 1px solid #2996da;
    background: transparent !important;
  }

  position: relative;
}

.ui.basic.button.tile-add-button,
.ui.basic.button.tile-delete-button {
  position: absolute;
  padding: 0;
  border: none;
  margin-top: -35px;
  margin-bottom: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
  color: #b8c6c8 !important;
  transform: translateX(-40px);

  &:hover,
  &:focus {
    -webkit-box-shadow: none;
    box-shadow: none;
    color: #826a6a !important;
  }
}

.ui.basic.button.tile-delete-button {
  top: 36px;
  right: 0;
  color: #b8c6b8 !important;
  transform: translateX(40px);

  &:hover,
  &:focus {
    -webkit-box-shadow: none;
    box-shadow: none;
    color: #e40166 !important;
  }
}

.drag.tile.wrapper {
  position: relative;
}

.drag.handle.wrapper {
  position: absolute;
  z-index: 1;
  top: 1px;
  left: -77px;
  color: #b8c6c8;

  .icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
  }

  &:hover {
    color: #826a6a;
  }
}

.drag.tile.title .drag.handle.wrapper {
  top: 5px;
}

.drag.handle.wrapper.hidden {
  display: none !important;
}

.description.tile .public-DraftEditorPlaceholder-inner {
  font-size: 1.125rem;
  line-height: @lineHeight;
}

.callout {
  padding: 1em;
  border: 1px solid rgba(34, 36, 38, 0.15);
  margin: 1rem 0;
  border-radius: 0.28571429rem;
  box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);
}

.ui.blocker {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.draftJsToolbar__toolbar__dNtBH {
  .tile.toolbar();
  z-index: 102;
  padding: 3px;
  border: none;

  &:before {
    border: none;
  }
}

.draftJsToolbar__button__qi1gf {
  width: 32px;
  height: 32px;
  padding: 0;
  padding: 4px !important;
  background: rgba(255, 255, 255, 0.975);
  border-radius: 1px;
  color: #826a6a;
}

.draftJsToolbar__buttonWrapper__1Dmqh + .draftJsToolbar__buttonWrapper__1Dmqh {
  margin-left: 3px;
}

.draftJsToolbar__button__qi1gf.draftJsToolbar__active__3qcpF {
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px @blue;
  color: @blue;
}

.draftJsToolbar__separator__3U7qt {
  height: 32px;
}

.separator {
  display: inline-block;
  height: 24px;
  border-right: 1px solid #ddd;
  margin: 0 0 4px 4px;
  vertical-align: bottom;
}
