.ally-tooltip,
.arrow::after {
    left: 100px;
    position: absolute;
    top: 100px;
    visibility: hidden;
}

.ally-tooltip {
    border-radius: 3px;
    border: 1px solid #DDD;
    box-shadow: 6px 5px 9px -9px #000;
    color: #FFF;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    max-width: 400px;
    opacity: 0.9;
    padding: 10px 20px;
    text-align: center;
    z-index: 9999;
}

.ally-tooltip div:first-child {
    position: relative;
    white-space: nowrap;
    z-index: 2;
}

.ally-tooltip,
.ally-tooltip .ally-arrow::after {
    background-color: #000;
}

.ally-tooltip .ally-arrow {
    bottom: -16px;
    height: 16px;
    left: 50%;
    margin-left: -35px;
    overflow: hidden;
    position: absolute;
    width: 70px;
    pointer-events: none;
}

.ally-tooltip .ally-arrow.ally-arrow-top {
    bottom: auto;
    top: -16px;
}

.ally-tooltip .ally-arrow::after {
    border: 1px solid #000;
    box-shadow: 6px 5px 9px -9px #000;
    content: "";
    height: 25px;
    left: 21px;
    position: absolute;
    top: -20px;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    width: 25px;
    border-color: #FFF;
}

.ally-tooltip .ally-arrow-top::after {
    bottom: -20px;
    top: auto;
}

.ally-tooltip .ally-arrow-bottom {
    top: -16px;
}

.ally-tooltip .ally-arrow-bottom::after {
    bottom: -20px;
    top: auto;
}

.ally-tooltip .ally-arrow-left {
    left: 0;
    margin-left: -28px;
    top: calc(50% - 17px);
    height: 38px;
    width: 28px;
}

.ally-tooltip .ally-arrow-left::after {
    right: auto;
    top: 4px;
}

.ally-tooltip .ally-arrow-right {
    left: 100%;
    margin-left: 0;
    top: calc(50% - 18px);
    height: 38px;
    width: 14px;
}

.ally-tooltip .ally-arrow-right::after {
    left: -20px;
    top: 5px;
}

.ally-tooltip .ally-tooltip-under {
    background-color: #333;
    color: #FFF;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 16px;
}

.ally-helper-hidden-accessible {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}
@media print{/**
 * Copyright (c) 2016 "Fronteer LTD". All rights reserved.
 */

/*
 * These styles should only be applied when the browser is rendering the page in print mode. They should not interfere
 * with any page or LMS components and simply aim to hide Ally functionality that's not desired in print view.
 */

body.ally-instructor-feedback-active,
body.ally-accessible-versions-active {
    overflow: visible;
}

/* Hide all the LMS specific content when printing instructor feedback */
body.ally-instructor-feedback-active > *:not(.ally-iframe-mask) {
    display: none !important;
}

/** Ensure the iframe is long enough to accomodate the guidance from the instructor feedback */
.ally-iframe-mask,
.ally-iframe {
    bottom: auto !important;
    height: 3000px !important;
    overflow: visible !important;
    position: static !important;
}

/* Hide score indicators in print mode */
.ally-accessibility-score-indicator {
    display: none !important;
}

/* Hide the A4W Launcher */
.ally-af-launch-container {
    display: none !important;
}

/* Hide the seizure guards in preview mode */
.ally-image-seizure-guard {
    display: none !important;
}

/* Hide alternative format icons in print mode */
.ally-alternative-formats {
    display: none !important;
}
}/**
 * Copyright (c) 2016 "Fronteer LTD". All rights reserved.
 */

/* Import the print styles */

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

body.ally-instructor-feedback-active,
body.ally-accessible-versions-active {
    overflow: hidden;
}

.ally-iframe-mask {
    background-color: #333;
    display: -ms-flexbox;
    display: flex;
}

/* Loading icon */
.ally-iframe-mask > img {
    animation: spin 1s linear infinite;
    height: 80px;
    margin: auto;
    opacity: 1;
    outline: none;
    transition: opacity 0.2s linear;
    width: 80px;
}

.ally-iframe-mask.ally-iframe-active > img {
    opacity: 0;
}

/* Close button */
.ally-iframe-mask button {
    /* Note: Needs to be in line with the X in the instructor feedback sidebar */
    background-color: transparent;
    background-image: none;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 10px;
    position: fixed;
    right: 10px;
    top: 5px;
}

.ally-iframe-mask button > img {
    /* Note: Needs to be in line with the X in the instructor feedback sidebar */
    height: auto;
    width: 36px;
}

.ally-iframe-mask > .ally-iframe {
    display: none;
}

.ally-iframe-mask.ally-iframe-active > .ally-iframe {
    display: block;
}

.ally-iframe-mask,
.ally-iframe {
    border: none;
    bottom: 0;
    height: 100%;
    left: 0;
    margin: 0;
    padding: 0;
    position: fixed;
    right: 0;
    top: 0;
    overflow: hidden;
    width: 100%;

    /**
     * This is dependent on the zIndex applied to WYSIWYG editors over in TinyMceEditorController.ts. This should be
     * 1 less than the editor zIndex so that the editor will be rendered *on top* of the instructor feedback iframe.
     */
    z-index: 9998;
}

/* SCORE INDICATOR */
.ally-accessibility-score-indicator,
.ally-scoreindicator {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    font: inherit;
    outline: inherit;
    cursor: pointer;
}

/** WYSIWYG FEEDBACK: EDITOR & SCORE METER */

/** Base score meter */

.ally-score-meter-container-toolbar {
    position: relative !important;
}

.ally-score-meter-container {
    background: none !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    margin: 5px 0 !important;
    padding: 10px !important;
    position: absolute !important;
    right: 0 !important;
    top: -50px !important;
    z-index: 2 !important;
}

.ally-score-meter-container:hover,
.ally-score-meter-container:focus {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.ally-score-meter {
    width: 34px !important;
}

.ally-score-meter-background {
    stroke: #CDD2D5 !important;
}

.ally-score-meter-foreground {
    transition: stroke-dasharray 0.5s ease-in-out !important;
}

.ally-score-meter-text {
    font-size: 14px !important;
    margin-left: 5px !important;
}

/** Quill scoremeter */

.ally-score-meter-container-quill {
    background: none !important;
    float: left;
    border-radius: 0 !important;
    display: block !important;
    margin: 3px 3px 3px 0 !important;
    padding: 7px 15.75px !important;
    position: unset !important;
    right: unset !important;
    top: unset !important;
    z-index: 2 !important;
}

[direction="rtl"] .ally-score-meter-container-quill {
    float: right;
}

/** Quill fullscreen in feedback mode. */

.ally-wysiwyg-feedback-quill-fullscreen {
    border-right: solid 1px #000 !important;
    height: calc(100vh - 70px);
    left: 0;
    position: fixed;
    right: 400px;
    top: 69px;
    z-index: 9999;
    padding: 20px 50px;
    background-color: white;
    overflow: auto;
}

.ally-wysiwyg-feedback-quill-fullscreen .bb-editor-root {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ally-wysiwyg-feedback-quill-fullscreen .bb-editor-root .keyboard-tooltip-container {
    flex: 1;
    min-height: 0;
}

.ally-wysiwyg-feedback-quill-fullscreen .bb-editor-container.ql-container {
    z-index: 0;
}

.ally-wysiwyg-feedback-quill-fullscreen .bb-editor-root .keyboard-tooltip-container .ql-container,
.ally-wysiwyg-feedback-quill-fullscreen .bb-editor-root .keyboard-tooltip-container .ql-container .ql-editor {
    height: 100%;
    max-height: 100%;
}

.ally-wysiwyg-feedback-quill-fullscreen .bb-editor-root .word-count {
    background-color: #FFF;
}

.ally-wysiwyg-feedback-quill-fullscreen .ally-score-meter-container {
    display: none !important;
}

.ally-wysiwyg-feedback-list-item-inactive {
    display: none !important;
}

/** Atto fullscreen in feedback mode. */

.ally-wysiwyg-feedback-atto-fullscreen {
    border-right: solid 1px #000 !important;
    height: calc(100vh - 60px);
    left: 0;
    position: fixed;
    right: 400px;
    top: 69px;
    z-index: 9999;
    background-color: white;
    overflow: auto;
}

.ally-wysiwyg-feedback-atto-fullscreen .editor_atto {
    height: 100% !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: inherit;
}

.form-group.row.fitem .ally-score-meter-toolbar-atto.ally-score-meter-container-toolbar {
    right: 0;
    position: absolute !important;
}

/* Dynamically readjusts atto contents to compensate toolbar expansion. */
.ally-wysiwyg-feedback-atto-fullscreen .editor_atto_content_wrap {
    overflow: auto;
    flex: 1;
}

.ally-wysiwyg-feedback-atto-fullscreen .editor_atto_content {
    height: 100% !important;
}

/* Atto HTML editor sets the dimensions via JS instead of relying on parent, leading to overflow after IF is closed. */
.editor_atto_wrap .CodeMirror {
    width: auto !important;
}

/* Atto HTML editor is just an overlay on top of normal editor. */
.ally-wysiwyg-feedback-atto-fullscreen .CodeMirror {
    position: fixed;
    left: 0;
    right: 400px;
    top: calc(164px);
    height: calc(100vh - 164px) !important;
}

/* Prevent highlight indicator overlay on toolbar. */
.ally-wysiwyg-feedback-atto-fullscreen .editor_atto_toolbar {
    z-index: 1;
    background-color: inherit;
}

.ally-wysiwyg-feedback-atto-fullscreen .ally-preview-selection-container {
    z-index: 0;
}

.ally-wysiwyg-feedback-atto-fullscreen .ally-score-meter-container {
    display: none !important;
}

/** TinyMCE fullscreen in feedback mode */

/* Fullscreen feedback mode: Editor overlays instructor feedback preview area. */
.ally-wysiwyg-feedback-tinymce-fullscreen {
    /*  this needs to everywhere */
    border-right: solid 1px #000 !important;
    left: 0 !important;
    position: fixed !important;
    top: 69px !important;

    /**
     * When TinyMCE renders pop-overs and fly-overs, they tend to be rendered with z-index of
     * 10000. So while we need to boost the z-index so it appears on top of instructor feedback
     * (ally.css has the z-index set to 9998 for `.ally-iframe`), we need to keep it less than
     * 10000 so that pop-overs will continue to appear on top of the editor.
     */
    z-index: 9999 !important;
}

.ally-wysiwyg-feedback-tinymce-fullscreen .ally-score-meter-container {
    display: none !important;
}

.ally-wysiwyg-feedback-tinymce-fullscreen .tox-editor-container {
    /* If the screen is so narrow that the toolbar takes up all the vertical space, allow the container to scroll. */
    overflow: auto !important;
}

.ally-wysiwyg-feedback-tinymce-fullscreen .tox-edit-area {
    /* Don't let the edit area be completel squished by a massively tall toolbar as a result of narrow screens. */
    min-height: 200px !important;
}

/** TinyMCE v4 */

/* Ensure we can see the score meter positioned outside the editor container. */
.tox-tinymce.ally-wysiwyg-feedback-tinymce {
    overflow: visible !important;
}

/* Fullscreen feedback mode: Editor overlays instructor feedback preview area, dynamic to viewport size. */
.tox-tinymce.ally-wysiwyg-feedback-tinymce-fullscreen {
    max-height: calc(100vh - 70px) !important;
    max-width: calc(100vw - 400px) !important;
}

/* Fullscreen feedback mode: add space for the score meter in the overflow toolbar. */
.tox-tinymce.tox-fullscreen.ally-wysiwyg-feedback-tinymce .tox-toolbar__overflow {
    padding-right: 96px !important;
}

/* Fullscreen feedback mode: overlay score meter on overflow toolbar. */
.tox-tinymce.tox-fullscreen .ally-score-meter-container {
    right: 5px !important;
    top: 35px !important;
}

/** TinyMCE v3 (Moodle) */

/* Allow score meter to be positioned absolute within confines of editor space. */
.mceEditor.ally-wysiwyg-feedback-tinymce {
    display: inline-block;
    position: relative;
    width: auto !important;
}

.theme-snap .ally-score-meter-container {
    padding-bottom: 5px !important;
    padding-top: 5px !important;
    top: -40px !important;
}

/** Fullscreen: align score meter with primary toolbar. */
#mce_fullscreen_parent .ally-score-meter-container,
.theme-snap #mce_fullscreen_parent .ally-score-meter-container {
    right: 5px !important;
    top: -5px !important;
}

/** Fullscreen: ensure the score meter has enough room to the right of the toolbar1 icons. */
.mceEditor.ally-wysiwyg-feedback-tinymce #mce_fullscreen_toolbar1 {
    padding-right: 100px;
}

/* Fullscreen feedback mode: editor fills the space over the instructor feedback preview, dynamic on viewport size. */
.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen {
    height: calc(100vh - 70px) !important;
    width: calc(100vw - 400px) !important;
}

/* Editor table and content iframe should take full height. */
.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen table.mceLayout,
.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen iframe {
    height: 100% !important;
    width: 100% !important;
}

/* Editor toolbar should only take as much height as its buttons need. */
.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen table.mceLayout > .mceFirst,
.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen table.mceLayout > tbody > .mceFirst {
    height: auto !important;
}

/* Enforce editor body height considering the editor footer. */
.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen table.mceLayout > tbody {
    height: calc(100% - 60px) !important;
}

/* The content iframe row container should use all remaining height available. */
.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen table.mceLayout .mceFirst + tr,
.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen table.mceLayout .mceFirst + tr .mceIframeContainer {
    height: 100% !important;
}

.mceEditor.ally-wysiwyg-feedback-tinymce-fullscreen table.mceLayout .mceLast {
    background: #F2F2F2;
}

/* SEIZURE GUARD */

.ally-image-seizure-guard {
    background-color: #333;
    background-color: rgba(0, 0, 0, 0.8);
    position: absolute;

    /* Relative to the score indicator. This must be lower */
    z-index: 1;
}

.ally-image-seizure-guard > button {
    background-color: transparent;
    background-image: none;
    border: 0;
    box-shadow: none;
    cursor: pointer;
    display: block;
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

.ally-image-seizure-guard > button > img {
    height: 30%;

    /* Override canvas inline styles that seem to dynamically get dropped onto images */
    max-height: 100px !important;
    max-width: 100px !important;
    min-height: 36px !important;
    min-width: 36px !important;
    width: 30%;
}

.ally-accessibility-score-indicator {
    user-select: none;
}

.ally-accessibility-score-indicator .screenreader-only,
.ally-sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/** Ally 4 Web Alternative Formats */

.ally-af-launch-container {
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
    display: inline-block;
    z-index: 2147483638;
}

.ally-af-launch-container.ally-af-style-flag_small,
.ally-af-launch-container.ally-af-style-flag_large {
    position: fixed;
    right: 0;
}

.ally-af-launch-container.ally-af-style-flag_small {
    bottom: 10%;
}

.ally-af-launch-container.ally-af-style-flag_large {
    bottom: 20%;
}

.ally-af-launch-container.ally-af-style-bar_bottom {
    bottom: 0;
    display: flex;
    height: 75px;
    left: 0;
    position: fixed;
    right: 0;
}

/* Set some default settings to try and serve as a "reset" for styles we may accidentally inherit from the parent. */
.ally-af-launch-container > button {
    color: #FFF;
    cursor: pointer;
    display: block;
    font-family: "Roboto", "Fira Sans", "Segoe UI", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 0;
    margin: 0;
    padding: 0;
    position: static;
}

.ally-af-launch-container.ally-af-style-flag_small > button,
.ally-af-launch-container.ally-af-style-flag_large > button {
    background: none;
    border: solid 1px #FFF;
    border-right: none;
}

.ally-af-launch-container.ally-af-style-flag_small > button {
    padding: 15px;
}

.ally-af-launch-container.ally-af-style-flag_large > button {
    padding: 20px;
}

.ally-af-launch-container.ally-af-style-bar_bottom > button {
    background: none;
    border: solid 1px rgba(0, 0, 0, 0);
    font-size: 14px;
    margin: 15px 0 15px 90px;
    padding: 0 20px;
}

.ally-af-launch-container.ally-af-style-flag_small > button:hover,
.ally-af-launch-container.ally-af-style-flag_large > button:hover,
.ally-af-launch-container.ally-af-style-flag_small > button:focus,
.ally-af-launch-container.ally-af-style-flag_large > button:focus {
    background: #FFF;
    border-color: #CCC;
}

.ally-af-launch-container.ally-af-style-bar_bottom > button:hover,
.ally-af-launch-container.ally-af-style-bar_bottom > button:focus {
    border: solid 1px #FFF;
    border-radius: 3px;
}

.ally-af-launch-container.ally-af-style-flag_small > button > img {
    vertical-align: middle;
    width: 25px;
}

.ally-af-launch-container.ally-af-style-flag_large > button > img {
    vertical-align: top;
    width: 35px;
}

.ally-af-launch-container.ally-af-style-bar_bottom > button > img {
    left: 20px;
    position: absolute;
    top: 22px;
    width: 45px;
}

.ally-af-launch-container.ally-af-style-flag_small > button > img.ally-af-launch-icon-black,
.ally-af-launch-container.ally-af-style-flag_large > button > img.ally-af-launch-icon-black,
.ally-af-launch-container.ally-af-style-bar_bottom > button > img.ally-af-launch-icon-black {
    display: none;
}

.ally-af-launch-container.ally-af-style-flag_small > button > img.ally-af-launch-icon-white,
.ally-af-launch-container.ally-af-style-flag_large > button > img.ally-af-launch-icon-white {
    display: inline-block;
}

.ally-af-launch-container.ally-af-style-flag_small > button:hover > img.ally-af-launch-icon-black,
.ally-af-launch-container.ally-af-style-flag_large > button:hover > img.ally-af-launch-icon-black,
.ally-af-launch-container.ally-af-style-flag_small > button:focus > img.ally-af-launch-icon-black,
.ally-af-launch-container.ally-af-style-flag_large > button:focus > img.ally-af-launch-icon-black {
    display: inline-block;
}

.ally-af-launch-container.ally-af-style-flag_small > button:hover > img.ally-af-launch-icon-white,
.ally-af-launch-container.ally-af-style-flag_large > button:hover > img.ally-af-launch-icon-white,
.ally-af-launch-container.ally-af-style-flag_small > button:focus > img.ally-af-launch-icon-white,
.ally-af-launch-container.ally-af-style-flag_large > button:focus > img.ally-af-launch-icon-white {
    display: none;
}

.ally-af-launch-container.ally-af-style-flag_small > button > span,
.ally-af-launch-container.ally-af-style-flag_large > button > span {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/* Reduce the size of both flag sizes on small devices */

@media only screen and (max-width: 768px) {
    .ally-af-launch-container.ally-af-style-flag_large,
    .ally-af-launch-container.ally-af-style-flag_small {
        bottom: 5%;
    }

    .ally-af-launch-container.ally-af-style-flag_large > button > img,
    .ally-af-launch-container.ally-af-style-flag_small > button > img {
        width: 25px;
    }

    .ally-af-launch-container.ally-af-style-flag_large > button,
    .ally-af-launch-container.ally-af-style-flag_small > button {
        padding: 15px;
    }
}
