.igz-main-wrapper {

    // preload oops.png image to display in dialog when server is unreachable
    background: url('/assets/images/oops.png') no-repeat -1000px;
}

.ngdialog {
    z-index: 10000;
}

.ngdialog-theme-iguazio {
    .ngdialog-color-set();

    @animation-duration: 0.2s;
    @animation-function: ease;
    display: flex;
    height: 100%;
    padding: 0 50px;
    min-width: 500px;
    align-items: center;
    justify-content: center;

    .ngdialog-content {
        box-shadow: @ngdialog-box-shadow;
        animation-duration: @animation-duration;
        animation-timing-function: @animation-function;
        font-family: @font-family-sans-serif;
        font-size: 16px;
        border-radius: 2px;
        max-width: 900px;
        background-color: @ngdialog-bg-color;
        z-index: 5;
        position: relative;
        padding: 19px 24px 23px 24px;

        /*
         * Confirms, alerts
         */
        .notification-text {
            margin: 30px 30px 0 0;
            max-height: 70vh;
            overflow: auto;

            .error-list {
                list-style-type: none;
                padding-inline-start: 0;

                .error-list-item {
                    margin-bottom: 5px;
                }
            }
        }

        .prompt-form {
            margin: 0 30px 4px;
        }

        .buttons {
            text-align: right;

            &.padding-top-15 {
                padding-top: 15px;
            }

            button:not(:first-child) {
                margin-left: 8px;
            }
        }

        .error-container {
            .error-text;
            .text-centered;

            position: relative;
            max-width: 300px;
            margin: 5px auto;
        }

        /*
         * Create/edit dialogs
         */

        .close-button {
            position: absolute;
            right: 24px;
            top: 26px;
            line-height: 10px;
            font-size: 14px;
            color: @ngdialog-close-btn-color;
            cursor: pointer;
        }

        .title {
            color: @ngdialog-title-color;
            font-family: @font-family-sans-serif;
            font-size: 20px;
            font-weight: 500;
            margin: 0 0 21px 0;
            padding-right: 24px;
        }

        .main-content {
            margin: 0 0 20px 0;

            .field-group {
                padding: 4px 0 10px;
                margin: 0;
                display: flex;

                &.extra-padding {
                    padding-bottom: 88px;
                }

                &:before, &:after {
                    content: " ";
                    display: table;
                    clear: both;
                }

                .field-label {
                    display: flex;
                    color: @ngdialog-field-label-color;
                    font-size: 16px;
                    font-weight: 400;
                    padding: 0;
                    min-width: 50px;
                    margin: 0 20px 0 2px;
                    line-height: 36px;
                    align-items: center;
                    float: left;
                }

                .field-input {
                    position: relative;
                    float: right;
                    width: 272px;

                    .href-link {
                        font-size: 14px;
                        line-height: 16px;
                        text-align: left;
                        padding-top: 10px;
                        border: none;
                    }

                    .empty-checkbox {
                        display: inline-block;
                        width: auto;
                        padding: 0;
                        margin: 6px;
                    }

                    .error {
                        color: @ngdialog-field-input-error-color;
                        font-size: 12px;
                        position: absolute;
                        top: -15px;
                        white-space: nowrap;
                    }

                    .checkboxes-list {
                        list-style: none;
                        margin: 0;
                        padding: 8px 0 0 0;

                        .list-item{
                            padding-bottom: 2px;

                        }

                        input[type=checkbox] + label {
                            margin: 5px 0;
                        }

                        .icon-font-primary-key, .icon-font-partition-key {
                            &:before {
                                color: @ngdialog-field-input-list-icon-before-color;
                                margin-right: 6px;
                                width: 16px;
                                text-align: center;
                            }
                        }
                    }
                }

                .field-description {
                    font-family: @font-family-sans-serif;
                    color: @ngdialog-field-input-field-description-color;
                    font-size: 12px;
                    font-style: italic;
                    line-height: 14px;
                    width: 270px;
                    padding-left: 15px;
                    float: left;
                }
            }
        }
    }

    &.oops-dialog {
        .ngdialog-content {
            color: @oops-dialog-color;
            font-size: 20px;
            font-weight: 500;
            width: 504px;
            border-radius: 6px;
            background-image: @oops-dialog-bg-image;
            box-shadow: none;
            padding: 0 0 49px;

            .header {
                background: url('/assets/images/oops.png') no-repeat center;
                margin: 47px 0 24px;
                height: 59px;
                background-size: contain;
            }

            .notification-text {
                color: @oops-dialog-notification-text-color;
                padding: 0 60px;
                text-align: center;
                margin: 0 0 36px;
                line-height: 1.5;
            }

            .buttons {
                text-align: center;
                height: 36px;

                .refresh-button {
                    margin: 0 auto;
                    padding-top: 8px;
                    height: 36px;
                    width: 124px;
                    font-size: 12px;
                    border-radius: 2px;
                    background-color: @oops-dialog-refresh-btn-bg-color;
                    border: @oops-dialog-refresh-btn-border;
                    text-transform: uppercase;

                    &:hover {
                        background-color: @oops-dialog-refresh-btn-hover-bg-color;
                        box-shadow: @oops-dialog-refresh-btn-hover-box-shadow;
                    }

                    .igz-icon-refresh {
                        font-size: 16px;
                        margin-right: 8px;
                        vertical-align: middle;
                    }
                }
            }
        }
    }

    &.image-dialog {
        .ngdialog-content {
            padding: 25px 24px 24px;

            .close-button {
                font-size: 18px;
                top: 24px;
            }

            .image-preview-container {
                text-align: center;

                .image-preview {
                    max-height: 336px;
                    max-width: 100%;
                }
            }
        }
    }

    &.ngdialog.ngdialog-closing .ngdialog-content {
        animation-duration: @animation-duration;
        animation-timing-function: @animation-function;
    }

    .ngdialog-overlay {
        background: @ngdialog-overlay-bg;
        border: @ngdialog-overlay-border;
        animation-duration: @animation-duration;
        animation-timing-function: @animation-function;
    }

    &.ngdialog.ngdialog-closing .ngdialog-overlay {
        animation-duration: @animation-duration;
        animation-timing-function: @animation-function;
    }

    &.ngdialog.ng-login-modal .ngdialog-content {
        padding: 0;
    }

    &.iframe-dialog {
        .ngdialog-content {
            max-width: 1268px;

            .frame {
                min-width: 1220px;
                border: 0 none transparent;
                height: 70vh;
                overflow-y: scroll;
            }
        }
    }
}

@media screen and (max-width: 1268px) {
    .ngdialog-theme-iguazio {
        &.iframe-dialog {
            .ngdialog-content {
                max-width: 900px;
            }
        }
    }
}
