/*
 *  (c) 2000-2025 deviantART, Inc. All rights reserved.
 */
div.writer {
    border: 1px solid #ddd;
    outline: none;
    word-wrap: break-word;
}
div.writer img {
    max-width: 98%;
}
div.writer a.external {
    display: inline; /* Override body a.external, inline blocks are uneditable in IE */
}

div.writer .writer-embed {
    vertical-align: baseline;
    max-width: 100%;
    height: auto; /* IE */
    width: auto; /* IE */
}

div.writer .writer-embed-loader {
    cursor: progress;
}

div.writer .writer-deviation-iframe,
div.writer .writer-status-iframe {
    display: inline-block;
    vertical-align: bottom;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #fff;
    cursor: default;
    .box-sizing(border-box);

    iframe {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        border: 0;
    }

    div {
        position: absolute;
        width: 100%;
        height: 100%;
    }
}

div.writer .writer-deviation-lit-thumbnail {
    display: inline-block;
    margin: 0 1px; /* make sure cursor is visible */
}

div.writer .writer-deviation-lit-thumbnail span.shadow {
    padding: 0; /* override */
}

div.writer .writer-deviation-lit-thumbnail a.lit {
    display: block; /* override */
}

div.writer .generic-lit-thumb-iframe {
    width: 150px;
    height: 125px;
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1),
                0 2px 2px rgba(0,0,0,0.2);
}

textarea.writer {
    display: block;
    width: 100%;
    height: 200px;
    padding: 0 0 1em;
    .box-sizing(border-box);
    border: 1px solid #fff;
    outline: none;
    resize:none;
}

div.popup2.popup2-writer-link-editor {
    .box-sizing(border-box);
    width:170px;
    height:54px;
    background:white;
    border-top:0;
    padding:8px;
    box-shadow:0 2px 12px rgba(0,0,0,0.2);
}
div.popup2.popup2-writer-link-editor > span {
    font-weight: bold;
    text-transform: capitalize;
}
div.popup2.popup2-writer-link-editor > i {
    background: url(/minish/stash/writer/writerbar-alpha.png) -757px 0px no-repeat;
    height:13px;
    width:20px;
    display:inline-block;
}
div.popup2.popup2-writer-link-editor > input {
    width:95%;
}

body.deviantart div.writer a,
body.deviantart div.writeranywhere a,
body.stash-page div.writer a,
body.stash-page div.writeranywhere a
{
    text-decoration: none;
    color: #337287;
    font-weight: bold;

    &.external {
        font-weight: normal;
        text-decoration: underline;
        color: #3b5a4a;
    }

    &.external:after {
        font-family: 'usersymbol-icons';
        margin-left: 2px;
        font-weight: normal;
        content: "\40";
        display: inline-block;
    }
}

/* @@include cssms/lib/mixins/css3.css */

/* resize handle */
.writer-resize-handle {
    height: 6px;
    width: 6px;
    margin: -4px 0 0 -4px;
    border: 1px solid #3d3d3d;
    position:absolute;
    background-color: #f0f0f0;
    z-index:39;
}

.writer-resize-handle.nw { cursor: nw-resize; }
.writer-resize-handle.ne { cursor: ne-resize; }
.writer-resize-handle.se { cursor: se-resize; }
.writer-resize-handle.sw { cursor: sw-resize; }


.writer_imagejumper_up,  .writer_imagejumper_down {
    display: block;
    cursor: pointer;
    background-image: url(/minish/submit/stashwriter_jumpers.png);
    background-repeat: no-repeat;
    width: 35px;
    height: 32px;
}

.writer_imagejumper_up:hover {
    background-position: -35px 0px;
}

.writer_imagejumper_up.single {
    background-position: 0px -68px;
}
.writer_imagejumper_up.single:hover {
    background-position: -35px -68px;
}

.writer_imagejumper_down {
    background-position: 0px -32px;
}
.writer_imagejumper_down:hover {
    background-position: -35px -32px;
}


.writer_imagejumper_down.single {
    background-position: 0px -105px;
}
.writer_imagejumper_down.single:hover {
    background-position: -35px -105px;
}

.writer_imagedeleter {
    position: absolute;
    cursor : pointer;
    /*text-shadow : -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;*/
    background-image: url(/minish/gruzecontrol/pencil-menu-alpha.png);
    background-repeat: no-repeat;
    background-position: 0px 0px;
    width: 22px;
    height: 20px;
}
.writer_imagedeleter:hover {
    background-position: 0px -27px;
}
.writer_imagedeleter:active, .writer_imagedeleter.active {
    background-position: 0px -54px;
}


.writer-imagemenu {
    position:absolute;
    cursor:pointer;
    display:block;
    width:72px;
}
.writer-imagemenu .action-with-label {
    .box-sizing(border-box);
    position:relative;
    display:block;
    width:72px;
    height:24px;
    background:#101314; /* for darling IE8 */
    background:rgba(0,0,0,0.8);
    color:#EEE;
    text-shadow:0 1px 1px rgba(0,0,0,0.8);
    border-radius:4px;
    border:1px solid rgba(255,255,255,1);
    font:8pt 'Trebuchet MS', Trebuchet, sans-serif;
    padding:4px 3px 3px 24px;
    margin-bottom:2px;
}

.writer-imagemenu .action-with-label i {
    opacity:0.8;
    display:block;
    position:absolute;
    left:4px;
    top:3px;
    width:17px;
    height:18px;
    background: url(/minish/writer/imagecontrols.png) no-repeat;
}

.writer-imagemenu .action-with-label:hover i {
    opacity:1;
}

/* muro-ish icon */
.writer-imagemenu .action-with-label[data-action="Draw"] i,
.writer-imagemenu .action-with-label[data-action="Redraw"] i,
.writer-imagemenu .action-with-label[data-action="Image"] i {
    background-position: 0 0;
}
/* make-bigger */
.writer-imagemenu .action-with-label[data-action="Full"] i {
    background-position: 0 -42px;
}
/* make-smaller */
.writer-imagemenu .action-with-label[data-action="Thumb"] i,
.writer-imagemenu .action-with-label[data-action="Link"] i {
    background-position: 0 -21px;
}
/* XXX */
.writer-imagemenu .action-with-label[data-action="Remove"] i {
    background-position: 0 -60px;
}

.writer-imagemenu .tiny-remove {
    position: absolute;
    right: -3px;
    top: -3px;
    width: 11px;
    height: 11px;
    background: rgba(0, 0, 0, 0.8) url(/minish/writer/imagecontrols.png) no-repeat 0 -62px;
    border-radius: 3px;
    display: none;
}

.writer_imagestatus {
    position: absolute;
    cursor: wait;
}
.writer_imagestatus .message {
    position:absolute;
    background:rgba(0,0,0,.6);
    color:#EEE;
    text-shadow:0 1px 1px rgba(0,0,0,.8);
    border-radius:.5em;
    border:2px solid rgba(255,255,255,.7);
    letter-spacing:-1px;
    font:12pt 'Trebuchet MS', Trebuchet, sans-serif;
    padding:.3em 1em;
    min-width:80px;
}
.writer_imagestatus .message .positive {
    display:inline-block;
}
.writer_imagestatus .message .negative {
    color:#EE5555;
}

/* @@include cssms/lib/mixins/css3.css */

.writer-toolbar {
    display: inline-block;
}

/* stashwriter toolbar popup menus */
.stashwriter-toolbar-menu .blockmenu,
.stashwriter-subtoolbar-menu .blockmenu {
    padding: 0;
    margin: 0;
    list-style: none;
    white-space: nowrap;
}

.stashwriter-subtoolbar-menu .blockmenu strong.formtitle {
    padding: 8px 10px;
    cursor: default;
}

.stashwriter-toolbar-menu li,
.stashwriter-subtoolbar-menu li {
    padding: 0 0 0 12px;
    margin: 0;
    list-style: none;
    cursor: pointer;
}

.stashwriter-subtoolbar-menu li {
    padding: 9px 10px 8px;
}

.stashwriter-toolbar-menu li:hover,
.stashwriter-subtoolbar-menu li:hover {
    .linear-gradient(top, #518FA1, #39798D, #39798D);
}

.stashwriter-toolbar-menu li.disabled {
    cursor: default;
}

.stashwriter-toolbar-menu li.toggled-off i {
    opacity: 0.3;
}

.stashwriter-toolbar-menu.with-icons li {
    padding: 0;
}

.stashwriter-toolbar-menu.with-icons i {
    display: inline-block;
    width: 28px;
    height: 26px;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-position: 50px 0; /* make sure there's no icon by default */
}

.stashwriter-toolbar-menu li.disabled:hover {
    background: none;
    color: #B2C1BC;
}

.stashwriter-toolbar-menu .weak {
    color: #7C8879;
}

.stashwriter-toolbar-menu li:hover .weak {
    color: #B2C1BC;
}

/* file menu */
.popup2-stashwriter-file i { background-image: url(/muro/headericonset.png?2); }
.popup2-stashwriter-file .writer-toolbar-draft-new      i { background-position: -155px 5px; }
.popup2-stashwriter-file .writer-toolbar-draft-open     i { background-position:  -75px 5px; }
.popup2-stashwriter-file .writer-toolbar-draft-open-browse i { background-position:  -75px 5px; }
.popup2-stashwriter-file .writer-toolbar-draft-save     i { background-position: -115px 5px; }
.popup2-stashwriter-file .writer-toolbar-draft-autosave i { background-position: -275px 3px; }
.popup2-stashwriter-file li.writer-toolbar-draft-autosave { padding-left:1em; }

/* edit menu */
div.popup2.popup2-stashwriter-embed {
    width: 240px;
}
.popup2-stashwriter-embed form {
    line-height: normal;
}
.popup2-stashwriter-embed i { background-image: url(/minish/submit/writer-toolbar.png); }
.popup2-stashwriter-embed .writer-toolbar-embed-image   i { background-position:   2px -1px; }
.popup2-stashwriter-embed .writer-toolbar-embed-link    i { background-position: -39px -1px; }

.popup2-stashwriter-embed .writer-toolbar-toggle-markup i,
.popup2-stashwriter-embed .writer-toolbar-toggle-thumbsize i {
    background-image: url(/muro/headericonset.png?2);
    background-position: -275px 3px;
}



/* buttons */
 
div.writer-toolbar .headerButton.writertop-toolbar-undo,
div.writer-toolbar .headerButton.writertop-toolbar-redo {
    background-image: url(/minish/stash/writer/stash_writer_undoredo_sprite.png);
}
div.writer-toolbar .headerButton.writertop-toolbar-undo {
    background-position: 0 -3px;
}
div.writer-toolbar .headerButton.writertop-toolbar-redo {
    background-position: -34px -3px;
}
div.writer-toolbar .headerButton.writertop-toolbar-undo:hover {
    background-position: 0 -28px;
}
div.writer-toolbar .headerButton.writertop-toolbar-redo:hover {
    background-position: -33px -28px;
}
div.writer-toolbar .headerButton.writertop-toolbar-undo:active {
    background-position: 0 -54px;
}
div.writer-toolbar .headerButton.writertop-toolbar-redo:active {
    background-position: -33px -54px;
}
div.writer-toolbar .headerDividerRight {
    float: right;
}

div.writer-toolbar .headerMenu {
    margin-right: 5px;
    text-align: left;
    text-indent: 0px;
}

div.writer-toolbar .headerMenu:hover {
    background-position: 0px -26px;
}

div.writer-toolbar .headerMenu,
div.writer-toolbar .headerMenu b {
    background-image: url(/minish/canvasdraw/buttons/headermenu-green.png?3);
}
div.writer-toolbar .headerMenu b {
    width: 20px;
}
div.writer-toolbar div.headerMenuActive b,
div.writer-toolbar div.headerMenuActive:hover b,
div.writer-toolbar div.headerMenu:active b {
    margin-right:0;
}

div.writer-toolbar .writertop-toolbar-file,
div.writer-toolbar .writertop-toolbar-edit {
    margin-right: 10px;
}

div.writer-toolbar .writer-toolbar-embed,
div.writer-toolbar .writer-toolbar-zoom { 
    margin-left: 10px;
}

.writertop-toolbar-file,
.writertop-toolbar-edit {
    width: 42px;
}

#overhead div.default-toolbar .headerMenu.writertop-toolbar-file.error {
    border-radius: 4px;
    background: #FBFBFB;
    border: 1px solid #E58D8B;
    height: 24px;
    margin: 11px 9px 0 6px;
}
div.commentwriter-toolbar div.writer-toolbar .headerMenu.writertop-toolbar-file.error,
div.commentwriter-toolbar div.writer-toolbar .headerMenu.writertop-toolbar-file.error:hover {
    border-radius: 4px;
    background: #FBFBFB;
    border: 1px solid #E58D8B;
    margin: 10px 0 0 0;
    height: 24px;
}

#overhead div.default-toolbar .headerMenuActive.writertop-toolbar-file.error,
div.commentwriter-toolbar div.writer-toolbar .headerMenuActive.writertop-toolbar-file.error,
div.commentwriter-toolbar div.writer-toolbar .headerMenuActive.writertop-toolbar-file.error:hover {
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: #FFF;
    height: 25px;
}
#overhead div.default-toolbar .headerMenu.writertop-toolbar-file.error b,
.writer-toolbar .headerMenu.writertop-toolbar-file.error b {
    background: url(/minish/stash/writer/error-red-triangle.png) no-repeat 0px 4px;
    width: 22px;
}
div.popup2.stashwriter-toolbar-menu.error,
body.ccwriter-subframe div.popup2.stashwriter-toolbar-menu.error {
    border: 1px solid #E58D8B;
}
.writer-toolbar-draft-autosave-error {
    padding: 6px 0 0 0;
    line-height: 1em;
    white-space: normal;
}

#overhead div.default-toolbar .headerMenu.writertop-toolbar-file.autosaving b {
    background-image:none;
}

div.writer-toolbar .writertop-toolbar-undo {
    background-position: 0px -237px;
    width: 38px;
}

div.writer-toolbar .writertop-toolbar-undo {
    margin-left: 7px;
}
div.writer-toolbar .writertop-toolbar-redo {
    margin-left: 3px;
}
div.writer-toolbar .writertop-toolbar-undo,
div.writer-toolbar .writertop-toolbar-redo {
    width: 32px;
    margin-top: 10px;
}

.white.writer #overhead .default-toolbar .headerMenu {
    margin-top: 12px;
    margin-left: 7px;
}
div.commentwriter-toolbar div.writer-toolbar .headerMenu {
    margin-left:1px;
    margin-right:1px;
    margin-top:11px;
}
.white.writer #overhead .default-toolbar .headerMenu:hover,
.white.writer #overhead .default-toolbar .headerMenuActive,
.white.writer #overhead .default-toolbar .headerMenuActive:hover,
.white.writer #overhead .default-toolbar .headerMenuActive.headerMenu:hover {
    margin-top: 11px;
    margin-left: 6px;
    margin-right: 9px;
}
div.commentwriter-toolbar div.writertop-toolbar .headerMenu:hover,
div.commentwriter-toolbar div.writertop-toolbar .headerMenuActive,
div.commentwriter-toolbar div.writertop-toolbar .headerMenuActive:hover,
div.commentwriter-toolbar div.writertop-toolbar .headerMenuActive.headerMenu:hover {
    margin-left: 0px;
    margin-right: 0px;
    margin-top:10px;
}
div.writer-toolbar .writertop-toolbar-undo:active {
    background-position: 0 -289px;
}
div.writer-toolbar .writertop-toolbar-undo:hover {
    background-position: 0 -263px;
}
div.writer-toolbar .writertop-toolbar-undo-disabled {
    opacity: .3;
}

div.writer-toolbar .writertop-toolbar-redo {
    background-position: 0px -316px;
    width: 38px;
}
div.writer-toolbar .writertop-toolbar-redo:hover {
    background-position: 0px -342px;
}
div.writer-toolbar .writertop-toolbar-redo:active {
    background-position: 0px -368px;
}

div.writer-toolbar .writertop-toolbar-redo-disabled {
    opacity: .3;
}

/* modals */

.loadDraftModal {
    width: 600px;
    height: 570px;
}
.loadDraftModal .main {
    overflow-y:auto;
    width:595px;
    height:450px;
}
body.ccwriter-subframe .loadDraftModal .main {
    height:420px;
}
.loadDraftModal .navLink {
    padding-left: 15px;
}
div.modal.modal-rounded.loadDraftModal div.modal-separated {
    padding-top: 2px;
}

/* @@include cssms/lib/mixins/css3.css */

div.stashwriter-subtoolbar div.writersub-toolbar {
    position: relative;
    padding-left: 30px;
    z-index: 121;
    overflow: hidden;
}
div.stashwriter-subtoolbar .subToolbarButton,
div.stashwriter-subtoolbar .writer-toolbar-separator {
    float: left;
    text-indent: -1000px;
    margin: 5px 0 0 2px;
    background-image: url(/minish/stash/writer/writerbar-alpha.png);
    background-repeat: no-repeat;
    height: 26px;
    line-height: 26px;
    width: 28px;
    background-color:#f5f5f5;
    border:1px solid #f5f5f5;
    cursor: default;
}
div.stashwriter-subtoolbar .writer-toolbar-separator {
    background-position: -510px 2px;
    width: 20px;
    top: 0;
}

div.stashwriter-subtoolbar .subToolbarButton:hover {
    box-shadow:inset 0 1px 0 white;
    border: 1px solid #d3d3d3;
    border-radius: 6px;
}
div.stashwriter-subtoolbar .subToolbarButton:active,
div.stashwriter-subtoolbar .subToolbarButton.active {
    background-color: #e6e6e6;
    box-shadow:inset 0 0 4px rgba(0,0,0,0.2);
    border: 1px solid #d3d3d3;
    border-radius: 6px;
}

div.stashwriter-subtoolbar .writersub-toolbar-undo {
    background-position: 9px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-redo {
    background-position: -31px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-bold {
    background-position: -71px 5px;  
}
div.stashwriter-subtoolbar .writersub-toolbar-bold span { 
    text-indent: -10000px;
}
div.stashwriter-subtoolbar .writersub-toolbar-italic {
    background-position: -111px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-underline {
    background-position: -151px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-headings,
div.stashwriter-subtoolbar .writersub-toolbar-headings.headerMenuActive,
div.stashwriter-subtoolbar .writersub-toolbar-headings.headerMenuActive:hover {
    background-position: -191px 5px;
    width: 44px;
}
div.stashwriter-subtoolbar .writersub-toolbar-ul {
    background-position: -233px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-ol {
    background-position: -273px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-blockquote {
    background-position: -313px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-alignl {
    background-position: -351px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-alignc {
    background-position: -391px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-alignr {
    background-position: -431px 5px;
}
div.stashwriter-subtoolbar .writersub-toolbar-link,
div.stashwriter-subtoolbar .writersub-toolbar-link.headerMenuActive,
div.stashwriter-subtoolbar .writersub-toolbar-link.headerMenuActive:hover {
    background-position: -752px 5px;
    text-indent:0;
    width: 74px;
}
div.stashwriter-subtoolbar .writersub-toolbar-link span {
    margin:0 0 0 28px;
}

div.stashwriter-subtoolbar .writersub-toolbar-embed2,
div.stashwriter-subtoolbar .writersub-toolbar-embed2.headerMenuActive,
div.stashwriter-subtoolbar .writersub-toolbar-embed2.headerMenuActive:hover {
    background-position: -712px 5px;
    width: 44px;
}

div.stashwriter-subtoolbar .writersub-toolbar-zoom {
    background: none;
    text-indent: 0;
    width: 67px;
}
div.stashwriter-subtoolbar .writersub-toolbar-zoom span {
    margin:0 0 0 8px;
}

div.stashwriter-subtoolbar .writersub-toolbar-zoom b,
div.stashwriter-subtoolbar .writersub-toolbar-link b,
div.stashwriter-subtoolbar .writersub-toolbar-embed2 b,
div.stashwriter-subtoolbar .writersub-toolbar-headings b,
div.stashwriter-subtoolbar .writersub-toolbar div.headerMenuActive b,
div.stashwriter-subtoolbar .writersub-toolbar div.headerMenuActive:hover b,
div.stashwriter-subtoolbar .writersub-toolbar div.headerMenu:active b {
    background: url(/minish/stash/writer/writerbar-alpha.png) -475px 5px no-repeat;
    height: 27px;
    line-height: 26px;
    width: 12px;
    margin-right:5px;
    display:block;
    float:right;
}

div.stashwriter-subtoolbar .writersub-toolbar div.headerMenuActive,
div.stashwriter-subtoolbar .writersub-toolbar div.headerMenuActive:hover,
div.stashwriter-subtoolbar .writersub-toolbar div.headerMenu:active {
    height:28px;
    border: 1px solid #d3d3d3;
    border-bottom:0px solid black;
    border-radius: 0px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    background-color:white;
    z-index:120;
}

/* popups */
div.stashwriter-subtoolbar-menu {
    background:#ffffff;
    border:1px solid #d3d3d3;
    border-top-right-radius:6px;
    border-bottom-left-radius:6px;
    border-bottom-right-radius:6px;
    width:160px;
    height: auto;
    box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1);
    z-index:40;
    font-size:0.92em;
    padding:5px 0;
}
.stashwriter-subtoolbar-menu li:hover {
    color: white;
}

.stashwriter-subtoolbar-menu li.h1 {
    font: bold 24px Trebuchet MS, sans-serif;
}
.stashwriter-subtoolbar-menu li.h2 {
    font: bold 20px Trebuchet MS, sans-serif;
}
.stashwriter-subtoolbar-menu li.h3 {
    font: bold 17px Trebuchet MS, sans-serif;
}
.stashwriter-subtoolbar-menu li.h4 {
    font: bold 13px Verdana, sans-serif;
}
.stashwriter-subtoolbar-menu li.h5 {
    font: bold 11px Verdana, sans-serif;
}

.stashwriter-subtoolbar-menu div.blockmenu form {
    margin: 5px 10px 25px;
}

.stashwriter-subtoolbar-menu div.blockmenu form input.text {
    width:136px;
}

.stashwriter-subtoolbar-menu div.blockmenu form input.smbutton {
    float:right;
}

.stashwriter-subtoolbar-menu div.blockmenu form label.error {
    font-size:0.8em;
    color:red;
    display:none;
}

.popup2-writer-embed .blockmenu {
    background:#E8ECE6;
    overflow:hidden;
    float:left;
    /*overflow:hidden;*/
    white-space:nowrap;
    font-size:8.25pt;
    width: 100%; 
}

/* @@include cssms/lib/mixins/css3.css */
.dautocomplete {
    position:absolute;
    background:#f4f4f4;
    width: auto;
    min-width: 200px;
    box-shadow:0 1px 4px rgba(0,0,0,0.35);
    border:1px solid #ccc;
    border-radius: 0px;
    z-index:1000;
    max-height:300px;
    overflow:auto;
    cursor: pointer;

    > .item, > .noresults, > .loading {
        padding:0.7em;
        border-top:0px solid #ccc;
        position:relative;
        min-height:1.8em;
        overflow:hidden;
        font:9pt Verdana,sans-serif;
        cursor:pointer;
    }
    > .item span.username-with-symbol {
        display:inline-block;
        margin-top: 3px;
    }
    > .loading {
        opacity:0.5;
    }
    > .item img {
        float:left;
        margin-right:0.5em;
    }
    > .item:first-child {
        border:none;
    }
    > .item.selected {
        background:#d5e8f7;
    }
    > h4.heading {
        padding:0.55em;
        min-height:1.8em;
        font:bold 11pt Verdana,sans-serif;
        overflow:hidden;
        cursor:default;
    }
}

.dautocomplete.dautocomplete-tags {
    > .item, > .noresults, > .loading {
        min-height:1em;
        padding:0.5em;
    }
    > .item img {
        display:none;
    }
    > .loading:not(.noresults) {
        display:none;
    }
}

body > div.popup2-dautocomplete {
    background:none;
    border-top:none;
    height:2em;
    z-index:201; /* this needs to appear on top of some modals, which appear at z-index 200 */
}
body.ccwriter-subframe div.popup2-dautocomplete {
    z-index:150;
}

/* Helper mixins */
.colormixin(@color:false) when not (@color=false) {color: @color;}
.bgcolormixin(@color:false) when not (@color=false) {background-color: @color;}
.bordercolormixin(@color:false) when not (@color=false) {border-color: @color;}

.widthmixin(@width:false) when not (@width=false) {width: @width;}
.minwidthmixin(@width:false) when not (@width=false) {min-width: @width;}
.maxwidthmixin(@width:false) when not (@width=false) {max-width: @width;}

.heightmixin(@height:false) when not (@height=false) {height: @height;}
.minheightmixin(@height:false) when not (@height=false) {min-height: @height;}
.maxheightmixin(@height:false) when not (@height=false) {max-height: @height;}

/* Helper variable for retina media queries */
@retina : ~"(-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (min-device-pixel-ratio: 2), (min-resolution: 2dppx), (min-resolution: 192dpi)";

/*
 * helper function for .linear-gradient
 * @encode - string of svg xml
 */
.base64DataUriBackground (@encode, @type: ~"image/svg+xml") {
    @dataUriPrefix: ~"url(data:@{type};base64,";
    @dataUriSuffix: ~")";
 
    // because our lessc doesn't give access to btoa()
    // we have to make our own
    @b64DataUri: ~`(function(a,b,c){function e(a){a=a.replace(/\r\n/g,'\n');var b='';for(var c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128){b+=String.fromCharCode(d)}else if(d>127&&d<2048){b+=String.fromCharCode(d>>6|192);b+=String.fromCharCode(d&63|128)}else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128);b+=String.fromCharCode(d&63|128)}}return b}function f(a){var b='';var c,f,g,h,i,j,l;var m=0;a=e(a);while(m<a.length){c=a.charCodeAt(m++);f=a.charCodeAt(m++);g=a.charCodeAt(m++);h=c>>2;i=(c&3)<<4|f>>4;j=(f&15)<<2|g>>6;l=g&63;if(isNaN(f)){j=l=64}else if(isNaN(g)){l=64}b=b+d.charAt(h)+d.charAt(i)+d.charAt(j)+d.charAt(l)}return b}var d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';return a+f(b)+c})('@{dataUriPrefix}','@{encode}','@{dataUriSuffix}')`;
 
    background: @b64DataUri;
}

/*
 * @angle - 1st param (eg 45deg, top, to left bottom)
 * @legacy_color - Color if no gradient at all is available
 * @ie_gradient_type - 0 (vertical) or 1 (horizontal).  If anybody wants to write a filter to deduce this 
 *                     angle, have at it
 */
.linear-gradient(@start_color, @end_color) {
    .linear-gradient(top, @start_color, @end_color, @start_color);
}
.linear-gradient(@angle, @start_color, @end_color) {
    .linear-gradient(@angle, @start_color, @end_color, @start_color);
}
.linear-gradient(@angle, @start_color, @end_color, @legacy_color: @start_color, @ie_gradient_type: 0) {
    @svg: ~'<?xml version="1.0" ?><svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><linearGradient id="grad-ucgg-generated" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="@{start_color}" stop-opacity="1"/><stop offset="100%" stop-color="@{end_color}" stop-opacity="1"/></linearGradient><rect x="0" y="0" width="1" height="1" fill="url(#grad-ucgg-generated)" /></svg>';
 
    
    /* base background */
    background: @legacy_color;
    
    /* IE9 you so special */
    .ie.eq9 & {
        .base64DataUriBackground(@svg);
    }
    /* IE8 is the bad kind of special */
    .ie.lt9 & {
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{start_color}', endColorstr='@{end_color}',GradientType=@ie_gradient_type );
    }
    
    /* hooray modern browsers */
    background: -webkit-linear-gradient(@angle, @start_color, @end_color);
    background: -moz-linear-gradient(@angle, @start_color, @end_color);
    background: linear-gradient(@angle, @start_color, @end_color);
}

.linear-gradient-stops(@angle, @legacy_start_color, @legacy_end_color, @legacy_color, @rest...) 
{
    @svg: ~'<?xml version="1.0" ?><svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><linearGradient id="grad-ucgg-generated" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="@{legacy_start_color}" stop-opacity="1"/><stop offset="100%" stop-color="@{legacy_end_color}" stop-opacity="1"/></linearGradient><rect x="0" y="0" width="1" height="1" fill="url(#grad-ucgg-generated)" /></svg>';
 
    
    /* base background */
    background: @legacy_color;
    
    /* IE9 you so special */
    .ie.eq9 & {
        .base64DataUriBackground(@svg);
    }
    /* IE8 is the bad kind of special */
    .ie.lt9 & {
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{legacy_start_color}', endColorstr='@{legacy_end_color}',GradientType=0 );
    }
    
    /* hooray modern browsers */
    background: -webkit-linear-gradient(@angle, @rest);
    background: -moz-linear-gradient(@angle, @rest);
    background: linear-gradient(@angle, @rest);
}

/*
 * This is not compatible with IE8, don't use it if you have to support old IE
 * 
 * @lhs - Left hand side (height, width, whatever)
 * @rhs - Right hand side, whatever your calculation is.  You probably need a ~
 *
 * Example: .calc(height, ~"100% - 50px")
 *
 * Note, using a guard because less doesn't seem to like using a variable for lhs
 * Annoying, but don't know what else to do
 *
 * http://caniuse.com/calc
 */
.calc(@lhs, @rhs) when (@lhs = width) {
    width: -webkit-calc(@rhs);
    width: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = height) {
    height: -webkit-calc(@rhs);
    height: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = left) {
    left: -webkit-calc(@rhs);
    left: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = right) {
    right: -webkit-calc(@rhs);
    right: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = top) {
    top: -webkit-calc(@rhs);
    top: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = bottom) {
    bottom: -webkit-calc(@rhs);
    bottom: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = min-width) {
    min-width: -webkit-calc(@rhs);
    min-width: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = max-width) {
    max-width: -webkit-calc(@rhs);
    max-width: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = min-height) {
    min-height: -webkit-calc(@rhs);
    min-height: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = max-height) {
    max-height: -webkit-calc(@rhs);
    max-height: calc(@rhs);
}


/*
 * Not compatible with IE8 or IE9 (nothing breaks, they just don't get transitions)
 */
.transition(@arg) {
    -moz-transition: @arg;
    -webkit-transition: @arg;
    transition: @arg;
}

.transition(@transition, @duration, @timingFunction: ease-in-out ) when (@transition = transform) {
    -webkit-transition: -webkit-transform @duration @timingFunction;
    -moz-transition: -moz-transform @duration @timingFunction;
    -ms-transition: -ms-transform @duration @timingFunction;
    transition: transform @duration @timingFunction;
}

.animation (@name, @duration: 300ms, @delay: 0, @ease: ease, @iterationCount: 1) {
    -webkit-animation: @name @duration @delay @ease;
    -moz-animation:    @name @duration @delay @ease;
    -ms-animation:     @name @duration @delay @ease;
    animation-iteration-count: @iterationCount;
    -webkit-animation-iteration-count: @iterationCount;
    -moz-animation-iteration-count: @iterationCount;
}

.transition-delay(@arg) {
    -webkit-transition-delay: @arg;
    -moz-transition-delay: @arg;
    -o-transition-delay: @arg;
    transition-delay: @arg;
}

/*
 * Not supported in <=IE8
 */
.transform(@arg) {
    -ms-transform: @arg;
    -webkit-transform: @arg;
    transform: @arg;
}

.transform-scale(@arg) {
    -ms-zoom: @arg;
    -ms-transform: scale(@arg);
    -webkit-transform: scale(@arg);
    transform: scale(@arg);
}

.transform-origin(@arg) {
    -ms-transform-origin: @arg;
    -moz-transform-origin: @arg;
    -webkit-transform-origin: @arg;
    transform-origin: @arg;
}

.box-sizing(@arg) {
    -moz-box-sizing: @arg;
    -webkit-box-sizing: @arg;
    box-sizing: @arg;
}

.filter(@arg) {
    -ms-filter: @arg;
    -moz-filter: @arg;
    -webkit-filter: @arg;
    filter: @arg;
}

.user-select(@arg) {
    -ms-user-select: @arg;
    -moz-user-select: @arg;
    -webkit-user-select: @arg;
    user-select: @arg;
}

.backface-visibility(@arg) {
    -webkit-backface-visibility: @arg;
    backface-visibility: @arg;
}

.perspective(@arg) {
    -webkit-perspective: @arg;
    perspective: @arg;
}

.cursor-zoom-in(@arg) {
    cursor: @arg;
    cursor: -webkit-zoom-in;
    cursor: -moz-zoom-in;
}

.cursor-zoom-out(@arg) {
    cursor: @arg;
    cursor: -webkit-zoom-out;
    cursor: -moz-zoom-out;
}

.appearance(@arg) {
    -webkit-appearance: @arg;
    -moz-appearance: @arg;
}

.text-size-adjust(@arg) {
    -webkit-text-size-adjust: @arg;
    -moz-text-size-adjust: @arg;
    -ms-text-size-adjust: @arg;
}

/* 
 *  Make something spin for infinite time, one rotation per @interval 
 *  example: .spin(3000ms)
*/
.spin(@interval) {
    -webkit-animation-name: spin;
    -webkit-animation-duration: @interval;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;
    -moz-animation-name: spin;
    -moz-animation-duration: @interval;
    -moz-animation-iteration-count: infinite;
    -moz-animation-timing-function: linear;
    -ms-animation-name: spin;
    -ms-animation-duration: @interval;
    -ms-animation-iteration-count: infinite;
    -ms-animation-timing-function: linear;
    animation-name: spin;
    animation-duration: @interval;
    animation-iteration-count: infinite;
    animation-timing-function: linear;

    @-ms-keyframes spin {
        from { -ms-transform: rotate(0deg); }
        to { -ms-transform: rotate(360deg); }
    }
    @-moz-keyframes spin {
        from { -moz-transform: rotate(0deg); }
        to { -moz-transform: rotate(360deg); }
    }
    @-webkit-keyframes spin {
        from { -webkit-transform: rotate(0deg); }
        to { -webkit-transform: rotate(360deg); }
    }
    @keyframes spin {
        from { transform:rotate(0deg); }
        to { transform:rotate(360deg); }
    }
}

/*
 * CSS3 multi-column layout.
 * Won't do anything for IE8 or 9.
 */
.column-count(@arg) {
    -moz-column-count: @arg;
    -webkit-column-count: @arg;
    column-count: @arg;
}
.column-width(@arg) {
    -moz-column-width: @arg;
    -webkit-column-width: @arg;
    column-width: @arg;
}
.column-gap(@arg) {
    -moz-column-gap: @arg;
    -webkit-column-gap: @arg;
    column-gap: @arg;
}
.column-rule(@arg) {
    -moz-column-rule: @arg;
    -webkit-column-rule: @arg;
    column-rule: @arg;
}

/*
 * Input placeholder text
 */
.placeholder-font-style(@style){
    &::-webkit-input-placeholder {
        font-style: @style;
    }
    &:-moz-placeholder {
        font-style: @style;
    }
    &::-moz-placeholder {
        font-style: @style;
    }
    &:-ms-input-placeholder {
        font-style: @style;
    }
}
.placeholder-color(@color: false, @bgcolor: false, @bordercolor: false){
    &::-webkit-input-placeholder {
        .colormixin(@color);
        .bgcolormixin(@bgcolor);
        .bordercolormixin(@bordercolor);
    }
    &:-moz-placeholder {
        .colormixin(@color);
        .bgcolormixin(@bgcolor);
        .bordercolormixin(@bordercolor);
    }
    &::-moz-placeholder {
        .colormixin(@color);
        .bgcolormixin(@bgcolor);
        .bordercolormixin(@bordercolor);
    }
    &:-ms-input-placeholder {
        .colormixin(@color);
        .bgcolormixin(@bgcolor);
        .bordercolormixin(@bordercolor);
    }
}

/* Full-screen mixin */
.full-screen-width(@width: false, @minwidth: false, @maxwidth: false) {
    &:-webkit-full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
    &:-moz-full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
    &:-ms-full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
    &:-o-full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
    &:full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
}
.full-screen-height(@height: false, @minheight: false, @maxheight: false) {
    &:-webkit-full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
    &:-moz-full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
    &:-ms-full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
    &:-o-full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
    &:full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
}

/* Text hyphenation */
.hyphenate(@style:auto) {
    -webkit-hyphens:@style;
       -moz-hyphens:@style;
        -ms-hyphens:@style;
            hyphens:@style;
}

.clearfix() {
    zoom:1;
    &:before, &:after{ 
        content:""; 
        display:table; 
    }
    &:after{ 
        clear: both; 
    }
}

.font-smoothing(@value: antialiased) when(@value = antialiased) {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.font-smoothing(@value) when (@value = subpixel) {
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

.font-default(@font-size: 14px, @line-height: 1.2, @font-weight: 300) {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: @font-size;
    line-height: @line-height;
    font-weight: @font-weight;
}

.font-face-calibre() {
    @font-face {
    font-family: 'Calibre-Bold';
        src: url('//st.deviantart.net/fonts/calibre-bold.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
    }
    @font-face {
    font-family: 'Calibre-Semibold';
        src: url('//st.deviantart.net/fonts/calibre-semibold.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
    }

    @font-face {
    font-family: 'Calibre-Light';
        src: url('//st.deviantart.net/fonts/calibre-light.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
    }
}

.font-heading-bold(@font-size: 40px, @line-height: 1, @font-weight: 300) {
    font-family: 'Calibre-Bold';
    line-height: @line-height;
    font-weight: @font-weight;
    font-size: @font-size;
}

.flexbox() {
    /* order is important here */
    display: -webkit-box;      /* OLD - iOS <6, Safari 3.1-6 */
    display: -moz-box;         /* OLD - Firefox <19 */
    display: -ms-flexbox;      /* TWEENER - IE 10 */
    display: -webkit-flex;     /* NEW - Chrome */
    display: flex;             /* NEW, Opera 12.1, Firefox >20 */
}

.flex() {
    .flexbox();

    /* but not here */
    flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    flex-direction: row;
    -webkit-flex-direction:row;
    -moz-flex-direction:row;
    justify-content: flex-start;
    -webkit-justify-content:flex-start;
    -moz-justify-content:flex-start;
}
.flex-sizing(@size:1) {
    flex-grow: @size;
    -ms-flex-grow: @size;
    -moz-flex-grow: @size;
    -webkit-flex-grow:@size;
    flex-shrink: @size;
    -ms-flex-shrink: @size;
    -moz-flex-shrink: @size;
    -webkit-flex-shrink: @size;
}
.flex-center() {
    -webkit-box-pack: center; /* OLD - iOS <6, Safari 3.1-6 */
    -webkit-box-align: center;
    -moz-box-pack: center; /* OLD - Firefox <19 */
    -moz-box-align: center;
    -ms-flex-pack: center; /* TWEENER - IE 10 */
    -ms-flex-align: center;
    -webkit-justify-content: center; /* NEW - Chrome, Safari */
    -webkit-align-items: center;
    justify-content: center; /* NEW, Opera 12.1, Firefox >20 */
    align-items: center; 
}

.flexbox-inline() {
    display: -ms-inline-flex;
    display: -webkit-inline-flex;
    display: inline-flex;
}
.flex-direction(@value: row) {
    -webkit-flex-direction: @value;
    -ms-flex-direction: @value;
    flex-direction: @value;
}
.flex-grow(@value: 0) {
    -webkit-flex-grow: @value;
    -ms-flex-grow: @value;
    flex-grow: @value;
}
.flex-shrink(@value: 1) {
    -webkit-flex-shrink: @value;
    -ms-flex-shrink: @value;
    flex-shrink: @value;
}
.flex-justify(@value: flex-start) {
    -webkit-justify-content: @value;
    -ms-justify-content: @value;
    justify-content: @value;
}
.flex-align(@value: stretch) {
    -webkit-align-items: @value;
    -ms-align-items: @value;
    align-items: @value;
}
.flex-align-self(@value: auto) {
    -webkit-align-self: @value;
    -ms-align-self: @value;
    align-self: @value;
}
.flex-wrap(@value: wrap) {
    -webkit-flex-wrap: @value;
    -ms-flex-wrap: @value;
    flex-wrap: @value;
}
.fit(@margin:0) {
    position: absolute;
    top: @margin;
    right: @margin;
    bottom: @margin;
    left: @margin;
}

.fit-fixed(@margin:0) {
    position: fixed;
    top: @margin;
    right: @margin;
    bottom: @margin;
    left: @margin;
}

.transition-cubic-bezier(@property: all, @duration: 0.2s) {
    .transition(@property @duration cubic-bezier(0, 0, 0.58, 1));
}

/*
 * Push lately to have greyscale interfaces.
 * UI likes to think in terms of % grey, so they make mocks with
 * rgba(0,0,0, .74) for 74% grey.
 * This style uses more css room, requires more processing cycles from the browser's paint, and is dangerous
 * if underlying element is ever changed to something other than white.
 *
 * Now you can just do .foo { .grey(74%); color:@grey; }
 */

.grey(@percentage) {
    @grey: darken(#fff, 100% - @percentage);
}


/* Old brand colors */
.brandcolors() {
    @primary-green: #0FCC47;
    @primary-teal: #41CFC7;
    @primary-orange: #F75908;
    @primary-magenta: #ED145A;
    @primary-lightgreen: #BDD023;
    @primary-darkgreen: #026D20;

    @grey1: #111;
    @grey2: #242626;
    @grey3: #2F3131;
    @grey4: #323232;
    @grey5: #363636;
    @grey6: #474747;
    @grey7: #555;
    @grey8: #575757;
    @grey9: #666;
    @grey10: #6F6F6F;
    @grey11: #727272;
    @grey12: #828282;
    @grey13: #999;
    @grey14: #909090;
    @grey15: #CBCBCB;
    @pale-grey: #F2F2F2;

    @black-alpha1: rgba(0,0,0,0.5);
    @black-alpha2: rgba(0,0,0,0.2);

    @white-alpha1: rgba(0,0,0,0.8);
    @white-alpha2: rgba(0,0,0,0.5);
    @white-alpha3: rgba(0,0,0,0.3);
    @white-alpha4: rgba(0,0,0,0.2);
    @white-alpha5: rgba(0,0,0,0.1);
    @white-alpha6: rgba(0,0,0,0.07);

    @list-level-0: #19252C;
    @list-level-1: #273943;
    @list-level-2: #324855;
    @list-level-3: #455C69;
}

/* New brand colors */
.11-14-brandcolors() {
    /* Used by the header */
    @brand-green: #05CC47;
    @header-green: #475C4D;
    @dark-header-green: #46584A;
    @border-green: #38463B;
    @subheader-green: #3D4F42;
    @submit-green: #5FAC75;
    @menu-grey: #313836;
    @hover-blue: #508FA3;

    /* Colors from the brand guidelines */

    @black: #000;
    @grey1: #181A1B;
    @grey2: #4F5254;
    @grey3: #7D8080;
    @grey4: #F2F2F2;
    @white: #FFF;
    @darker-grey: #181A1B;
    @pale-grey: #F2F2F2;


    @blue1: #1F3833;
    @blue2: #36807A;
    @blue3: #40CFC7;
    @blue4: #D4F5F2;

    @green1: #1F3626;
    @green2: #42704F;
    @green3: #4DC47D;
    @green4: #D4F5DE;

    @orange: #F7590A;


    @core-access-icon: #FFB35C;
    @core-plus-icon: #FF815F;
    @core-pro-icon: #E776FF;
    @core-pro-plus-icon: #FF94B4;
    @core-max-icon: #7579FF;


    @accent-orange: darken(@orange, 10%);
}


