html.gorp-rtl,
html.gorp-rtl body,
html.gorp-rtl #layout {
    direction: rtl !important;
}

html.gorp-rtl #layout-menu {
    direction: rtl !important;
}

html.gorp-rtl #layout-menu.popover {
    left: auto !important;
    right: 0 !important;
}

html.gorp-rtl #layout-sidebar,
html.gorp-rtl #layout-list {
    border-right: 0 !important;
    border-left: 1px solid #d5d5d5 !important;
}

html.gorp-rtl #layout-sidebar.sidebar-right {
    border-left: 0 !important;
    border-right: 1px solid #d5d5d5 !important;
}

html.gorp-rtl .listing li > a,
html.gorp-rtl .listing tbody td,
html.gorp-rtl .formcontent,
html.gorp-rtl .propform,
html.gorp-rtl .boxcontent,
html.gorp-rtl .popupmenu,
html.gorp-rtl .menu {
    text-align: right !important;
}

html.gorp-rtl .toolbar,
html.gorp-rtl .formcontent .row,
html.gorp-rtl .propform .row {
    direction: rtl !important;
}

html.gorp-rtl #compose-content {
    direction: rtl !important;
}

html.gorp-rtl #compose-content label,
html.gorp-rtl .formcontent label,
html.gorp-rtl .propform label {
    text-align: right !important;
}

html.gorp-rtl #compose-footer,
html.gorp-rtl #compose-content .formbuttons {
    direction: rtl !important;
    text-align: right !important;
}

html.gorp-rtl input[name="_from"],
html.gorp-rtl input[name="_to"],
html.gorp-rtl input[name="_cc"],
html.gorp-rtl input[name="_bcc"],
html.gorp-rtl input[type="email"],
html.gorp-rtl .recipient-input input,
html.gorp-rtl #rcmloginuser,
html.gorp-rtl #rcmloginpwd {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: plaintext !important;
}

html.gorp-rtl input[name="_subject"],
html.gorp-rtl textarea[name="_message"],
html.gorp-rtl #composebody {
    text-align: start !important;
    unicode-bidi: plaintext !important;
}

html.gorp-rtl code,
html.gorp-rtl pre,
html.gorp-rtl .email,
html.gorp-rtl .address {
    direction: ltr !important;
    unicode-bidi: isolate !important;
}

html.gorp-rtl table {
    direction: rtl;
}

#gorp-compose-direction-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 8px 0 !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 46px !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 10 !important;
    flex-wrap: wrap !important;
    clear: both !important;
    direction: rtl !important;
    background: #f5f7f8 !important;
    border: 1px solid #d6dde1 !important;
    border-radius: 5px !important;
    font-family: Tahoma, Arial, sans-serif !important;
    font-size: 13px !important;
}

#gorp-compose-direction-toolbar .gorp-direction-title {
    margin-inline-end: 3px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

#gorp-compose-direction-toolbar button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 90px !important;
    height: 32px !important;
    padding: 6px 10px !important;
    line-height: 1.2 !important;
    border: 1px solid #aebbc3 !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #263238 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

#gorp-compose-direction-toolbar button:hover {
    background: #e9f5fc !important;
    border-color: #37beff !important;
}

#gorp-compose-direction-toolbar button.gorp-active-direction {
    background: #37beff !important;
    border-color: #21aeea !important;
    color: #fff !important;
}

#gorp-compose-direction-toolbar .gorp-direction-note {
    margin-inline-start: 6px !important;
    color: #66757f !important;
    font-size: 12px !important;
}

@media (max-width: 600px) {
    #gorp-compose-direction-toolbar button {
        min-width: 74px !important;
    }

    #gorp-compose-direction-toolbar .gorp-direction-note {
        width: 100%;
        margin-inline-start: 0 !important;
    }
}
