/* Fix anchors scrolling the content */
html,
.panel--scrollable {
    scroll-padding-top: 53px;
}

/* Only necessary pre 4.4 */
#Form_ItemEditForm_action_doDelete.align-right {
    position: absolute;
    right: 1.5385rem;
}

/* Add some spacing on the right */
.cms-content-header-utils {
    padding-right: 1.5385rem;
}

/* It makes more sense to have the icon on the right
You can also use it on your own classes with .btn-icon-end */
#action_doSaveAndNext:before,
.btn-icon-end:before {
    float: right;
    margin-right: 0;
    margin-left: 6px;
}

/* Align stuff in the toolbar */
.btn-toolbar .bb-align {
    display: inline-block;
    line-height: 32px;
    padding-left: 1.5385rem;
    padding-right: 1.5385rem;
}

/* Misc stuff - check if still necessary */
label.btn {
    margin-bottom: 0;
}

table .btn-link {
    padding: 0;
    margin: 0;
}

/* Fix actions display in CMSProfileController */
.CMSProfileController .btn-toolbar>* {
    order: 2;
}

.CMSProfileController .btn-toolbar>#action_save {
    order: 1;
    margin-right: 5px;
}

/* Progressive actions */
.progressive-action {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.progressive-action span {
    position: relative;
    z-index: 2;
}

.progressive-action .btn__progress {
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: #368b39;
    opacity: 0.5;
    z-index: 1;
}

#ActionMenus {
    margin-left: 10px;
}

/* Align GridFieldRowButtons with the btn class (when no icons are used) */
td>.action.btn {
    padding: 1.2308rem 0.6154rem;
    margin-top: -1.2308rem;
    margin-bottom: -1.2308rem;
}

/* Mobile UI */
@media screen and (max-width: 600px) {
    .btn-mobile-hidden {
        display: none !important;
    }

    .btn-mobile-collapse>span {
        display: none !important;
    }

    .btn[class*="font-icon-"].btn-mobile-collapse:before {
        margin-right: 0;
    }
}

/* Show all buttons in toolbar-south */
.toolbar--south {
    min-height: 53px;
    height: auto;
    max-height: none;
}

/* Grouping tweaks */
.toolbar--south .btn-toolbar>.btn-group:not(:first-child) {
    margin-left: 5px;
    margin-right: 0;
}

/* a.btn */
.ui-widget.ui-widget-content a.btn.custom-action,
.ui-widget a.btn.custom-action,
.ui-widget.ui-widget-content .cms-content-actions a.btn.custom-link,
.ui-widget .cms-content-actions a.btn.custom-link {
    color: #fff;
}

.ui-widget a.btn.btn-secondary.custom-link {
    color: #566b8d;
}

/* Last icon */
l-i {
    --size: 1em;
    display: inline-flex;
    width: var(--size);
    height: var(--size);
    vertical-align: middle;
}

l-i svg {
    display: block;
    width: 100%;
    height: 100%;
}

p l-i,
button l-i,
a l-i,
span l-i {
    vertical-align: -0.125em;
}

l-i i {
    font-size: var(--size) !important;
    color: currentColor;
}

.material-icons-two-tone {
    background-color: currentColor;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
