/* _sweetalert2.css */

.swal2-container {
    .swal2-title {
        font-size: 20px;
        font-weight: 500;
        color: var(--color-body-color);
    }
}

.swal2-popup {
    width: 28em;
    padding: 2rem;
    background-color: var(--color-card);
    color: var(--color-body-color);
    @apply rounded;

    .swal2-html-container {
        font-size: 16px !important;
        color: var(--color-body-color);
    }
}

.swal2-footer {
    border-top: 1px solid var(--color-border-color);
    color: var(--color-body-color);
}

.swal2-icon {
    &.swal2-question {
        border-color: var(--color-info);
        color: var(--color-info);
    }

    &.swal2-success {
        [class^="swal2-success-line"] {
            background-color: var(--color-success);
        }

        .swal2-success-ring {
            border-color: var(--color-success);
        }
    }

    &.swal2-warning {
        border-color: var(--color-warning);
        color: var(--color-warning);
    }
}

div:where(.swal2-icon) {
    width: 4em;
    height: 4em;
    margin: 0.5rem auto;

    .swal2-icon-content {
        font-size: 3em;
    }

    &.swal2-info {
        border-color: var(--color-info);
        color: var(--color-info);
    }
}

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

.swal2-loader {
    border-color: var(--color-primary) transparent var(--color-primary) transparent;
}

.swal2-timer-progress-bar {
    @apply bg-success/30;
}

.swal2-progress-steps {
    .swal2-progress-step {
        background: var(--color-primary);

        &.swal2-active-progress-step {
            background: var(--color-primary);

            & ~ .swal2-progress-step,
            & ~ .swal2-progress-step-line {
                @apply bg-primary/30;
            }
        }
    }

    .swal2-progress-step-line {
        background: var(--color-primary);
    }
}

.swal2-actions.swal2-loading {
    .swal2-styled.swal2-confirm {
        border-left-color: var(--color-primary) !important;
        border-right-color: var(--color-primary) !important;
    }
}

.swal2-file,
.swal2-input,
.swal2-textarea {
    border: 1px solid var(--color-default-300);

    &:focus {
        box-shadow: none;
        border-color: var(--color-default-400);
    }
}

.swal2-input {
    height: auto;
    display: block;
    padding: 8px 12px;
    font-weight: 400;
    @apply font-body;
    color: var(--color-body-color);
    box-shadow: none !important;
    border-radius: 5px !important;
    background-color: var(--color-card);
    background-clip: padding-box;
    border: 1px solid var(--color-default-300) !important;
}

.swal2-close {
    @apply font-body;
    font-size: 42px;
    width: 1em;
    height: 1em;
    position: absolute;
    top: 5px;
    inset-inline-end: 5px;

    &:focus {
        box-shadow: none;
    }

    &:hover {
        color: var(--color-danger);
    }
}

.swal2-validation-message {
    background-color: transparent;
}

div:where(.swal2-icon).swal2-error [class^="swal2-x-mark-line"] {
    width: 1.9375em;
    top: 1.95em;
}

div:where(.swal2-icon).swal2-success [class^="swal2-success-line"][class$="tip"] {
    top: 2.4em;
    width: 1em;
}

.swal2-icon.swal2-success [class^="swal2-success-line"][class$="long"] {
    top: 1.85em;
    inset-inline-end: 0.5em;
    width: 2.25em;
}

.swal2-backdrop-show {
    backdrop-filter: blur(2px);
    background: var(--color-emphasis-color);
}
