@import "./src/assets/styles/_popover";
@import "./src/assets/styles/_buttons";
@import "./src/assets/styles/_forms";

.ngx-toolbar {
    background-color: #f5f5f5;
    font-size: 0.8rem;
    padding: 0.2rem;
    border: 1px solid #ddd;

    .ngx-toolbar-set {
        display: inline-block;
        border-radius: 5px;
        background-color: white;

        .ngx-editor-button {
            background-color: #f5f5f5;
            background-color: transparent;
            padding: 0.4rem;
            min-width: 2.5rem;
            float: left;
            border: 1px solid #ddd;
            border-right: transparent;

            &:hover {
                cursor: pointer;
                background-color: #f1f1f1;
                transition: 0.2s ease;
            }

            &:focus,
            &.focus {
                outline: 0;
            }

            &:last-child {
                border-right: 1px solid #ddd;
            }

            &:first-child {
                border-top-left-radius: 5px;
                border-bottom-left-radius: 5px;
            }

            &:last-child {
                border-top-right-radius: 5px;
                border-bottom-right-radius: 5px;
            }

            &:disabled {
                background-color: #f5f5f5;
                pointer-events: none;
                cursor: not-allowed;
            }
        }
    }
}

::ng-deep .popover {
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

::ng-deep .ngxe-popover {
    min-width: 15rem;
    white-space: nowrap;

    &.extra-gt, .extra-gt {
        padding-top: 0.5rem !important;
    }

    &.extra-gt1, .extra-gt1 {
        padding-top: 0.75rem !important;
    }

    &.extra-gt2, .extra-gt2 {
        padding-top: 1rem !important;
    }

    .form-group {
        label {
            display: none;
            margin: 0;
        }

        .form-control-sm {
            width: 100%;
            outline: none;
            border: none;
            border-bottom: solid 1px #bdbdbd;
            border-radius: 0;
            margin-bottom: 1px;
            padding-left: 0;
            padding-right: 0;

            &:focus, &:active {
                border-bottom: 2px solid #1e88e5;
                box-shadow: none;
                margin-bottom: 0;
            }

            &.ng-dirty {
                &.ng-invalid {
                    &:not(.ng-pristine) {
                        border-bottom: 2px solid red;
                    }
                }
            }
        }
    }

    .form-check {
        margin-bottom: 1rem;
    }

    .btn {
        &:focus {
            box-shadow: none !important;
        }
    }

    &.imgc-ctnr {
        margin: -0.5rem -0.75rem;

        .imgc-topbar {
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px 1px rgba(0, 0, 0, 0.16);
            border-bottom: 0;

            &.btn-ctnr {
                button {
                    background-color: transparent;
                    border-radius: 0;

                    &:hover {
                        cursor: pointer;
                        background-color: #f1f1f1;
                        transition: 0.2s ease;
                    }

                    &.active {
                        color: #007bff;
                        transition: 0.2s ease;
                    }
                }
            }

            &.two-tabs {
                span {
                    width: 50%;
                    text-align: center;
                    display: inline-block;
                    padding: 0.4rem 0;
                    margin: 0 -1px;
                    margin-bottom: 2px;

                    &:hover {
                        cursor: pointer;
                    }

                    &.active {
                        margin-bottom: -2px;
                        border-bottom: 2px solid #007bff;
                        color: #007bff;
                    }
                }
            }
        }

        .imgc-ctnt {
            padding: 0.5rem;

            &.is-image {
                .progress {
                    height: 0.5rem;
                    margin: 0.5rem -0.5rem -0.6rem -0.5rem;
                }

                p {
                    margin: 0;
                }

                .ngx-insert-img-ph {
                    border: dashed 2px #bdbdbd;
                    padding: 1.8rem 0;
                    position: relative;
                    letter-spacing: 1px;
                    text-align: center;

                    &:hover {
                        background: #ebebeb;
                    }

                    .ngxe-img-upl-frm {
                        opacity: 0;
                        position: absolute;
                        top: 0;
                        bottom: 0;
                        left: 0;
                        right: 0;
                        z-index: 2147483640;
                        overflow: hidden;
                        margin: 0;
                        padding: 0;
                        width: 100%;

                        input {
                            cursor: pointer;
                            position: absolute;
                            right: 0px;
                            top: 0px;
                            bottom: 0px;
                            margin: 0px;
                        }
                    }
                }
            }
        }
    }
}
