/* stylelint-disable declaration-no-important, scss/no-global-function-names */

@import 'sweetalert2/src/sweetalert2';

.swal2-container {
    font-family: $text-base-font-family;
}

.swal2-popup {
    background: $bg-color-side-nav;
    box-shadow: 1px 1px 20px hsla(0deg, 0%, 0%, 0.5);
}

.swal2-title {
    color: $text-base-color;
    font-size: 1.5rem;
}

.swal2-html-container,
.swal2-content {
    color: $text-base-color;
    white-space: pre-line;
}

.swal2-file,
.swal2-input,
.swal2-textarea {
    padding: $input-padding-vertical $input-padding-horizontal;
    outline: 0;
    border: $input-border-size solid $bg-color-input-normal;
    border-radius: $input-border-radius;
    background-color: $bg-color-input-normal;
    color: $color-input;
    font-family: $text-base-font-family;
    font-size: $input-font-size;

    &:focus {
        border-color: $bg-color-button-info;
        box-shadow: none;
    }
}

.swal2-styled:focus {
    box-shadow: none;
}

.swal2-icon.swal2-warning {
    border-color: $bg-color-button-warning;
    color: adjust-color($bg-color-button-warning, $lightness: 8%);
}

.swal2-confirm {
    background-color: $bg-color-button-info !important;

    &:hover,
    &:focus {
        background-color: adjust-color($bg-color-button-info, $lightness: 8%) !important;
        box-shadow: none !important;
    }

    &:active {
        background-color: adjust-color($bg-color-button-info, $lightness: -8%) !important;
        color: $color-active-button;
    }

    &--warning {
        background-color: $bg-color-button-warning !important;

        &:hover,
        &:focus {
            background-color: adjust-color($bg-color-button-warning, $lightness: 8%) !important;
        }

        &:active {
            background-color: adjust-color($bg-color-button-warning, $lightness: -8%) !important;
            color: $color-active-button;
        }
    }

    &--danger {
        background-color: $bg-color-button-danger !important;

        &:hover,
        &:focus {
            background-color: adjust-color($bg-color-button-danger, $lightness: 8%) !important;
        }

        &:active {
            background-color: adjust-color($bg-color-button-danger, $lightness: -8%) !important;
            color: $color-active-button;
        }
    }

    &--success {
        background-color: $bg-color-button-success !important;

        &:hover,
        &:focus {
            background-color: adjust-color($bg-color-button-success, $lightness: 8%) !important;
        }

        &:active {
            background-color: adjust-color($bg-color-button-success, $lightness: -8%) !important;
            color: $color-active-button;
        }
    }
}

.swal2-cancel {
    background-color: $bg-color-button-default !important;

    &:hover,
    &:focus {
        background-color: adjust-color($bg-color-button-default, $lightness: 8%) !important;
        box-shadow: none !important;
    }

    &:active {
        background-color: adjust-color($bg-color-button-default, $lightness: -8%) !important;
        color: $color-active-button;
    }
}
