/* LOADER */
.loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
    place-items: center;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.is-loading .loader {
    display: grid;
}

.is-loading body {
    overflow: hidden;
}

.loader.leaving {
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
}

.loader-box {
    width: min(86vw, 340px);
    color: var(--accent);
    font-size: 0.95rem;
}

.loader-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.loader-icon {
    flex: none;
}

/* shimmer on the title while loading */
.loader-title {
    background: linear-gradient(90deg, #8a3410 0%, var(--accent) 45%, #ffb089 50%, var(--accent) 55%, #8a3410 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 1.6s linear infinite;
}

.loader.finished .loader-title {
    animation: none;
    background: none;
    -webkit-text-fill-color: var(--accent);
    color: var(--accent);
}

@keyframes shimmer {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -100% 0;
    }
}

.loader-steps {
    list-style: none;
    margin-top: 12px;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.loader.finished .loader-steps {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.loader-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0 4px 28px;
    color: var(--accent);
    opacity: 0;
    transform: translateY(6px);
    animation: stepIn 0.35s ease forwards;
}

.loader-steps li::before {
    content: "";
    width: 10px;
    height: 10px;
    flex: none;
    background: radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px);
}

.loader-steps li.done {
    opacity: 0.55;
}

.loader-steps li.done::before {
    height: 6px;
    background: none;
    border-left: 1.8px solid var(--accent);
    border-bottom: 1.8px solid var(--accent);
    transform: rotate(-45deg) translateY(-2px);
}

@keyframes stepIn {
    to {
        opacity: 1;
        transform: none;
    }
}

.loader-steps li.done {
    animation: none;
    transform: none;
}

