@font-face {
  font-family: 'RedactorFont';
  src: url(data:application/x-font-ttf;charset=utf-8;base64, ) format('truetype'), url(data:application/font-woff;charset=utf-8;base64, ) format('woff');
  font-weight: normal;
  font-style: normal;
}
/*
	BOX
*/
.redactor_box {
    position: relative;
    overflow: visible;
    background: $white;
    iframe {
        display: block;
        margin: 0;
        padding: 0;
        border: 1px solid $gray-100;
    }
    textarea {
        z-index: auto !important;
        position: relative;
        display: block;
        overflow: auto;
        margin: 0;
        padding: 0;
        width: 100%;
        outline: none;
        border: none;
        background-color: $gray-900;
        box-shadow: none;
        color: $gray-100;
        font-size: $code-font-size;
        resize: none;
        &:focus {
            outline: none;
            background-color: $gray-900;
            box-shadow: none;
            color: $gray-100;
        }
    }
    z-index: auto !important;
}

.redactor_box_fullscreen {
  z-index: 9999 !important;
}
#redactor_modal_overlay,
#redactor_modal,
.redactor_dropdown {
  z-index: 1051 !important;
  > * {
    -webkit-filter: blur(0) !important;
    -moz-filter: blur(0) !important;
    -ms-filter: blur(0) !important;
    -o-filter: blur(0) !important;
    filter: blur(0) !important;
  }
}
/*
	AIR

*/
body .redactor_air {
  position: absolute;
  z-index: 502;
}
/*
	FULLSCREEN
*/
body .redactor_box_fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
}
/*
	LINK TOOLTIP
*/
.redactor-link-tooltip {
  position: absolute;
  z-index: 49999;
  padding: $tooltip-padding-y $tooltip-padding-x;
  line-height: 1;
  display: inline-block;
  background-color: $tooltip-bg;
  color: $tooltip-color;
}
.redactor-link-tooltip,
.redactor-link-tooltip a {
  font-size: $tooltip-font-size;
}
.redactor-link-tooltip a {
  color: $gray-400;
  margin: 0 5px;
  text-decoration: none;
}
.redactor-link-tooltip a:hover {
  color: $white;
}
/*
	IMAGE BOX
*/
#redactor-image-box img {
  width: 100%;
}
.redactor_editor {
    position: relative;
    overflow: auto;
    margin: 0 !important;
    padding: $input-padding-y $input-padding-x;
    outline: none;
    background: none;
    background: $white;
    box-shadow: none !important;
    white-space: normal;
    border: 1px solid $gray-400;
    box-sizing: border-box;
    word-break: break-word;
    &:focus {
        outline: none;
    }
    .redactor_placeholder {
        color: $gray-400 !important;
        display: block !important;
    }
    > *:first-child {
        margin-top: 0;
    }
    /*
        TYPOGRAPHY
    */
    object, embed, video, img {
        max-width: 100%;
        width: auto;
    }
    video, img {
        height: auto;
    }
    code {
        white-space: pre;
    }
}

/*
	TOOLBAR
*/
.redactor_toolbar {
    position: relative;
    top: 0;
    left: 0;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: $white;
    border: none;
    z-index: 3;
    &:after {
        content: "";
        display: table;
        clear: both;
    }
    &.redactor-toolbar-overflow {
        overflow-y: auto;
        height: 29px;
        white-space: nowrap;
    }
    &.redactor-toolbar-external {
        z-index: 999;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    li {
        vertical-align: top;
        display: inline-block;
        margin: 0 !important;
        padding: 0 !important;
        outline: none;
        list-style: none !important;
        box-sizing: content-box;
        a {
            display: block;
            color: $gray-900;
            text-align: center;
            padding: $btn-padding-y*1.5 $btn-padding-x;
            outline: none;
            border: none;
            text-decoration: none;
            cursor: pointer;
            zoom: 1;
            box-sizing: content-box;
            &:hover {
                outline: none;
                background-color: $primary;
                color: $white;
                i:before {
                    color: $white;
                }
            }
        }
    }
}

body .redactor_air .redactor_toolbar {
  padding-right: 2px !important;
}

.redactor_toolbar li a:active,
.redactor_toolbar li a.redactor_act {
  outline: none;
  background-color: $gray-600;
}
.redactor_toolbar li a.redactor-btn-image {
  background-position: center center;
  background-repeat: no-repeat;
}
.redactor_button_disabled {
  opacity: 0.3;
}
.redactor_button_disabled:hover {
  outline: none;
  background-color: transparent !important;
  cursor: default;
}
.redactor_toolbar li a.fa-redactor-btn {
  display: inline-block;
  padding: 9px 10px 8px 10px;
  line-height: 1;
}
.redactor_toolbar.redactor-toolbar-typewriter {
  box-shadow: none;
  background: rgba(240, 240, 240, 0.9);
}
.redactor_toolbar.redactor-toolbar-typewriter li a:hover {
  outline: none;
  background-color: #1f78d8;
  color: $white;
}
.redactor_toolbar.redactor-toolbar-typewriter li a:active,
.redactor_toolbar.redactor-toolbar-typewriter li a.redactor_act {
  outline: none;
  background-color: $gray-400;
  color: #444;
}
.re-icon {
  font-family: 'RedactorFont';
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.re-icon i:before {
  position: relative;
  font-size: 14px;
}
.re-video:before {
  content: "\e600";
}
.re-unorderedlist:before {
  content: "\e601";
}
.re-undo:before {
  content: "\e602";
}
.re-underline:before {
  content: "\e603";
}
.re-textdirection:before {
  content: "\e604";
}
.re-fontcolor:before {
  content: "\e605";
}
.re-table:before {
  content: "\e606";
}
.re-redo:before {
  content: "\e607";
}
.re-quote:before {
  content: "\e608";
}
.re-outdent:before {
  content: "\e609";
}
.re-orderedlist:before {
  content: "\e60a";
}
.re-link:before {
  content: "\e60b";
}
.re-horizontalrule:before {
  content: "\e60c";
}
.re-italic:before {
  content: "\e60d";
}
.re-indent:before {
  content: "\e60e";
}
.re-image:before {
  content: "\e60f";
}
.re-fullscreen:before {
  content: "\e610";
}
.re-normalscreen:before {
  content: "\e611";
}
.re-formatting:before {
  content: "\e612";
}
.re-fontsize:before {
  content: "\e613";
}
.re-fontfamily:before {
  content: "\e614";
}
.re-deleted:before {
  content: "\e615";
}
.re-html:before {
  content: "\e616";
}
.re-clips:before {
  content: "\e617";
}
.re-bold:before {
  content: "\e618";
}
.re-backcolor:before {
  content: "\e619";
}
.re-file:before {
  content: "\e61a";
}
.re-alignright:before {
  content: "\e61b";
}
.re-alignment:before,
.re-alignleft:before {
  content: "\e61c";
}
.re-alignjustify:before {
  content: "\e61d";
}
.re-aligncenter:before {
  content: "\e61e";
}
.re-gallery:before {
  content: "\e61f";
}
.re-spoiler:before {
	content: "\f50d";
}
.re-smiles:before {
	content: "\e9df";
}
.re-location:before {
	content: "\e822";
}
.re-audio:before {
	content: "\e821";
}
/*
	Toolbar classes
*/
.redactor_format_blockquote {
  padding-left: 10px;
  color: #666 !important;
  font-style: italic;
}
.redactor_format_pre {
  font-family: monospace, sans-serif;
}
.redactor_format_h1,
.redactor_format_h2,
.redactor_format_h3,
.redactor_format_h4,
.redactor_format_h5 {
  font-weight: bold;
}
.redactor_format_h1 {
  font-size: 30px;
  line-height: 36px;
}
.redactor_format_h2 {
  font-size: 24px;
  line-height: 36px;
}
.redactor_format_h3 {
  font-size: 20px;
  line-height: 30px;
}
.redactor_format_h4 {
  font-size: 16px;
  line-height: 26px;
}
.redactor_format_h5 {
  font-size: 14px;
  line-height: 23px;
}
.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h1,
.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h2,
.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h3,
.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h4,
.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h5 {
  font-size: 1em;
  line-height: 1.6em;
  text-transform: uppercase;
}
.redactor-toolbar-typewriter .redactor_dropdown .redactor_format_h2 {
  font-size: .85em;
}
/*
	Typewriter
*/
.redactor_editor.redactor-editor-typewriter {
  background: #f5f5f5 !important;
  padding: 25px 50px !important;
}
.redactor_editor.redactor-editor-typewriter div,
.redactor_editor.redactor-editor-typewriter p,
.redactor_editor.redactor-editor-typewriter ul,
.redactor_editor.redactor-editor-typewriter ol,
.redactor_editor.redactor-editor-typewriter table,
.redactor_editor.redactor-editor-typewriter dl,
.redactor_editor.redactor-editor-typewriter blockquote,
.redactor_editor.redactor-editor-typewriter pre,
.redactor_editor.redactor-editor-typewriter h1,
.redactor_editor.redactor-editor-typewriter h2,
.redactor_editor.redactor-editor-typewriter h3,
.redactor_editor.redactor-editor-typewriter h4,
.redactor_editor.redactor-editor-typewriter h5,
.redactor_editor.redactor-editor-typewriter h6 {
  font-size: 18px !important;
  line-height: 1.5em !important;
  margin-bottom: 1.5em !important;
}
.redactor_editor.redactor-editor-typewriter h2 {
  font-size: 14px !important;
}
.redactor_editor.redactor-editor-typewriter h1,
.redactor_editor.redactor-editor-typewriter h2,
.redactor_editor.redactor-editor-typewriter h3,
.redactor_editor.redactor-editor-typewriter h4,
.redactor_editor.redactor-editor-typewriter h5,
.redactor_editor.redactor-editor-typewriter h6 {
  text-transform: uppercase;
}
.redactor_editor.redactor-editor-typewriter a {
  color: $black !important;
  text-decoration: underline !important;
}
/*
	WYM
*/
.redactor_editor.redactor_editor_wym {
  padding: 10px 7px 0 7px !important;
  background: #f6f6f6 !important;
}
.redactor_editor.redactor_editor_wym div,
.redactor_editor.redactor_editor_wym p,
.redactor_editor.redactor_editor_wym ul,
.redactor_editor.redactor_editor_wym ol,
.redactor_editor.redactor_editor_wym table,
.redactor_editor.redactor_editor_wym dl,
.redactor_editor.redactor_editor_wym pre,
.redactor_editor.redactor_editor_wym h1,
.redactor_editor.redactor_editor_wym h2,
.redactor_editor.redactor_editor_wym h3,
.redactor_editor.redactor_editor_wym h4,
.redactor_editor.redactor_editor_wym h5,
.redactor_editor.redactor_editor_wym h6,
.redactor_editor.redactor_editor_wym blockquote {
  margin-top: 0;
  margin-bottom: 5px !important;
  padding: 10px !important;
  border: 1px solid #e4e4e4 !important;
  background-color: $white !important;
  z-index: 0;
}
.redactor_editor.redactor_editor_wym blockquote:before {
  content: '';
}
.redactor_editor.redactor_editor_wym img {
  position: relative;
  z-index: 1;
}
.redactor_editor.redactor_editor_wym div {
  border: 1px dotted #aaa !important;
}
.redactor_editor.redactor_editor_wym pre {
  border: 2px dashed #e4e4e4 !important;
  background-color: #f8f8f8 !important;
}
.redactor_editor.redactor_editor_wym ul,
.redactor_editor.redactor_editor_wym ol {
  padding-left: 2em !important;
}
.redactor_editor.redactor_editor_wym ul li ul,
.redactor_editor.redactor_editor_wym ol li ul,
.redactor_editor.redactor_editor_wym ul li ol,
.redactor_editor.redactor_editor_wym ol li ol {
  border: none !important;
}
/*
	DROPDOWN
*/
.redactor_dropdown {
    position: absolute;
    top: 28px;
    left: 0;
    width: 200px;
    background-color: $white;
    box-shadow: 0 1px 5px $gray-600;
    a {
        display: block;
        padding: $dropdown-item-padding-y*2 $dropdown-item-padding-x/2;
        color: $black;
        text-decoration: none;
        &:hover {
            background-color: $dropdown-link-hover-bg;
            color: $dropdown-link-hover-color !important;
            text-decoration: none;
        }
    }
}
.redactor-toolbar-typewriter .redactor_dropdown {
  background-color: #f5f5f5;
}
.redactor_separator_drop {
  padding: 0 !important;
  border-top: 1px solid $gray-600;
  font-size: 0;
  line-height: 0;
}

/*
	MODAL
*/
#redactor_modal_overlay {
  position: fixed;
  top: 0;
  left: 0;
  margin: auto;
  background-color: $black !important;
  opacity: $modal-backdrop-opacity;
  width: 100vw;
  height: 100vh;
  background-color: $modal-backdrop-bg;
}
#redactor_modal {
  position: fixed;
  top: 50%;
  left: 50%;
  padding: 0;
  background: $white;
  color: $black;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
@include media-breakpoint-down(md) {
    #redactor_modal {
      max-width: 100% !important;
      width: 100% !important;
      margin-left: 0 !important;
      left: 0 !important;
    }
}
#redactor_modal header {
  padding: $modal-inner-padding $modal-inner-padding 0 $modal-inner-padding;
  font-size: $font-size-base * 1.5;
}
#redactor_modal section {
  padding: $modal-inner-padding;
}
#redactor_modal label {
  display: block !important;
  float: none !important;
  margin-top: $spacer*0.5;
  position: relative;
}
#redactor_modal footer:after {
  content: "";
  display: table;
  clear: both;
}
#redactor_modal footer div {
  float: left;
}

#redactor_modal_close {
    position: absolute;
    top: 0;
    right: $modal-inner-padding;
    color: $gray-600;
    font-size: $font-size-base * 3;
    cursor: pointer;
    z-index: 1;
}
#redactor_modal_close:hover {
  color: $black;
}
.redactor_input, #redactor_modal textarea, #redactor_modal select, #redactor_modal input[type="text"],
#redactor_modal input[type="password"],
#redactor_modal input[type="email"] {
    z-index: 2;
    display: block;
    width: 100%;
    height: $input-height;
    padding: $input-padding-y $input-padding-x;
    font-family: $input-font-family;
    @include font-size($input-font-size);
    font-weight: $input-font-weight;
    line-height: $input-line-height;
    color: $input-color;
    background-color: $input-bg;
    background-clip: padding-box;
    border: $input-border-width solid $input-border-color;
    @include border-radius($input-border-radius, 0);
    @include box-shadow($input-box-shadow);
    @include transition($input-transition);
    &::-ms-expand {
      background-color: transparent;
      border: 0;
    }
    &:-moz-focusring {
      color: transparent;
      text-shadow: 0 0 0 $input-color;
    }
    @include form-control-focus($ignore-warning: true);
}
.redactor_modal_box {
  overflow: auto;
  margin-bottom: 10px;
  height: 350px;
}
#redactor_image_box {
  overflow: auto;
  height: 270px;
}
#redactor_image_box_select {
  display: block;
  margin-bottom: 15px !important;
  width: 200px;
}
#redactor_image_box img {
  margin-right: 10px;
  margin-bottom: 10px;
  max-width: 100px;
  cursor: pointer;
  border: 1px solid $gray-400;
}
#redactor_tabs {
  margin-bottom: $spacer;
  display: flex;
  flex-wrap: wrap;
}
#redactor_tabs a {
  text-decoration: none;
  display: block;
  @include border-radius($nav-pills-border-radius);
  padding: (0.25*$spacer) (0.75*$spacer);
  &.redactor_tabs_act {
    color: $nav-pills-link-active-color;
    background-color: $nav-pills-link-active-bg;
  }
}
.redactor_modal_btn_hidden {
  display: none;
}
#redactor_modal footer {
    display: flex;
}
@mixin r-button-variant($background, $hover-background: darken($background, 7.5%), $active-background: darken($background, 10%)) {
  color: color-yiq($background);
  @include gradient-bg($background);

  @include hover() {
    color: color-yiq($hover-background);
    @include gradient-bg($hover-background);
  }

  &:focus,
  &.focus {
    color: color-yiq($hover-background);
    @include gradient-bg($hover-background);
  }
}
#redactor_modal footer button {
    position: relative;
    vertical-align: middle;
    width: 100%;
    padding: $btn-padding-y $btn-padding-x;
    margin: 0;
    outline: none;
    border: none;
    @include r-button-variant($secondary);
    text-align: center;
    text-decoration: none;
    font-size: $btn-font-size;
    font-family: $btn-font-family;
    font-weight: $btn-font-weight;
    line-height: $btn-line-height;
    cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
    &.redactor_modal_delete_btn {
        @include r-button-variant($danger);
    }
    &.redactor_modal_action_btn {
        @include r-button-variant($primary);
    }
}

/* Drag and Drop Area */
.redactor_droparea {
  position: relative;
  margin: auto;
  margin-bottom: $spacer;
  width: 100%;
}
.redactor_droparea .redactor_dropareabox {
  position: relative;
  z-index: 1;
  padding: ($spacer*3) 0;
  width: 100%;
  border: 1px dashed $gray-500;
  background: $white;
  text-align: center;
}
.redactor_droparea .redactor_dropareabox,
.redactor_dropalternative, .empty_list {
  color: $gray-800;
}
.empty_list {
  position: relative;
  padding: $alert-padding-y $alert-padding-x;
  margin-bottom: $alert-margin-bottom;
  border: $alert-border-width solid transparent;
  @include border-radius($alert-border-radius);
  @include alert-variant(theme-color-level("info", $alert-bg-level), theme-color-level("info", $alert-border-level), theme-color-level("info", $alert-color-level));
  display: block;
}
.redactor_dropareabox.hover {
  border-color: theme-color-level("warning", $alert-bg-level);
  background: $warning;
  color: $white;
}
.redactor_dropareabox.error {
  border-color: theme-color-level("danger", $alert-bg-level);
  background: $danger;
  color: $white;
}
.redactor_dropareabox.drop {
  border-color: theme-color-level("secondary", $alert-bg-level);
  background: $secondary;
  color: $white;
}
.redactor_dropdown_box_smiles {
    width: 360px;
}
.redactor_dropdown_box_smiles img {
    cursor: pointer;
}
#wall_add_form .redactor_box, #wall_add_form  .redactor_toolbar, #comments_add_form .redactor_box, #comments_add_form  .redactor_toolbar {
    background: transparent;
}
#wall_add_form .redactor_box, #comments_add_form .redactor_box, #comments_edit_form .redactor_box {
    margin: 0 0 $spacer 0;
}
#wall_add_form .button-preview, #comments_add_form .button-preview {
    display: none;
}
/* =ProgressBar
-----------------------------------------------------------------------------*/
#redactor-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000000;
  height: 10px;
}
#redactor-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background-color: #3d58a8;
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
  -webkit-animation: progress-bar-stripes 2s linear infinite;
  -o-animation: progress-bar-stripes 2s linear infinite;
  animation: progress-bar-stripes 2s linear infinite;
  background-size: 40px 40px;
}
@-webkit-keyframes progress-bar-stripes {
  from {
    background-position: 40px 0;
  }
  to {
    background-position: 0 0;
  }
}
@-o-keyframes progress-bar-stripes {
  from {
    background-position: 40px 0;
  }
  to {
    background-position: 0 0;
  }
}
@keyframes progress-bar-stripes {
  from {
    background-position: 40px 0;
  }
  to {
    background-position: 0 0;
  }
}
