@use "sass:map";
@use "../../../styles/cunningham-tokens" as *;

.modal-importer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding-block: var(--c--globals--spacings--xxxl);
    text-align: center;
}
.modal-importer-form {
    display: flex;
    flex-direction: column;
    gap: var(--c--globals--spacings--base);
    width: 680px;
}

.modal-importer-form__or-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--c--globals--spacings--base);
    color: var(--c--contextuals--content--semantic--neutral--tertiary);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-block: var(--c--globals--spacings--base);
    text-transform: uppercase;

    &:before, &:after {
        content: "";
        display: inline-block;
        width: 14px;
        height: 1px;
        background-color: currentColor;
    }
}

.archive_file_field {
    position: relative;
    .progress-bar-container {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        line-height: 1;
        gap: var(--c--globals--spacings--sm);
        justify-content: center;
        align-items: center;
        padding-top: 12px;
        padding-inline: 25%;
        width: 100%;
        background-color: var(--c--contextuals--background--surface--tertiary);
        backdrop-filter: blur(2px);
        border-radius: var(--c--globals--spacings--xs);
        height: 100%;
        font-variant-numeric: tabular-nums;
    }
}

.task-loader {
    margin: 0 auto;
    width: 100%;
    padding: var(--c--globals--spacings--base) 0;
    max-width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--c--globals--spacings--base);
}

.task-loader__progress_resume {
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-direction: column;
}

.importer-completed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--c--globals--spacings--base);
    width: 100%;
    max-width: 420px;
    text-align: center;

    &__badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        height: 64px;
        border-radius: 50%;
        background-color: var(--c--contextuals--background--semantic--success--secondary);
        color: var(--c--contextuals--content--semantic--success--tertiary);

        &--warning {
            background-color: var(--c--contextuals--background--semantic--warning--secondary);
            color: var(--c--contextuals--content--semantic--warning--tertiary);

            .material-icons {
                transform: translateY(-2px);
            }
        }

        .material-icons {
            font-size: 2.25rem;
        }
    }

    &__heading {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--c--globals--spacings--3xs);
    }

    &__title {
        font-size: 1.125rem;
        font-weight: 700;
        line-height: 1.2;
    }

    &__percent {
        display: inline-flex;
        align-items: center;
        gap: var(--c--globals--spacings--2xs);
        font-size: 1.125rem;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
    }

    &__percent-warning.material-icons {
        font-size: 1.1rem;
        color: var(--c--contextuals--content--semantic--warning--tertiary);
    }

    &__stats {
        align-self: center;
        list-style: none;
        margin: var(--c--globals--spacings--sm) 0 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: var(--c--globals--spacings--xs);
    }

    &__stats li {
        display: flex;
        align-items: center;
        gap: var(--c--globals--spacings--xs);
        font-size: 0.95rem;
        color: var(--c--contextuals--content--semantic--neutral--secondary);
        font-variant-numeric: tabular-nums;
    }

    &__stat-dot {
        flex: 0 0 auto;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: var(--c--contextuals--background--semantic--success--secondary);

        &--failure {
            background-color: var(--c--contextuals--background--semantic--warning--secondary);
        }
    }

    .c__button {
        margin-top: var(--c--globals--spacings--base);
    }
}
