// This file adds icons to RC+ skins only (body class .xskin)
// It does not apply to Elastic itself.

@import "_icons";

.xskin {
    #taskmenu a {
        &.mail:before { @include icon($mail); }
        &.contacts:before { @include icon($user); }
        &.options:before { @include icon($wrench); }
        &.help:before { @include icon($help); }
        &.logout:before { @include icon($logout); }
        &.about:before { @include icon($information); }
        &.refresh:before { @include icon($refresh); }
        &.compose:before { @include icon($create); }
        &.calendar:before { @include icon($calendar); }
        &.tasklist:before { @include icon($list); }
        &.files:before { @include icon($textFile); }
        &.notes:before { @include icon($textFile); }
    }

    .menu a {
        &.reply:before { @include icon($reply); }
        &.reply-all:before { @include icon($replyAll); }
        &.forward:before { @include icon($forward); }
        &.delete:before { @include icon($trash); }
        &.markmessage:before { @include icon($tag); }
        &.more:before { @include icon($more); }
        &.read:before { @include icon($envelopeOpen); }
        &.unread:before,
        &.expand.unread:before,
        &.select.unread:before{ @include icon($envelopeClosed); }
        &.flag:before { @include icon($flag); }
        &.unflag:before { @include icon($flagEmpty); }
        &.dropdown:before { @include icon($chevronDown); }
        &.options:before { @include icon($wrench); }
        &.settings:before { @include icon($gear); }
        &.create:before { @include icon($create); }
        &.move:before { @include icon($move); }
        &.purge:before { @include icon($eraser); }
        &.print:before { @include icon($print); }
        &.search:before { @include icon($search); }
        &.folders:before { @include icon($folder); }
        &.upload:before,
        &.import:before { @include icon($import); }
        &.download:before,
        &.export:before { @include icon($export); }
        &.compose:before { @include icon($create); }
        &.archive:before { @include icon($archive); }
        &.junk:before { @include icon($junk); }
        &.expunge:before { @include icon($compress); }
        &.enigma:before,
        &.encrypt:before { @include icon($lock); }
        &.firstpage:before { @include icon($firstPage); }
        &.prev:before { @include icon($prevPage); }
        &.next:before { @include icon($nextPage); }
        &.prevpage:before { @include icon($prevPage); }
        &.nextpage:before { @include icon($nextPage); }
        &.lastpage:before { @include icon($lastPage); }
        &.send:before { @include icon($send); }
        &.send.schedule:before { @include icon($emailSchedule); }
        &.scheduled:before { @include icon($scheduleList); }
        &.back:before { @include icon($arrowBack); }
        &.closewin:before { @include icon($times); }
        &.save:before { @include icon($save); }
        &.vcard:before,
        &.attach:before { @include icon($attachment); }
        &.spellcheck:before { @include icon($spellcheck); }
        &.signature:before { @include icon($signature); }
        &.responses:before { @include icon($bookmark); }
        &.select:before { @include icon($checkSquare); }
        &.threads:before { @include icon($speechBubble); }
        &.actions:before { @include icon($gear); }
        &.refresh:before { @include icon($refresh); }
        &.addto:before { @include icon($addUser); }
        &.addcc:before { @include icon($addUser); }
        &.addbcc:before { @include icon($addUser); }
        &.addressbook:before { @include icon($addressBook); }
        &.expand:before { @include icon($caretDown); }
        &.collapse:before { @include icon($caretUp); }
        &.submit:before { @include icon($check); }
        &.edit:before { @include icon($edit); }
        &.qrcode:before { @include icon($qrcode); }
        &.properties:before { @include icon($textFile); }
        &.zoomin:before { @include icon($zoomIn); }
        &.zoomout:before { @include icon($zoomOut); }
        &.rotate:before { @include icon($refresh); }
        &.markasjunk2:before { @include icon($junk); }
        &.markasjunk2Sel:before { @include icon($junk); }
        &.markasnotjunk2:before { @include icon($notjunk); }
        &#tb_label_popuplink:before { @include icon($labelDots); }
        &.source:before { @include icon($code); }
        &.copy:before { @include icon($copy); }
        &.extwin:before { @include icon($newWindow); }
        &.selection:before { @include icon($checkSquare, true); }
        &.select.all:before { @include icon($gridSmall); }
        &.select.none:before { @include icon($times); }
        &.select.page:before { @include icon($bars); }
        &.select.flagged:before { @include icon($flag); }
        &.select.unread:before { @include icon($envelopeClosed); }
        &.select.invert:before { @include icon($circleEmpty); }
        &.recipient:before { @include icon($envelopeClosed); }
    }

    .toolbarmenu li {
        a.print:before { @include icon($print); }
        a.move:before { @include icon($move); }
        a.purge:before { @include icon($trash); }
        a.download:before { @include icon($download); }
        a.create:before { @include icon($create); }
        a.edit:before { @include icon($edit); }
        a.edit.asnew:before { @include icon($edit); }
        a.rename:before { @include icon($edit); }
        a.filterlink:before { @include icon($filter); }
        a.reply.list:before,
        a.reply.all:before { @include icon($replyAll); }
        a.forward:before,
        a.forward.bounce:before,
        a.forward.attachment:before,
        a.forward.inline:before { @include icon($forward); }
        a.download.mbox:before,
        a.download.eml:before,
        a.download.maildir:before { @include icon($download); }
        a.export.selection:before,
        a.export.all:before { @include icon($download); }
        a.expand.all:before,
        a.expand.unread:before,
        a.expand.none:before { @include icon($speechBubble); }
        a.search:before { @include icon($search); }
        a.delete:before { @include icon($trash); }
        a.import:before { @include icon($import); }
        a.settings:before { @include icon($wrench); }
        a.insertresponse:before { @include icon($speechBubble); }
        a.compose:before { @include icon($create); }
        a.addressbook:before { @include icon($user); }
        a.status:before { @include icon($lightbulb); }
        a.remove:before { @include icon($times); }
        a.showurl:before { @include icon($link); }
        a.qrcode:before { @include icon($qrcode); }
        a.assigngroup:before { @include icon($addUser); }
        a.removegroup:before { @include icon($removeUser); }
        a.vcard:before { @include icon($attachment); }
        a.encrypt:before { @include icon($lock); }
        a.encrypt.sign:before { @include icon($lock); }
    }

    #message-header {
        .subject a.extwin:before { @include icon($newWindow); }
        .short-header div.header-links a {
            &.envelope:before { @include icon($envelopeClosed); }
            &.html:before { @include icon($code); }
            &.plain:before { @include icon($bars); }
            &.zipdownload:before { @include icon($download); }
        }
    }

    .toolbar a.button.search:before { @include icon($search); }

    .header a {
        &.refresh:before { @include icon($refresh); }
        &.sidebar-menu,
        &.toolbar-list-button {
            &:before { @include icon($verticalMenu); }
        }
    }

    .messagelist {
        tr.thread td.threads div:before { @include icon($chevronRight); }
        tr.thread.expanded td.threads div:before  { @include icon($chevronDown); }
        //td.subject span.msgicon.status:before  { @include icon($circleEmpty); }
        //td.subject span.msgicon.status.unread:before  { @include icon($star); }
        td.subject span.msgicon.status.unreadchildren:before  { @include icon($star); }
        td.subject span.msgicon.status.replied:before  { @include icon($reply); }
        td.subject span.msgicon.status.forwarded:before  { @include icon($forward); }
        td.subject span.msgicon.status.replied.forwarded:before  { @include icon($repliedForwarded); }
        tr.deleted td.subject span.msgicon.status:before  { @include icon($forbidden); }

        span.attachment span {
            &:before { @include icon($attachment); }
            &.report:before { @include icon($textFile); }
            &.encrypted:before { @include icon($lock); }
            &.vcard:before { @include icon($user); }
        }

        span.flagged:before { @include icon($flag); }
        tr:hover span.unflagged:before { @include icon($flag); }
    }

    .folderlist li a:before,
    .listing.iconized li a:before,
    .listing.iconized tr td:before {
        margin-top: 1px;
    }

    .settings-default-icon li>a:before,
    .settings-default-icon tr>td.section::before {
        @include icon($gear);
    }

    .input-group .icon {
        &.user:before { @include icon($user); }
        &.pass:before { @include icon($lock); }
        &.host:before { @include icon($home); }
        &.cancel:before { @include icon($times); }
        &.delete:before { @include icon($trash); }
        &.edit:before { @include icon($edit); }
        &.add:before { @include icon($plus); }
        &.add.recipient:before { @include icon($users); }
        &.search:before { @include icon($search); }
        &.filter:before { @include icon($filter); }
        &.key:before { @include icon($lock); }
    }

    .contactlist {
        td.contact:before { @include icon($user); }
        td.contactgroup:before { @include icon($users); }

        li {
            a.addressbook::before { @include icon($addressBook); }
            a.contactgroup::before { @include icon($users); }
        }
    }

    .searchbar {
        form:before { @include icon($search); position: relative; top: 3px; }
        a.unread:before { @include icon($envelopeClosed); }
        a.options:before { @include icon($chevronDown); }
        &.open a.options:before { @include icon($chevronUp); }
        a.reset:before { @include icon($times); }
    }

    ul.treelist li div.treetoggle {
        &:before { @include icon($chevronRight); }
        &.expanded:before { @include icon($chevronDown); }
    }

    .folderlist li {
        a:before { @include icon($folder); }
        &.inbox > a:before { @include icon($inbox); }
        &.trash a:before { @include icon($trash); }
        &.trash.empty > a:before { @include icon($trash); }
        &.drafts a:before { @include icon($edit); }
        &.sent a:before { @include icon($send); }
        &.junk a:before { @include icon($junk); }
        &.archive > a:before { @include icon($archive); }
        &.type-event > a:before { @include icon($calendar); }
        &.type-task > a:before { @include icon($calendarShort); }
        &.type-journal > a:before { @include icon($calendar); }
        &.type-contact > a:before { @include icon($addressBook); }
        &.type-note > a:before { @include icon($textFile); }
        &.type-configuration > a:before { @include icon($gear); }
        &.type-freebusy > a:before { @include icon($calendar); }
        &.type-file > a:before { @include icon($textFile); }
    }

    a.button.icon,
    button.btn {
        &.toolbar-menu-button:before { @include icon($verticalMenu); }
        &.task-menu-button:before { @include icon($bars); }
        &.back-sidebar-button:before,
        &.back-content-button:before,
        &.back-list-button:before { @include icon($chevronLeft); }
        &.generate:before,
        &.yes:before,
        &.submit:before,
        &.continue:before,
        &.save:before { @include icon($check); }
        &.create:before { @include icon($create); }
        &.edit:before { @include icon($edit); }
        &.qrcode:before { @include icon($qrcode); }
        &.search:before { @include icon($search); }
        &.filter:before { @include icon($filter); }
        &.import:before { @include icon($import); }
        &.export:before { @include icon($export); }
        &.discard:before,
        &.delete:before { @include icon($trash); }
        &.next:before { @include icon($nextPage); }
        &.restore:before { @include icon($undo); }
        &.send:before,
        &.bounce:before { @include icon($send); }
        &.attach:before { @include icon($attachment); }
        &.no:before,
        &.close:before,
        &.cancel:before { @include icon($times); }
        &.mark:before { @include icon($star); }
        &.back:before { @include icon($chevronLeft); }
        &.remove:before { @include icon($times); }
        &.unlock:before { @include icon($lock); }
        &.help:before { @include icon($help); }
        &.toggleselect:before { @include icon($check); }
        &.folders:before { @include icon($folder); }
        &.tools:before,
        &.settings:before { @include icon($wrench); }
        &.dropdown:before { @include icon($caretDown); }
        &.insert.recipient:before { @include icon($addUser); }
    }

    .multi-input a.icon.reset:before { @include icon($trash); }
    .tagedit-list li.tagedit-listelement-old {
        a:before { @include icon($times); }
    }

    .googie_list td {
        .googie_list_revert:before { @include icon($plus); }
        .googie_add_to_dict:before { @include icon($plus); }
    }

    #identities-table td.mail:before { @include icon($vcard); }
    #responses-table td.name:before { @include icon($speechBubble); }
    #filterslist td.name:before { @include icon($filter); }
    #filtersetslist td.name:before { @include icon($textFile); }

    .attachmentslist li {
        a.cancelupload:before,
        a.delete:before { @include icon($times); }
    }

    .message-part,
    .message-htmlpart {
        blockquote span.blockquote-link {
            &:after { @include icon($chevronDown); }
            &.collapsed:after { @include icon($chevronUp); }
        }
    }

    .ui-dialog .ui-dialog-titlebar-close:before { @include icon($times); }

    .image-tools .open a.button.icon.tools:before { @include icon($chevronLeft); }

    .listing td.action a.pushgroup:before { @include icon($chevronRight); }

    .popupmenu.toolbar.listing {
        .dropbutton a.button.dropdown:before { @include icon($chevronRight); }
    }

    .pgpkeyimport {
        div.key label.keyid + a:before { @include icon($key); }
        li.uid:before { @include icon($user); }
    }

    .floating-action-buttons a.button:before { @include icon($plus, 2); }

    p.image-attachment .attachment-links {
        a.open:before { @include icon($newWindow); }
        a.download:before { @include icon($download); }
    }

    .table-widget table.options-table {
        td.enabled span:before { @include icon($check); }
        td.partial span:before { @include icon($check); }
    }

    table.table th.checkbox-cell {
        &.subscription:before { @include icon($rss); }
        &.alarm:before { @include icon($bell); }
        &.read:before { @include icon($eye); }
        &.write:before { @include icon($edit); }
    }

    .special-buttons {
        a.theme.light:before { @include icon($lightMode); }
        a.theme.dark:before { @include icon($darkMode); }
    }

    a.button.icon.extwin:before,
    button.btn.extwin:before {
        @include icon($newWindow);
    }

    // html editor
    div.tox {
        :before { margin-top: 3px;}
        .tox-dialog__header .tox-button:before { @include icon($times); }
        .tox-dialog__footer .tox-button:before { @include icon($check); }
        .tox-dialog__footer .tox-button.tox-button--secondary:before { @include icon($times); }
        .tox-search-dialog .tox-dialog__footer-end button:before { @include icon($signature, true); }
        .tox-search-dialog .tox-dialog__footer-end button:nth-of-type(1):before { @include icon($search, true); }

        .tox-dialog__footer .tox-tbtn.tox-tbtn--select {
            .tox-icon.tox-tbtn__icon-wrap {
                display: none;
            }
        }

        .tox-dialog__footer .tox-tbtn.tox-tbtn--select:before { @include icon($gear, 1.5); }
    }
}