/*
 * Toasts shown while a correction is being applied. They are anchored to the
 * canvas container they are about (see correctionStatus.js), not the viewport,
 * and stack upwards from its bottom-left corner.
 */
.correction-status-stack {
    position: absolute;
    left: var(--offset);
    bottom: var(--offset);
    z-index: 20;

    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 8px;

    pointer-events: none;
}

.correction-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;

    border-radius: var(--radius-pill);
    background-color: var(--color-white-transparent);
    backdrop-filter: var(--blur-soft);
    box-shadow: var(--shadow-soft);

    font-size: 13px;
    color: var(--color-gray-dark);
    white-space: nowrap;

    animation: correction-status-in 0.2s ease-out;
}

.correction-status__spinner {
    width: 14px;
    height: 14px;
    flex-shrink: 0;

    border: 2px solid var(--color-gray);
    border-top-color: var(--color-accent);
    border-radius: 50%;

    animation: spin-in-place 1s linear infinite;
}

@keyframes correction-status-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Busy cursor for the whole page — the controls set their own cursor, so the
   override has to reach every descendant. */
body.is-applying,
body.is-applying * {
    cursor: progress !important;
}

@media (max-width: 768px) {
    .correction-status-stack {
        left: 10px;
        right: 10px;
        bottom: 10px;
        align-items: center;
    }

    .correction-status {
        max-width: 100%;
        white-space: normal;
    }
}
