/* assets/public-form-autosave.css - AutoSave & Resume Form UI Styles */

/* Autosave status indicator in top-action-bar */
.autosave-status-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
}

.autosave-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    transition: all 0.25s ease;
    user-select: none;
}

.autosave-badge.saving {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.autosave-badge.saving i {
    animation: autosave-spin 0.9s linear infinite;
}

.autosave-badge.saved {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.autosave-badge.saved i {
    color: #059669;
}

.autosave-badge.idle {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
}

@keyframes autosave-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Clear Draft Button */
.btn-outline-danger {
    background: #fff;
    border: 1.5px solid #f87171;
    color: #dc2626;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-outline-danger:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    transform: translateY(-1px);
}

/* Draft Restored Banner */
.draft-resume-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1.5px solid #86efac;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    animation: draftSlideDown 0.35s ease-out;
}

@keyframes draftSlideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.draft-resume-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 280px;
}

.draft-resume-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.draft-resume-text h4 {
    margin: 0 0 3px 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 8px;
}

.draft-resume-text p {
    margin: 0;
    font-size: 13.5px;
    color: #166534;
    line-height: 1.45;
}

.draft-resume-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-resume-continue {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.btn-resume-continue:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-resume-clear {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-resume-clear:hover {
    background: #fee2e2;
    border-color: #f87171;
}

/* Floating Toast Notification */
.autosave-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.autosave-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.autosave-toast i {
    color: #34d399;
    font-size: 16px;
}

@media (max-width: 768px) {
    .draft-resume-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
        gap: 12px;
    }
    .draft-resume-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .btn-resume-continue, .btn-resume-clear {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
    .autosave-status-container {
        width: 100%;
        justify-content: space-between;
    }
    .autosave-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        justify-content: center;
    }
}
