/* Eagersky Autosave Status Indicator */

.autosave-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 9999px;
    transition: all 0.3s ease;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    animation: autosave-fadein 0.3s ease forwards;
}

@keyframes autosave-fadein {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autosave-status--saving {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.autosave-status--uploading {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.autosave-status--saved {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.autosave-status--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Dot indicators */
.autosave-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.autosave-dot--amber {
    background: #f59e0b;
    animation: autosave-pulse 1.5s ease-in-out infinite;
}

.autosave-dot--green {
    background: #10b981;
}

.autosave-dot--red {
    background: #ef4444;
}

@keyframes autosave-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* File preview after autosave upload */
.autosave-file-preview {
    margin-top: 4px;
    font-size: 0.75rem;
}

/* Auto-save indicator position in multi-step forms */
[data-autosave-form] .autosave-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.8125rem;
    padding: 6px 14px;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    [data-autosave-form] .autosave-status {
        bottom: 12px;
        right: 12px;
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}
