@import url("../../../../xdce-widget/assets/styles/styles.css");
@import url("../../../../../@ag-grid-community/all-modules/dist/styles/ag-grid.css");
@import url("../../../../../@ag-grid-community/all-modules/dist/styles/ag-theme-balham.css");

@import 'font-awesome/font-awesome';
@import 'fonts';

html,
body {
    font-family: "Open Sans", sans-serif;
}

#fideuram {
    .isp-content-header-open-animation {
        margin: unset !important;
    }

    .widget-fideuram {
        nbp-button {
            .isp-corporate-mode-wrapper .btn {
                min-height: unset;
                min-width: unset;
                padding: unset;
                margin: unset;

                display: inline-block;
                margin-bottom: 0;
                font-weight: normal;
                text-align: center;
                vertical-align: middle;
                text-transform: unset;
                cursor: pointer;
                background-image: none;
                border: 1px solid transparent;
                white-space: nowrap;
                -moz-user-select: none;
                -ms-user-select: none;
                user-select: none;
                padding: 1px 5px;
                line-height: 1.5;
                font-size: 12px;
                -webkit-appearance: none;
                outline: none !important;
                -o-transition: all 0.1s;
                transition: all 0.1s;
            }
        }

        nbp-fid-button-bar {
            .nbp-fid-button-bar>*:not(:last-child) {
                .isp-corporate-mode-wrapper {
                    .isp-button {
                        border-right-width: 1px;
                        border-right-style: solid;
                    }
                }
            }

            nbp-button .isp-corporate-mode-wrapper {
                .isp-button {
                    width: 100%;
                    padding: 10px 0;
                    text-decoration: underline;
                }
            }
        }

        nbp-label .isp-label.isp-default {
            font-weight: normal;
            font-size: 12px !important;
            margin: 5px !important;
        }

        nbp-fid-side-popup.isp-corporate-mode-wrapper {
            .nbp-fid-side-popup-content {
                padding: 12px;
            }
        }

        nbp-button-generation .isp-corporate-mode-wrapper {
            .isp-button-generation .button-content.icon-top {
                // flex-direction: column;

                .button-container {
                    width: 45px;
                    height: 45px;

                    .button-icon {
                        font-size: 45px !important;
                    }
                }

                .button-label,
                .button-label-icon {
                    margin-left: unset;
                    padding-top: unset;
                }
            }

            .button-content {

                .button-label,
                .button-label-icon {
                    font-size: 12px;
                    font-weight: normal;
                    margin-left: 5px;
                    text-transform: none;
                }
            }
        }

        nbp-checkbox .isp-corporate-mode-wrapper {
            .isp-checkbox-input {
                margin: 4px;
                margin-top: 1px;
                line-height: normal;
                width: 14px;
                height: 14px;
                border-width: 1px;
                border-style: solid;
                border-radius: 3px;

                .check-icon {
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    svg {
                        margin: 0;
                        width: 11px;
                        height: 11px;
                    }
                }
            }
        }

        nbp-radio .isp-corporate-mode-wrapper {
            .isp-radio-input {
                margin: 4px;
                margin-top: 1px;
                line-height: normal;
                width: 14px;
                height: 14px;
                border-width: 1px;
                border-style: solid;

                .circle-icon {
                    width: 9px;
                    height: 9px;
                }
            }
        }

        .nbp-tab-bar-title {
            .tab-bar-title {
                font-size: 15px;
                float: left;
                line-height: 1.5;
                font-weight: bold;
            }
        }

        nbp-modal .isp-corporate-mode-wrapper {
            // .modal-backdrop.in {
            //     opacity: 0.5;
            //     filter: alpha(opacity=50);
            // }

            // .modal-backdrop.fade {
            //     opacity: 0;
            //     filter: alpha(opacity=0);
            // }

            // .fade.in {
            //     opacity: 1;
            // }

            // .modal-backdrop {
            //     position: fixed;
            //     bottom: 0;
            // }

            // .modal-backdrop {
            //     position: fixed;
            //     top: 0;
            //     right: 0;
            //     bottom: 0;
            //     left: 0;
            //     z-index: 1040;
            //     background-color: #000000;
            // }

            // .fade {
            //     opacity: 0;
            //     -webkit-transition: opacity 0.15s linear;
            //     -o-transition: opacity 0.15s linear;
            //     transition: opacity 0.15s linear;
            // }

            .isp-modal-container {
                padding: unset;
            }

            .nbp-modal-title {
                padding: 14px;
                text-align: left !important;
                font-size: 14px;
                max-width: calc(100% - 2rem);

                &:before {
                    content: "";
                    right: -2rem;
                    position: absolute;
                    left: 0;
                    bottom: 0;
                    height: 1px;
                    border-bottom-style: dotted;
                    border-bottom-width: 1px;
                }
            }

            .isp-modal-close {
                padding: 14px;
            }

            .cursor-pointer {
                font-size: 0.75rem;
            }

            .isp-modal-content {
                padding: unset;

                &>div:nth-child(2) {
                    &>* {
                        padding: unset;
                    }
                }
            }

            .nbp-modal-body {
                padding: 14px;
                max-height: unset !important;
                height: unset;
            }

            .row.justify-content-md-center.nbp-modal-buttons {
                padding: 14px;
                margin-right: 10px;
                gap: 1rem;
                justify-content: flex-end !important;

                &>* {
                    flex-basis: 0;
                }
            }

            nbp-card .isp-corporate-mode-wrapper {
                .isp-card-container.isp-card.isp-default {
                    margin: 0 -14px -14px -14px;
                    width: calc(100% + 28px);
                    border: unset;
                }

                h3.isp-card-title {
                    padding: 14px;
                }

                .isp-card-component-template {
                    padding: 14px;
                }
            }
        }

        nbp-tooltip .isp-corporate-mode-wrapper {

            .tooltip-content,
            .popover-content {
                padding: 1px;
                border-radius: 0;
            }

            .tooltip-content {
                &:after {
                    border-width: 11px;
                }

                &.top {
                    border-bottom-style: solid;
                    border-bottom-width: 2px;

                    &:after {
                        bottom: 1px;
                        left: 50%;
                        transform: translateX(-50%);
                        border-bottom-width: 0;
                    }
                }

                &.right {
                    border-left-style: solid;
                    border-left-width: 2px;

                    &:after {
                        top: 56%;
                        border-left-width: 0;
                    }
                }

                &.bottom {
                    border-top-style: solid;
                    border-top-width: 2px;

                    &:after {
                        border-top-width: 0;
                    }
                }

                &.left {
                    border-right-style: solid;
                    border-right-width: 2px;

                    &:after {
                        top: 56%;
                        border-right-width: 0;
                    }
                }
            }

            .popover-content {
                border-radius: 5px;
                border-width: 2px;

                &:after {
                    border-width: 0 !important;
                }

                .icon-position.clickable {
                    font-size: 9px;
                }
            }

            .text-padding-hover {
                padding: 0.3em 0.3em !important;
            }
        }

        nbp-tab-bar .isp-corporate-mode-wrapper .isp-tab-bar {
            justify-content: flex-start;
            border: 0;
            border-bottom: 0;

            .tab-container {
                border: 0;
                background: transparent !important;
                border-right-width: 1px;
                border-right-style: solid;
                height: 1.3rem;
                font-size: 14px;
                padding: 0 .5rem;

                .tab-title {
                    font-size: 14px;
                    font-weight: normal !important;
                }

                &:first-child {
                    border-left: 0;
                }

                &:last-child {
                    border-right: 0;
                }

                &.selectedTab {
                    background: transparent !important;

                    .tab-title {
                        font-weight: normal !important;
                    }

                    .hide-border-active {
                        display: none;
                    }
                }
            }
        }

        nbp-input-container .isp-corporate-mode-wrapper .isp-input-container {
            display: flex;
            flex-wrap: nowrap;

            &>*:not(div):not(label) {
                flex-grow: 1;
                align-self: center;
            }

            &>label {
                font-weight: normal;
                flex-grow: 0;
                margin-left: 0 !important;

                &.label-disabled {
                    opacity: 1;
                }
            }
            &.isp-container-disabled * {
                cursor: not-allowed;
            }
        }

        nbp-card .isp-corporate-mode-wrapper {
            .isp-card-container.isp-card.isp-default {
                padding: unset;
            }

            h3.isp-card-title {
                padding: 10px;
                font-weight: normal;
                border-bottom-style: dotted !important;
                border-bottom-width: 1px !important;
                margin: unset !important;
                max-height: unset;
                overflow: unset;
            }

            p.isp-card-description {
                display: none;
                padding: 10px;
            }

            .isp-card-content {
                margin: unset;
            }

            .isp-card-component-template {
                padding: 10px;
                font-size: 12px;
                text-align: right;
                overflow: unset;
            }

            // h3.isp-card-subtitle {
            //     color: map-get($blue-palette, 200);
            //     font-size: 14px;
            //     padding: 10px;
            //     position: relative;

            //     &::after {
            //         border-bottom: 1px dotted map-get($blue-palette, 200);
            //         left: 0;
            //         right: 0;
            //         top: 100%;
            //         content: '';
            //         position: absolute;
            //         margin-left: -10px;
            //         margin-right: -10px;
            //     }
            // }

            .isp-card-component-template:has(.nbp-fid-button-bar) {
                position: relative;
                padding-bottom: calc(10px + 12px + 10px);

                .nbp-fid-button-bar {
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    right: 0;
                }
            }

            nbp-card .isp-corporate-mode-wrapper {
                .isp-card-container.isp-card.isp-default {
                    margin: 0 -10px -10px -10px;
                    width: calc(100% + 20px);
                    border: unset;
                }
            }
        }

        nbp-input-text .isp-corporate-mode-wrapper .isp-input-text {
            input.textfield-box {
                border-width: 1px;
                border-style: solid;
                border-radius: 0px;
                padding: 1px;
                font-size: 12px;
                height: 22px;

                &.with-icon {
                    padding-right: 30px;
                }
            }

            .icon.icon-inside {
                top: .2rem !important;
                right: .2rem !important;
            }
        }

        .isp-corporate-mode-wrapper .isp-disabled {
            cursor: not-allowed;
            opacity: 1;
        }

        nbp-calendar-generic .isp-corporate-mode-wrapper .isp-calendar-generic {
            position: relative;

            .isp-font-comuni-calendario::before {
                content: "";
                font: 14px / 1 FontAwesome !important;
            }

            .dropdown-menu {
                border-radius: 0;
                border-width: 1px;
                border-style: solid;
            }

            &.isp-disabled {
                input.form-control {
                    cursor: not-allowed;
                    opacity: 1;
                }
            }

            input.form-control {
                border-width: 1px;
                border-style: solid;
                border-radius: 0px !important;
                padding: 1px 2px;
                padding-right: 36px;
                font-size: 12px;
                height: 2.1em;

                border-top-right-radius: 3px !important;
                border-bottom-right-radius: 3px !important;

                &[disabled] {
                    opacity: 1;
                }
            }

            .button-icon {
                transform: unset;
                width: 36px;
                border-left-width: 1px;
                border-left-style: solid;

                font-size: 0.9rem;
                right: 1px;
                top: 1px;
                bottom: 1px;
                border-top-right-radius: 3px;
                border-bottom-right-radius: 3px;

                display: flex;
                align-items: center;
                justify-content: center;

                &.disabled {
                    opacity: 1;
                }
            }

            @mixin fid-date-picker-decorator-style() {
                width: unset !important;
                height: unset !important;

                border-width: 1px;
                border-style: solid;
                border-radius: 3px;
                font-size: 12px;
                font-weight: normal;
            }

            .isp-main-datepicker {
                padding-top: 5px;
            }

            .ngb-dp-months.d-flex {
                height: unset !important;
            }

            .isp-datepicker-navigation {
                border-color: transparent;
            }

            .btn.btn-link.camillo {
                //border frecce
                @include fid-date-picker-decorator-style();
                width: 34px !important;
            }

            .ngb-dp-month-name {
                text-transform: lowercase;
                font-size: 12px;
            }

            .header-navigation-date {
                flex-grow: 1;

                @include fid-date-picker-decorator-style();

                &,
                .isp-datepicker-navigation,
                ngb-datepicker-navigation {
                    line-height: unset !important;
                    height: 34px !important;
                }
            }

            .ngb-dp-weekday {
                //giorni settimane
                text-transform: lowercase;
                font-size: 11px;
                position: relative;

                &:before {
                    content: "";
                    position: absolute;
                    bottom: -1px;
                    left: 0;
                    width: 100%;
                    height: 1px;
                }
            }

            .isp-datepicker-routing-view .d-flex {
                border-top: unset;
            }

            .ngb-dp-day {
                //giorni in numero
                padding: 5px 10px;
                height: unset !important;
                width: 34px !important;

                &:not(.hidden) {
                    @include fid-date-picker-decorator-style();
                    width: 34px !important;

                    &>div {
                        font-size: 12px !important;
                        font-weight: normal;
                        background-color: inherit;
                    }
                }

                &.disabled {
                    cursor: not-allowed;
                    opacity: 0.65;
                    box-shadow: none;

                    >div {
                        cursor: not-allowed;
                    }
                }

                * {
                    line-height: 1.5 !important;
                }

                .ngbdatepickerdayview {
                    font-size: 12px;
                }

                >.is-weekend {
                    opacity: 0.65;
                }
            }
        }

        nbp-combo,
        nbp-combo-filter,
        nbp-combo-multi {

            .isp-corporate-mode-wrapper .isp-combo,
            .isp-corporate-mode-wrapper .isp-combo-filter,
            .isp-corporate-mode-wrapper .isp-combo-multi {
                input.form-control {
                    border-width: 1px;
                    border-style: solid;
                    border-radius: 0px;
                    padding: 1px 2px;
                    padding-right: 24px;
                    font-size: 12px;
                    height: 2.1em;
                }

                .dropdown-button {
                    width: 24px;
                    height: unset;
                    bottom: 0;

                    display: flex;
                    align-items: center;
                    justify-content: center;

                    .dropdown-button-border {
                        display: none;
                    }

                    .arrow-top,
                    .arrow-bottom {
                        position: unset;
                        top: unset;
                        bottom: unset;
                        right: unset;
                        left: unset;
                        height: auto;
                        width: auto;
                        border: unset;
                    }
                }

                .dropdown-content {
                    margin-top: 5px;
                }

                .dropdown-list-wrapper {
                    border-width: 1px;
                    border-style: solid;
                    max-height: unset;
                }

                .dropdown-list {
                    max-height: unset;
                    overflow: unset;
                    padding: unset;
                    margin: unset;
                }

                .dropdown-list-item {
                    border: unset;
                    padding: 8px 4px 5px 4px;
                    align-items: center;

                    &.active {
                        background-color: unset;
                    }
                }
            }
        }

        nbp-combo,
        nbp-combo-filter {

            .isp-corporate-mode-wrapper .isp-combo,
            .isp-corporate-mode-wrapper .isp-combo-filter {

                .arrow-top,
                .arrow-bottom {
                    position: unset;
                    top: unset;
                    bottom: unset;
                    right: unset;
                    left: unset;
                    height: auto;
                    width: auto;
                    border: unset;

                    &::before {
                        font: 14px / 1 FontAwesome;
                        font-size: inherit;
                        text-rendering: auto;
                        -webkit-font-smoothing: antialiased;
                    }
                }

                .arrow-top::before {
                    content: "";
                }

                .arrow-bottom::before {
                    content: "";
                }
            }
        }

        nbp-combo-multi .isp-corporate-mode-wrapper {
            .isp-combo-multi .dropdown-content {
                position: unset;
                margin: unset;
            }

            .isp-combo-multi .dropdown-list-wrapper {
                border-width: 1px;
                border-style: solid;
            }

            .isp-combo-multi input.form-control {
                border: unset;
            }

            .isp-combo-multi .dropdown-button {

                .arrow-top,
                .arrow-bottom {
                    border: unset;
                    display: none;
                }
            }

            .isp-combo-multi .dropdown-list-item {
                padding: 3px 0;
                min-height: unset;
                height: unset;
                border: unset;
                line-height: 1.528571;
                
                &.active {
                    background-color: unset;
                }

                &:hover {
                    background-color: unset;
                    color: inherit !important;
                }
            }

            nbp-checkbox .isp-corporate-mode-wrapper .isp-checkbox-input {
                margin: -1px 5px 0 10px;
            }

            nbp-checkbox .isp-corporate-mode-wrapper .checkbox-label {
                margin: unset !important;
                line-height: 1rem;
            }

            .dropdown-list {
                >.dropdown-list-item:not(:first-child) {
                    border-top-width: 1px;
                    border-top-style: solid;
                }

                nbp-ellipsis {
                    margin: 0 -10px;
                    padding: 0 19px;
                    font-weight: bold;
                    float: none;
                    z-index: 1;
                }

            }

            .isp-combo-multi.isp-default.isp-focused:has(.dropdown-content) {
                input {
                    display: none;
                }

                .dropdown-container:after,
                .dropdown-container:before {
                    content: none;
                }
            }

            .isp-combo-multi.isp-default input {
                border-width: 1px;
                border-style: solid;
                font-weight: bold;
                padding: 3px 24px 3px 29px;
                line-height: 1.528571;
            }

            .isp-combo-multi .dropdown-list-item:hover {
                background-color: unset;
                color: unset;
            }

            .dropdown-container:after,
            .dropdown-container:before {
                content: "";
                position: absolute;
                z-index: 1;
                top: 50%;
                transform: translateY(-50%);
            }

            .dropdown-container:after {
                left: 11px;
                background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20fill=%22white%22%20viewBox=%220%200%2024%2024%22%20width=%2224%22%3E%3Cpath%20d=%22M20.285%202l-11.285%2011.567-5.286-5.011-3.714%203.716%209%208.728%2015-15.285z%22/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: center;
                background-size: contain;
                width: 12px;
                height: 12px;
            }

            .dropdown-container:before {
                left: 10px;
                width: 14px;
                height: 14px;
                border-width: 1px;
                border-style: solid;
                border-radius: 3px;
            }
        }


        nbp-toggle .isp-corporate-mode-wrapper {
            .div-toggle-barra.truck {
                border-width: 1px;
                border-style: solid;

                transition: all .5;
                box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1) inset;
                width: 30px;
            }

            .div-toggle-slider.thumb {
                width: 13px;
                height: 13px;
                position: absolute;
                top: 0;
                border-width: 1px;
                border-style: solid;
                box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
                bottom: unset;
                -webkit-transition: all .2s;
                transition: all .2s;
            }
        }

        nbp-fid-toggle-tabset .isp-corporate-mode-wrapper,
        nbp-toggle-tabset .isp-corporate-mode-wrapper {
            .isp-tab-toggle {
                margin: unset;
            }

            .tabs-container {

                .tab-element.cursor-pointer,
                .tab-title {
                    padding: unset;
                    border: unset;
                    max-width: unset;
                    background: unset;
                    height: unset;
                    min-width: unset;
                    border-radius: unset;
                    line-height: 1.5;
                    overflow: unset;
                }

                >.tab-element.cursor-pointer:not(:last-child) {
                    border-right-width: 1px;
                    border-right-style: solid;
                }

                .tab-element.cursor-pointer {
                    padding: 0 5px;
                }

                .tab-title {
                    font-weight: normal;

                    span {
                        font-size: 14px;
                    }
                }
            }
        }

        nbp-textarea textarea {
            padding: 1px;
            border-radius: 0px;
        }

        nbp-accordion .isp-corporate-mode-wrapper .isp-accordion {
            .accordion-header {
                border: unset;
                padding: 10px;
                border-bottom-width: 1px !important;
                border-bottom-style: dotted !important;

                line-height: 1.5;
                height: unset;
                min-height: unset;

                .title {
                    font-size: 14px;
                    font-weight: normal;
                }
            }

            .accordion-title {
                min-height: unset;
            }

            .accordion-arrow {
                font-size: 15px;
                width: unset;
            }

            .accordion-body {
                border: unset;

                &.accordion-open {
                    font-size: 12px;
                    line-height: 1.5;
                    padding: 15px;
                }

                &:has(.nbp-fid-button-bar) {
                    position: relative;
                    padding-bottom: calc(15px + 12px + 30px);

                    .nbp-fid-button-bar {
                        position: absolute;
                        bottom: 0;
                        left: 0;
                        right: 0;
                    }
                }
            }

            .icon.accordion-arrow::before {
                font-family: 'FontAwesome' !important;
                -webkit-text-stroke: unset !important;
                font-size: 15px;
            }

            .icon.accordion-arrow.ico-comuni-freccia-accordion-chiudi::before {
                content: "";
            }

            .icon.accordion-arrow.ico-comuni-freccia-accordion-apri::before {
                content: "";
            }
        }

        isp-turbo-table .isp-corporate-mode-wrapper .isp-turbo-table,
        nbp-table .isp-corporate-mode-wrapper .isp-table {
            table {
                thead {

                    th.table-label,
                    th.header-table-class {
                        position: relative;
                        font-size: 12px;
                        font-weight: bold;
                        border-right-width: 0 !important;
                        border-bottom-width: 1px;
                        border-bottom-style: solid;
                        text-transform: unset;

                        .sort-button {
                            display: inline-block !important;

                            &:has(.active) {
                                margin-left: 5px;
                            }

                            .arrow-down,
                            .arrow-up {
                                right: unset;

                                &:not(.active) {
                                    border-width: 0;
                                    position: absolute;
                                    top: 0;
                                    width: 100%;
                                    height: 100%;
                                    left: 0;
                                    z-index: 1;
                                }

                                &::before {
                                    border-width: 0;
                                }
                            }
                        }
                    }
                }

                tbody {

                    tr.table-row,
                    tr.isp-table-row {
                        border: unset;
                        height: unset;

                        td.table-cell,
                        td.isp-common-column,
                        td.td-accordion-row {
                            border: unset;
                            font-weight: normal;
                            border-bottom-width: 1px !important;
                            border-bottom-style: solid !important;
                        }
                    }

                    tr {
                        .expbutton-container .expbutton {
                            width: 1rem;
                            height: 1rem;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                        }
                    }
                }
            }
        }

        isp-spinner {
            [aria-labelledby="spinnerLabel messageLabel"] {
                position: relative;
            }

            .spinner-msg-font-style {
                position: absolute;
                z-index: 1000;
                left: 50%;
                transform: translateX(-50%);
                font-size: 12px;
                margin: unset;

                top: 50px;
                padding: 30px 0;
                align-items: flex-start;
            }

            .spinner::after {
                content: "";
                position: absolute;
                top: 0;
                bottom: 0;
                right: 0;
                left: 0;
                background: #5559;
                z-index: -1;
            }

            .spinner {
                align-items: flex-start;
                padding: 30px 0;
            }

            #canvasLoader {
                position: relative;
                width: 600px;
                background: #fff;
                padding: 15px;
                border-width: 2px;
                border-style: solid;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
            }

            #canvasLoader canvas {
                visibility: hidden;
            }

            #canvasLoader::after {
                content: "\f1ce";
                font: 14px / 1 FontAwesome !important;
                position: absolute;
                top: 20px;
                left: calc(50% - 14px);
                transform: translateX(-50%);
                transform: rotate(274.346deg);
                -webkit-animation: fa-spin 2s infinite linear;
                animation: fa-spin 2s infinite linear;
            }

            &[data-message] {
                --spinner-message: attr(data-message);

                #canvasLoader::before {
                    content: var(--spinner-message);
                    position: absolute;
                    left: 50%;
                    transform: translateX(-50%);
                    font-size: 12px;
                    bottom: 20px;
                }
            }
        }
    }
}

.ag-theme-balham {

    .ag-header-cell::after,
    .ag-header-group-cell::after,
    .ag-root {
        border: unset;
    }

    .ag-icon-asc,
    .ag-icon-desc,
    .ag-icon-none {
        display: inline-flex;
        align-items: center;
        font: 14px / 1 FontAwesome;
    }

    .ag-icon-asc:before {
        content: "\f0d8";
    }

    .ag-icon-desc:before {
        content: "\f0d7";
    }

    .ag-icon-none:after {
        content: "\f0d8";
    }

    .ag-icon-none:before {
        content: "\f0d7";
    }
}