@import "imports/mixins/grid";

.setup-banner {
    display: block;
    margin: 28px auto;
}

form.aui {
    .textarea.license-key {
        font: 9px monospace;
    }

    .aui-group .aui-item .error {
        color: var(--ds-text-danger, #d04437);
        margin-top: 5px;
    }
}

.mail-notifications-radio-options {
    height: 4em;
}

.license-input-container,
.survey-section {
    margin-top: @gutter;
}

.throbber-message {
    margin-top: @gutter;
}

code {
    white-space: nowrap;
}

p {
    margin-bottom: @gutter;
}

textarea {
    resize: none;
}

.checkbox.freeText {
    top: 4px;
}

.field-value {
    word-wrap: break-word;
}

.analytics-submit {
    margin-right: 10px;
}

// the following styles are used for new setup design since JIRA 7.0

form.aui.jira-setup-form {
    margin-top: 0;
}

.jira-setup-global-messages .aui-message {
    margin-bottom: 20px;

    .jira-setup-global-message-paragraph:last-of-type {
        margin-bottom: 0;
    }
}

.jira-setup-spinner {
    margin-top: 16px;
}

.db-messages {
    margin-left: 145px;

}

.aui-message.db-message {
    margin-top: 0;
}

form.aui .buttons-container .plugin-license-next-button.aui-button {
    margin-left: 0;
}

form.aui .buttons-container.jira-setup-form-with-no-fields {
    text-align: right;
}

/* JIRA Setup Choice widget */

.aui-page-focused .aui-page-panel-content {
    .jira-setup-choice {
        &-box {
            border: 1px solid var(--ds-border-focused, #ccc);
            border-radius: 5px;
            box-sizing: border-box;
            cursor: pointer;
            display: table;
            margin-bottom: 20px;
            width: 100%;

            &:last-of-type {
                margin-bottom: 0;
            }

            &:hover,
            &.jira-setup-choice-box-active {
                background: var(--ds-background-discovery-pressed, #e6eff8);
                border-color: var(--ds-border-focused, #ccd9ea);
            }
        }

        &-cell {
            display: table-cell;
            padding: 20px 20px 20px 0;
            vertical-align: middle;

            &:first-child {
                padding-left: 20px;
            }
        }

        &-box-header {
            border: none;
            padding-bottom: 0;
            line-height: 1em;

            .aui-lozenge {
                vertical-align: 20%;
            }
        }

        &-box-description {
            margin-bottom: 0;
        }
    }
}

/* Make aui-spinner look as previous aui wait icon, i.e. displayed in the same line as text */
.jira-setup-form,
.jira-setup-finishing-notifications,
.throbbers-placeholder,
.throbber-message {
    aui-spinner {
        display: inline-block;
        vertical-align: middle;
    }
}

/* Instant Setup since 6.4 */
.jira-setup {
    .icon-colors() {
        .aui-iconfont-info {
            color: var(--ds-icon-danger, #d04437);
        }

        .aui-iconfont-approve {
            color: var(--ds-icon-success, #14892c);
        }
    }

    &-mode {
        &-description {
            margin-bottom: 20px;
        }

        &-page {
            .jira-setup-choice-left {
                width: 70px;
            }
        }

        &-image {
            vertical-align: middle;
        }

        &-cookies-notice {
            color: var(--ds-text, #707070);
            font-size: 12px;
            margin-left: 5px;
        }
    }

    &-account {
        &-description {
            margin-bottom: 20px;
        }

        &-annotations {

            &-paragraph {
                margin-bottom: 0;
                margin-top: 0;
            }

            &-licenses {
                color: var(--ds-text, #707070);
                font-size: 12px;
                line-height: 175%;
            }
        }

        &-button {
            &-retry {
                margin-left: 10px;
            }
        }

        &-contents {
            margin-bottom: 20px;
        }

        &-form {
            &-header {
                font-weight: bold;
            }

            &-button {
                margin-right: 10px;
            }
        }

        &-spinner {
            color: var(--ds-text, #707070);
            font-size: 12px;

            &-generating2 {
                color: var(--ds-text, #333);
            }
        }

        &-summary {
            &-list {
                &-item {
                    margin-bottom: 0;
                    .icon-colors();
                }
            }

            &-data-header {
                margin-bottom: 0;
                margin-top: 20px;
            }

            &-message:first-child {
                margin-bottom: 20px;
            }

            &-info {
                margin-bottom: 20px;
            }
        }
    }

    &-language {
        &-dialog {
            &-trigger {
                cursor: pointer;
                float: right;
                font-size: 14px;

                & .aui-icon {
                    padding-right: 5px;
                }
            }
        }
    }

    &-finishing {
        &-annotation {
            color: var(--ds-text, #707070);
            line-height: 175%;
            margin-bottom: 0;
            margin-top: 40px;
        }

        &-error {
            margin-bottom: 20px;
        }

        &-notifications {
            &-inactive {
                color: var(--ds-text, #999);
            }

            &-item {
                margin-bottom: 0;
                .icon-colors();
            }

            &-placeholder-icon {
                display: inline-block;
                height: 16px;
                width: 16px;
            }

            &-lag {
                font-size: 12px;
                color: var(--ds-text, #999);
                position: relative;
                top: -1px;
                vertical-align: middle;
            }
        }

        &-summary {
            margin-bottom: 20px;

            &-splash {
                text-align: center;

                & + & {
                    margin-top: 20px;
                }
            }
        }

        &-refresh {
            cursor: pointer;
        }
    }
}

.icon-prefetch {
    position: absolute;
    top: -10000px;
}
