@import "../../../ui/global.less";

#content > .aui-page-header,
#content > header > .aui-page-header {

    .aui-page-header-actions {
        > * {
            // To ensure everything lines up nicely -- e.g., UPM + .aui-button + .aui-buttons
            display: inline-block;
            margin-top: 5px;
            margin-bottom: 5px;
            text-align: right;
            vertical-align: top;
        }
    }

    // workaround fix for:
    // - https://ecosystem.atlassian.net/browse/AUI-3705
    // - https://ecosystem.atlassian.net/browse/UPM-5046
    &.generalAdminHeading .aui-page-header-actions > * {
        margin-top: 0;
        margin-bottom: 0;
    }

    #upm-notifications {
        display: inline-block;
        float: none; // undo UPM's own styles.
        position: relative;

        #upm-notifications-trigger {
            position: relative; // so that it's placed in the page flow
        }
    }
}

#content .aui-page-header-main > .admin-header-actions-plugin-point {
    float: right;

    .aui-button {
        margin-left: 10px;
        margin-bottom: 5px;
        margin-top: 5px;
    }
}

.page-scheduler-admin {
    .aui-badge {
        &.successful {
            background-color: var(--ds-background-accent-green-subtle, @aui-color-status-success-background);
            border-color: var(--ds-background-accent-green-subtle, @aui-color-status-success-border);
            color: var(--ds-text-inverse, @aui-color-status-success-foreground);
        }

        &.failed {
            background-color: var(--ds-background-danger-bold, @aui-color-status-error-background);
            border-color: var(--ds-border-danger, @aui-color-status-error-border);
            color: var(--ds-text-inverse, @aui-color-status-error-foreground);
        }
    }

    table.aui.runners {
        .runner-key p {
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
        }

        .number-of-jobs,
        .schedule,
        .actions {
            white-space: nowrap;
        }

        .actions {
            .aui-button-link {
                padding: 0;
            }
        }

        .badge {
            padding-left: 0;
            padding-right: 5px;
        }

        tr.runner {
            td {
                padding-bottom: 0;
            }
        }

        td {
            max-width: 150px;
            padding-top: 9px;
            padding-bottom: 9px;

            &.xsmall-cell {
                width: 3%;
            }

            &.small-cell {
                width: 10%;
            }

            &.normal-cell {
                width: 15%;
            }

            &.wide-cell {
                width: 60%;
            }
        }
    }

    .details {
        margin-top: 5px;

        dl {
            width: 100%;
            overflow: hidden;
        }

        dt,
        dd {
            display: block;
            float: left;
            margin: 0;
            padding: 0;
        }

        dt {
            width: 15%;
            clear: both;
            color: var(--ds-text-subtle, @jira-color-subtle-text);
            &::after {
                content: ':';
            }
        }

        dd {
            width: 85%;
        }
    }
}